/* 칭호 페이지 — 획득은 금색으로 또렷하게, 미획득은 흐리게 */
:root {
  --dim-name: #7B7068;
  --dim-sub: #5F564F;
  --dim-line: #2E2620;
  --dim-bg: rgba(15, 12, 13, 0.55);
}

.tpage { display: flex; flex-direction: column; gap: 32px; }

/* 요약 */
.tsum { position: relative; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 6px; padding: 34px 40px 36px; display: flex; flex-direction: column; gap: 16px; }
.tsum-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.tsum-count { display: flex; align-items: baseline; gap: 10px; }
.tsum-count b { font-family: 'Cinzel', serif; font-weight: 600; font-size: 48px; line-height: 1; color: var(--gold); }
.tsum-count span { font-family: 'Cinzel', serif; font-size: 20px; color: var(--sub); }
.tsum-pct { font-family: 'Cinzel', serif; font-size: 20px; color: var(--gold-soft); letter-spacing: 0.04em; }
.tbar { height: 6px; background: #2A2224; border-radius: 3px; overflow: hidden; }
.tbar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s ease; }
.tsum-note { margin: 0; font-size: 13px; color: var(--sub); line-height: 1.7; }

/* 구분 버튼 */
.tkinds .chip { display: inline-flex; align-items: center; gap: 8px; }
.tkinds .chip small { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--sub); }
.tkinds .chip.on small { color: var(--on-gold); opacity: 0.75; }
.tshow .chip { height: 40px; padding: 0 14px; font-size: 13px; }

/* 목록 */
.tsec { display: flex; flex-direction: column; gap: 14px; }
.tnote { margin: -4px 0 0; font-size: 13px; color: var(--sub); padding-left: 40px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ti { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; align-content: start; width: 100%; margin: 0; padding: 14px 18px 15px 16px; position: relative; text-align: left; font: inherit; color: inherit; background: var(--dim-bg); border: 1px solid var(--dim-line); border-radius: 4px; }
.ti-mark { width: 9px; height: 9px; margin-top: 9px; transform: rotate(45deg); border: 1px solid #4A4038; }
.ti-name { font-family: 'Song Myung', serif; font-size: 18px; line-height: 1.4; color: var(--dim-name); overflow-wrap: anywhere; }
.ti-alt { display: block; font-family: 'Gowun Batang', serif; font-size: 12px; color: var(--dim-sub); }
.ti-ach { grid-column: 2 / 4; font-size: 13px; line-height: 1.65; color: var(--dim-sub); overflow-wrap: anywhere; }
.ti-ach b { font-weight: 700; }
.ti-date { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.06em; color: var(--gold); white-space: nowrap; padding-top: 5px; }

.ti.got { background: var(--panel); border-color: var(--gold-dim); }
.ti.got .ti-mark { background: var(--gold); border-color: var(--gold); }
.ti.got .ti-name { color: var(--gold-soft); }
.ti.got .ti.got .ti-alt { color: var(--sub); }
.ti.got .ti-ach { color: var(--sub); }
.ti.got .ti-ach b { color: var(--text-2); }

/* 관리자 편집: 카드 전체가 획득 표시 버튼, 획득일 칸은 그 위에 따로 */
.ti-hit { position: absolute; inset: 0; z-index: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.ti-hit:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.ti:has(> .ti-hit:hover) { border-color: var(--gold-dim); }
.ti-hit:hover ~ .ti-name { color: var(--text); }
.ti.got .ti-hit:hover ~ .ti-name { color: #F3DCA3; }
.ti-mark, .ti-name, .ti-date, .ti-ach { pointer-events: none; position: relative; }
.ti-when { grid-column: 2 / 4; position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 -6px -10px; }
.ti-when .link-btn { min-height: 34px; font-size: 12px; }
.ti-din { height: 34px; padding: 0 10px; background: var(--field); border: 1px solid var(--line); border-radius: 3px; color: var(--text); font-size: 13px; color-scheme: dark; margin-left: 10px; }
.ti-din:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; }
.ti.busy { opacity: 0.55; }
.ti.hid { border-style: dashed; border-color: var(--line); background: transparent; }
.ti.hid .ti-name, .ti.hid .ti-ach, .ti.hid .ti-date { opacity: 0.6; }
.ti.busy .ti-hit { cursor: wait; }
.ttoast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); padding: 12px 18px; background: var(--panel); border: 1px solid var(--danger); border-radius: 4px; color: var(--danger); font-size: 14px; }

.tfoot-note { margin: 0; font-size: 12px; line-height: 1.7; color: var(--sub); }

@media (prefers-reduced-motion: reduce) { .tbar i { transition: none; } }
@media (max-width: 560px) {
  .tsum { padding: 30px 24px 30px; }
  .tsum-count b { font-size: 40px; }
  .tgrid { grid-template-columns: 1fr; }
  .tnote { padding-left: 0; }
}
