/* 출석체크 · 출석부 — 신규 시안 `06-speedtv-attendance*.html`(2026-10-16).
   ⚠ 시안에서 **그대로** 옮겼다. 값을 손보려면 시안을 먼저 본다(루트 2절 — 시안이 원본이다).

   ⚠⚠ **패널·머리·탭 줄(`.brd`·`.brd-h`·`.cs-tabs`)은 여기 없다 — `site.css` 의 '보드 크롬' 에 있다.**
     이 파일도 처음엔 그 블록을 안 들고 와서 **탭이 맨 텍스트로 나왔다**(경험치 랭킹과 함께 2026-10-16 수정).
     ⚠ 당시 DOM 으로 탭 개수·활성만 확인하고 **그려진 모습을 안 봐서** 놓쳤다 — 담당자가 먼저 발견했다.
   ⚠⚠ 달력 색 규칙은 명세서 23절이 못박는다 —
     출석한 날 **연한 레드 배경 + 레드 원형 도장**(`.on`) · 오늘 **검정 테두리**(`.tdy`) ·
     지난 날 미출석 **회색**(기본) · 오늘 이후 **흐린 회색**(`.fu`).
     ⚠ `.on` 과 `.tdy` 는 **함께 붙을 수 있다**(오늘 출석하면 도장 + 검정 테두리). 서로 덮지 않게
       `.tdy` 는 `box-shadow`(inset) 로만 그린다 — `border` 로 하면 칸 크기가 1px 밀린다.

   ⚠⚠ **아래 출석부 표(`.att-tw`·`.att-t`)는 경험치 랭킹(`pages/ranking.css`)과 같은 모양이다** —
     시안이 `.att-t,.rk-t` 처럼 **한 선택자 줄에 묶어** 적어 둔 것을 페이지 CSS 로 나누면서
     각자 한 벌씩 들게 됐다(두 화면이 동시에 뜨는 일은 없다). → **한쪽을 고치면 다른 쪽도 본다.** */

.att-ck{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px;padding:20px 22px;border-bottom:1px solid var(--line)}
.att-cal-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.att-cal-h b{font-size:17px;font-weight:900;color:#1b1d22}
.att-lg{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--mut)}
.att-lg i{width:10px;height:10px;border-radius:50%;display:inline-block}
.att-lg i.d{background:var(--rd)}
.att-lg i.t{border:2px solid #1b1d22;margin-left:6px}
.att-wk,.att-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.att-wk span{font-size:12px;font-weight:700;color:var(--mut);padding:4px 0}
.att-wk span:first-child{color:var(--rd)}
.att-days span{position:relative;display:grid;place-items:center;aspect-ratio:1;border-radius:9px;font-size:13px;font-weight:700;color:#3a3f47;background:#f7f8fa}
/* `.e` = 1일 앞의 빈 칸. ⚠ 배경을 지워야 달력이 그 주만 꽉 찬 것처럼 보이지 않는다. */
.att-days span.e{background:none}
.att-days span.fu{color:#c4c8cf;background:#fbfbfc}
.att-days span.on{background:#fdecee;color:var(--rd)}
/* 도장 — ⚠ 글자 위에 겹치는 원이라 `inset` 으로 안쪽에 그린다. 살짝 기울여 손도장처럼 보이게 한다. */
.att-days span.on:after{content:"";position:absolute;inset:18%;border:2px solid var(--rd);border-radius:50%;opacity:.55;transform:rotate(-12deg)}
.att-days span.tdy{box-shadow:inset 0 0 0 2px #1b1d22}
.att-days span em{font-style:normal}

.att-me{display:flex;flex-direction:column;gap:14px;justify-content:center}
.att-st{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.att-st div{padding:14px 10px;border:1px solid var(--line);border-radius:10px;background:#fafafb;text-align:center}
.att-st span{display:block;font-size:12px;font-weight:700;color:var(--mut)}
.att-st b{font-size:24px;font-weight:900;color:#1b1d22;font-variant-numeric:tabular-nums}
.att-st b small{font-size:13px;margin-left:2px;color:var(--mut)}
.att-st div:first-child b{color:var(--rd)}

.att-f{display:flex;flex-direction:column;gap:8px}
.att-f[hidden]{display:none}
.att-f .fi{width:100%;height:46px;padding:0 14px;border:1px solid var(--line);border-radius:9px;background:#fff;font:inherit;font-size:14px;color:var(--tx)}
.att-f .fi:focus{border-color:var(--rd);outline:0}
.att-f .fbtn{display:flex;align-items:center;justify-content:center;width:100%;height:48px;margin:0;border:0;border-radius:9px;background:linear-gradient(135deg,var(--rd),var(--rd2));color:#fff;font:inherit;font-size:15px;font-weight:900;cursor:pointer;box-shadow:0 8px 18px #e8212e33}
.att-f .fbtn:hover{filter:brightness(1.05)}
.att-f .fbtn:disabled{opacity:.6;cursor:default;filter:none}

.att-ok{display:flex;align-items:center;gap:8px;margin:0;padding:14px;border-radius:10px;background:#e8f6ee;color:#15803d;font-size:13.5px;font-weight:700}
.att-ok svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.att-ok[hidden],.att-need[hidden]{display:none}
.att-need{margin:0;padding:14px;border-radius:10px;background:#f7f8fa;font-size:13.5px;color:#4b5159}
.att-need a{color:var(--rd);font-weight:800;margin-left:4px;text-decoration:underline;text-underline-offset:2px}

/* ── 출석부 ── */
.att-bk{padding:18px 22px 22px}
.att-bk-h{display:flex;align-items:center;gap:14px;margin-bottom:10px;flex-wrap:wrap}
.att-bk-h h4{margin:0;font-size:16px;font-weight:900;color:#1b1d22}
.att-dn{display:flex;align-items:center;gap:6px}
.att-dn b{min-width:96px;text-align:center;font-size:14px;font-weight:800}
.att-dn a,.att-dn span{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:16px;color:#4b5159}
.att-dn a:hover{border-color:var(--rd);color:var(--rd)}
/* ⚠ 오늘 이후로는 못 간다 — 링크가 아니라 `<span>` 으로 그려 **누를 수 없게** 한다(시안의 `disabled`). */
.att-dn span{opacity:.35}
.att-cnt{margin-left:auto;font-size:13px;color:var(--mut)}
.att-cnt b{color:var(--rd)}

.att-tw{overflow-x:auto}
.att-t{width:100%;border-collapse:collapse;font-size:14px}
.att-t th{padding:10px 8px;border-top:2px solid #1b1d22;border-bottom:1px solid var(--line);font-size:12.5px;font-weight:800;color:#5f6670;text-align:left;white-space:nowrap}
.att-t td{padding:12px 8px;border-bottom:1px solid #f1f2f4}
.att-t .rk{width:64px;font-weight:800;color:#4b5159;font-variant-numeric:tabular-nums}
.att-t .nm{width:180px;font-weight:700}
.att-t .nk{display:inline-flex;align-items:center;gap:6px}
.att-t .cm{color:#4b5159}
.att-t .tm,.att-t .st{width:90px;color:var(--mut);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.att-md{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:900;color:#fff}
.att-md.m1{background:#d4a017}
.att-md.m2{background:#8b939e}
.att-md.m3{background:#b5673a}
/* 내 줄 강조 — ⚠ 색만으로 알리지 않는다. 순위·닉네임이 이미 내 것을 말해 준다(보조 표시다). */
.att-t tr.me td{background:#fff5f6}
.att-t tr.me .nm{color:var(--rd)}
.att-empty{padding:28px 8px;text-align:center;color:var(--mut);font-size:13.5px}

/* ── 모바일 ── ⚠ 표를 **카드형**으로 접는다(루트 6-6 — 가로 스크롤을 만들지 않는다). */
@media(max-width:760px){
  .att-ck{grid-template-columns:minmax(0,1fr);padding:16px 12px}
  .att-bk{padding:16px 12px}
  /* ⚠⚠ 2026-10-22 카드형으로 다시 짰다(지적: *"모바일 화면이 너무 디자인이 별로다"*).
       옛 모양은 표 줄을 그리드로만 접어 ① 내 줄 강조가 **칸(td)마다** 칠해져 분홍 조각 네 개로 갈라졌고
       ② 한마디가 없으면 **빈 분홍 띠**가 남았고 ③ 연속일이 `2일` 만 떠 무슨 숫자인지 몰랐다.
       → 줄 하나를 **카드 하나**로(강조는 카드째) · 빈 한마디는 감춤 · 연속일은 `N일 연속` 알약. */
  .att-t thead{display:none}
  .att-t,.att-t tbody{display:block}
  /* ⚠⚠ 한마디는 **최대 40자**(`AttendanceService.MessageMax`)다 — 처음엔 닉네임 아래 한 줄 말줄임으로 뒀는데
       375px 에서 칸이 175px 이라 40자(380px)의 **절반도 안 보였다**(2026-10-22 실측). 한마디는 **전폭 셋째 줄**에서
       줄바꿈해 다 보여 준다.
     ⚠ 연속일 알약은 **출석 시각 앞**(첫 줄)에 둔다(2026-10-22 지시 — 알약 혼자 한 줄을 먹어 3줄이 됐다) → 카드는 **2줄**. */
  .att-t tr{display:grid;grid-template-columns:40px minmax(0,1fr) auto auto;grid-template-areas:"rk nm st tm" "rk cm cm cm";align-items:center;gap:4px 8px;padding:12px;margin-bottom:8px;border:1px solid var(--line);border-radius:10px;background:#fff}
  .att-t tr:last-child{margin-bottom:0}
  .att-t td{padding:0;border:0;width:auto!important;background:none!important}
  .att-t .rk{grid-area:rk;text-align:center;font-size:15px}
  .att-t .nm{grid-area:nm;min-width:0}
  /* ⚠ 첫 줄에 닉네임·연속일·시각이 함께 서므로, 최장 닉네임(8자) + 세 자리 연속일이면 닉네임 끝이
       알약 밑으로 들어갔다(실측) → 닉네임 글자만 말줄임. 배지는 줄지 않는다. */
  .att-t .nk{display:flex;max-width:100%}
  .att-t .nk .lvb{flex:none}
  .att-t .nkt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .att-t .cm{grid-area:cm;min-width:0;margin-top:4px;padding:7px 10px;border-radius:8px;background:#f5f6f8!important;font-size:13px;line-height:1.5;color:#4b5159;white-space:normal;word-break:keep-all;overflow-wrap:anywhere}
  .att-t .cm:empty{display:none}
  .att-t .tm{grid-area:tm;text-align:right;font-size:12px}
  .att-t .st{grid-area:st;justify-self:end}
  .att-sk{display:inline-block;padding:2px 8px;border-radius:999px;background:#fff1f2;color:var(--rd);font-size:12px;font-weight:800}
  .att-t tr.me{background:#fff5f6;border-color:#f6c4c9}
  .att-t tr.me .att-sk,.att-t tr.me .cm{background:#fff!important}
  /* 빈 상태 줄은 카드로 그리지 않는다 */
  .att-t tr:has(.att-empty){display:block;border:0;padding:0;background:none}
  /* ⚠⚠ 빈 상태 줄은 칸이 하나(`colspan=5`)라 grid-area 가 없다 → 위 그리드의 **첫 칸(44px)** 에
       떨어져 "아직 / 출석한 / 회원이 / 없습니다." 로 한 낱말씩 꺾였다(2026-10-22 담당자 지적).
       전폭으로 펼치고, `.att-t td{padding:0}`(특이도가 더 높다)에 지워진 여백도 되살린다. */
  .att-t .att-empty{grid-column:1/-1;padding:28px 8px}
}
