/* Ticketmate type rhythm: page 22 / section 17 / body 16 / meta 13 / number 18.
   Keep Ticketlog's established palette and layouts. */
:root {
  --canvas-alt: #fafafa;
  --canvas: var(--canvas-alt);
  --surface: #fff;
  --ink: #171717;
  --onyx: #171717;
  --muted: #707070;
  --line: #dfdfdf;
  --line-soft: #ededed;
  --primary: #644fc1;
  --green: #4ade80;
  --primary-deep: #5439ab;
  --primary-soft: #4ade80;
  --accent-pink: #c7007e;
  --magenta: #644fc1;
  --link: #644fc1;
  --accent-ink: #644fc1;
  --type-display: 22px;
  --type-heading: 22px;
  --type-body-lg: 17px;
  --type-body: 16px;
  --type-caption: 13px;
  --type-micro: 13px;
  --type-number: 18px;
}

body, .shell, .login-wrap { background: var(--canvas-alt); }
body { color: var(--ink); font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: var(--type-body); line-height: 1.6; letter-spacing: 0; }
button, input, select, textarea { font-family: inherit; }
.shell { max-width: 760px; margin-inline: auto; }
.main { padding: 16px 16px calc(86px + env(safe-area-inset-bottom)); }
.footer { padding: 24px 16px calc(83px + env(safe-area-inset-bottom)); font-size: var(--type-micro); }

h1, h2, h3, h4 { color: inherit; font-weight: 700; letter-spacing: 0; line-height: 1.35; }
h1, .hero h1, .login-card h1 { font-size: var(--type-display); line-height: 1.25; letter-spacing: -.2px; }
h2, .page-intro h1, .request-head h1, .ranking-intro h1,
.calendar-intro h1, .new-request-intro h1, .production-head h1 { font-size: var(--type-heading); line-height: 1.33; }
h3, h4, .section-head h2, .calendar-head h2, .calendar-details h2,
.ranking-card-head h2, .home-panel-head h2, .home-requests-head h2,
.notice-post h2, .request-info-panel h2 { font-size: var(--type-body-lg); line-height: 1.55; }
.section.card > h2 { font-size: var(--type-body-lg); line-height: 1.35; }
.eyebrow, .home-eyebrow { display: none; }
.eyebrow, .home-eyebrow, .badge, .priority-tag, .event-genre,
.home-live, .ranking-live { font-size: var(--type-micro); font-weight: 700; letter-spacing: .96px; line-height: 1.2; }
.lead, .page-intro .lead, .ranking-intro > p:not(.eyebrow),
.calendar-intro p:last-child, .new-request-intro .lead,
.production-head p { color: var(--muted); font-size: var(--type-body); line-height: 1.55; }
.small, small, .muted, .meta, .field-hint, .field-note,
.event-date, .event-venue, .event-card-foot, .ticketing-meta,
.ticketing-deadline, .request-meta, .request-ticketing,
.session-card-venue, .session-card-schedule, .session-card-people,
.home-rank-member small, .home-event-copy small, .home-ticketing-title,
.ranking-member-count, .rank-refreshed { font-size: var(--type-caption); line-height: 1.43; }
.button, .button-small, .field label, .site-field legend,
.admin-jumps button { font-size: var(--type-body-lg); font-weight: 700; line-height: 1.38; letter-spacing: .2px; }
.button-small { font-size: var(--type-caption); }
.home-quicklinks strong, .home-request-action strong, .home-intro h1,
.home-rank-member strong, .home-event-copy strong, .event-title,
.session-card-top strong, .calendar-event strong,
.offer-group-head strong, .rank-row strong { font-size: var(--type-body); font-weight: 700; line-height: 1.4; }
.home-panel-head h2, .home-requests-head h2, .home-ticketing > strong,
.request-overview strong, .session-card-stats strong,
.request-stage > strong, .turn-time, .ticketing-time,
.ranking-self-position, .stat-number, .member-stats strong { font-size: var(--type-body-lg); font-weight: 700; line-height: 1.35; }
.calendar-weekday, .calendar-day small, .home-my-rank span,
.home-rank-number, .home-rank-count, .home-quick-meta,
.home-quick-arrow, .home-ticketing-label, .home-ticketing-deadline,
.seat-tile-status, .seat-relation, .score-kind,
.demo-strip summary, .demo-strip-head, .demo-switch .button,
.request-info-card-body span, .request-info-delete { font-size: var(--type-micro); }
.calendar-day, .rank-row .point, .home-rank-score,
.home-my-rank strong, .event-card .badge, .activity-seat { font-size: var(--type-caption); }

/* A quiet top bar, with admin access in the header for admin accounts. */
.topbar { background: #fff; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; }
.topbar-inner { min-height: 58px; padding: 8px 12px; gap: 8px; }
.logo { gap: 0; font-size: var(--type-display); font-weight: 700; letter-spacing: -.2px; }
.score-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); background: #fff; }
.score-strip > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 6px 2px; white-space: nowrap; }
.score-strip > span + span { border-left: 1px solid var(--line-soft); }
.score-strip small { color: var(--muted); font-size: var(--type-micro); line-height: 1.2; }
.score-strip strong { font-size: var(--type-number); font-weight: 700; line-height: 1.3; }
.score-total { color: var(--primary); }
.stars-earned, .stars-available { color: #17643b; }
.stars-spent { color: var(--ink); }
.menu-button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.menu-button svg { width: 21px; height: 21px; }
.admin-entry { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 36px; margin-left: auto; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: var(--type-micro); font-weight: 700; white-space: nowrap; }
.admin-entry + .menu-button { margin-left: 0; }
.admin-entry svg { width: 17px; height: 17px; }
.admin-entry.active { border-color: #c5b6ea; background: #f4effc; color: var(--primary-deep); }
.mobile-menu { background: #fff; border-top: 1px solid var(--line-soft); }
.mobile-menu .nav-link { border-radius: 6px; font-size: var(--type-body); }
.nav-link.active, .nav-link:hover { color: var(--primary-deep); background: #f4effc; }
.desktop-nav { display: none; }

/* Violet actions, Emerald Soft for affirmative seat actions. */
.button { min-height: 42px; padding: 8px 16px; border: 1px solid transparent; border-radius: 6px; box-shadow: none; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: none; }
.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.button-primary:hover:not(:disabled) { background: var(--primary-deep); border-color: var(--primary-deep); }
.button-green { color: var(--ink); background: var(--primary-soft); border-color: var(--primary-soft); }
.button-green:hover:not(:disabled) { background: #35c96c; border-color: #35c96c; }
.button-ghost, .button-white { color: var(--ink); background: #fff; border-color: #c7c7c7; }
.button-ghost:hover:not(:disabled), .button-white:hover:not(:disabled) { border-color: #b6a4e4; background: #f9f7fe; }
.button-danger { color: #a11f37; background: #fff; border-color: #db9ca8; }
.field input, .field select, .field textarea, .site-choice span,
.ticketing-admin-form input { color: var(--ink); background: #fff; border-color: var(--line); border-radius: 6px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }

.section { margin-top: 24px; }
.section-head { margin-bottom: 12px; }
.page-intro { padding: 6px 2px 18px; }
.page-intro h1, .ranking-intro h1, .calendar-intro h1 { margin-bottom: 6px; }
.card, .event-card, .session-card, .calendar-card, .calendar-details,
.ranking-card, .home-rank-panel, .home-event-list, .ticketing-item,
.notice-post, .request-info-card { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.card { padding: 16px; }
.card-soft, .rank-row, .priority-person, .venue-row, .home-notice,
.session-empty, .request-info-file, .production-result,
.production-selected, .empty { background: #fff; border-color: var(--line); }
.hero, .request-head, .login-card { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.hero { min-height: auto; padding: 24px; }
.hero::before { display: none; }
.hero .lead, .login-card .lead { color: var(--muted); }
.request-head { padding: 16px; }
.request-head .eyebrow, .request-meta { color: var(--muted); }
.login-card { padding: 24px; }
.login-card h1 { margin-top: 24px; }
.dev-logins { border-top-color: var(--line); }
.card-magenta, .ranking-self { color: #fff; background: #1c1c1c; border-color: #1c1c1c; box-shadow: none; }
.card-magenta .eyebrow, .ranking-self .muted { color: #fff; }
.stat { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.badge { border-radius: 999px; background: #f4f4f4; color: var(--ink); letter-spacing: 0; }
.badge-open { background: #dbf8e9; color: #126744; }
.badge-selection { background: #eae4f8; color: #5540a5; }
.badge-closed { background: #efefef; color: #555; }
.notice-green { color: #126744; background: #e9f8f0; border-color: #b6e4ce; }
.notice-magenta { color: #5540a5; background: #f1edfa; border-color: #d9d0f2; }
.text-link, .section-head a, .home-requests-head a,
.home-ticketing-arrow, .event-arrow, .request-back { color: var(--link); }

/* Five icon-only destinations; each link keeps its accessible label. */
.bottom-nav, .bottom-nav.admin-bottom-nav { bottom: 0; display: grid; grid-template-columns: 1fr 1fr 58px 1fr 1fr; align-items: center; gap: 4px; width: min(100%, 760px); min-height: calc(64px + env(safe-area-inset-bottom)); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -8px 24px rgb(0 0 0 / 8%); backdrop-filter: none; }
.bottom-tab { display: grid; place-items: center; min-width: 0; min-height: 48px; border-radius: 8px; color: #707070; }
.bottom-tab-icon, .admin-bottom-nav .bottom-tab-icon { display: grid; place-items: center; width: 36px; height: 36px; }
.bottom-tab-icon svg, .admin-bottom-nav .bottom-tab-icon svg { width: 21px; height: 21px; }
.bottom-tab.active { color: var(--ink); background: transparent; }
.bottom-tab.active .bottom-tab-icon { background: transparent; }
.bottom-tab-request { align-self: start; margin-top: -18px; }
.bottom-tab-request .bottom-tab-icon { width: 52px; height: 52px; color: #fff; background: var(--primary); border-radius: 50%; box-shadow: 0 6px 18px rgb(0 0 0 / 10%); }
.bottom-tab-request .bottom-tab-icon svg { width: 25px; height: 25px; stroke-width: 3; }
.bottom-tab-request.active .bottom-tab-icon { background: var(--primary); box-shadow: 0 6px 18px rgb(0 0 0 / 10%); }
.bottom-tab:hover { color: var(--primary); }
.toast { bottom: calc(74px + env(safe-area-inset-bottom)); }

/* Home uses neutral quick links, a violet action, and small emerald status cues. */
.home-dashboard { gap: 12px; padding-bottom: 12px; }
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 0; }
.home-intro h1 { margin: 0; }
.home-my-rank { display: grid; flex: none; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: center; }
.home-my-rank strong { color: var(--ink); }
.home-quicklinks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.home-quicklinks a { display: flex; align-items: center; gap: 7px; min-height: 54px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: none; }
.home-quicklinks strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-quick-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: #f2f2f2; color: var(--primary); }
.home-quick-icon svg { width: 21px; height: 21px; }
.home-quick-icon.is-green { background: #e9f9ee; color: #17643b; }
.home-quick-meta { padding: 3px 5px; border-radius: 6px; background: #f2f2f2; color: var(--ink); letter-spacing: 0; }
.home-request-action { min-height: 58px; padding: 10px 12px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary); box-shadow: none; color: #fff; }
.home-request-plus { width: 34px; height: 34px; border-radius: 50%; color: var(--primary); background: #fff; }
.home-request-plus svg { width: 21px; height: 21px; stroke-width: 3; }
.home-request-action small { font-size: var(--type-caption); font-weight: 400; }
.home-request-action > span:last-child { font-size: var(--type-body-lg); }
.home-rank-panel { overflow: hidden; }
.home-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 8px; padding: 13px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.home-panel-head h2 { margin: 2px 0 0; }
.home-live { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.home-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-soft); animation: live-pulse 2.2s ease-in-out infinite; }
.home-rank-count { color: var(--muted); }
.home-rank-list { padding: 2px 11px 6px; }
.home-rank-row { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 7px 5px; border-bottom: 1px solid var(--line-soft); border-radius: 0; transition: background-color .15s ease; }
.home-rank-row:last-child { border-bottom: 0; }
.home-rank-row.rank-1 { background: #fff; }
.home-rank-row.is-me { box-shadow: inset 3px 0 var(--primary); }
.home-rank-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fdf0f6; color: var(--accent-pink); font-weight: 700; }
.home-rank-member { display: grid; flex: 1; min-width: 0; gap: 1px; }
.home-rank-member strong, .home-rank-member small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-rank-score { flex: none; color: var(--accent-pink); }
.home-ticketing, .ticketing-item { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid #ffdb13; border-radius: 8px; background: #fff; box-shadow: none; }
.home-ticketing-label, .ticketing-time { color: var(--accent-ink); }
.home-event-list { overflow: hidden; }
.home-event { min-height: 64px; }
.home-event-art { background: #1c1c1c; color: var(--primary); }

/* Records, calendars, request cards, and admin panels share the same surfaces. */
.rank-row.rank-top, .rank-row.rank-top:first-child { background: #fff; outline-color: var(--line); }
.rank-row .point { color: var(--accent-pink); }
.priority-person > b { color: var(--primary); }
.rank-row .name { color: var(--ink); }
.ranking-self > span:first-child { font-size: var(--type-caption); }
.ranking-self-score { font-size: var(--type-number); }
.ranking-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ranking-tabs button { min-height: 40px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-family: inherit; font-size: var(--type-caption); font-weight: 700; line-height: 1.4; cursor: pointer; }
.ranking-tabs button.active { border-color: #c5b6ea; background: #f4effc; color: var(--primary-deep); }
.ranking-tabs button:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 1px; }
.star-wallet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--primary-soft); border-radius: 10px; background: #fff; color: var(--ink); }
.star-wallet strong { color: #17643b; font-size: var(--type-body); line-height: 1.4; }
.star-wallet span, .star-wallet small { font-size: var(--type-caption); line-height: 1.43; }
.star-wallet small { flex-basis: 100%; color: var(--muted); }
.ranking-star-wallet { margin-top: 10px; }
.request-star-wallet { margin-bottom: 10px; }
.star-activity { color: #17643b; font-weight: 700; }
.ranking-live, .ranking-member-count, .calendar-event-status,
.calendar-event > span:last-child, .event-genre,
.production-result b, .session-card-link { color: var(--accent-ink); }
.calendar-card, .calendar-details { padding: 15px 12px; }
.calendar-head button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: var(--type-body-lg); }
.calendar-grid { gap: 4px; }
.calendar-weekday { color: var(--muted); font-size: var(--type-micro); }
.calendar-day { min-height: 44px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 700; }
.calendar-day.has-events { border-color: #d5c8ee; background: #faf8fe; }
.calendar-day.today { border-color: var(--primary-deep); }
.calendar-day.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.calendar-day small { color: var(--primary); background: transparent; }
.calendar-day.selected small { color: #fff; background: transparent; }
.calendar-details .text-link { font-size: var(--type-caption); }
.ticketing-item-top { font-size: var(--type-micro); }
.home-requests-head a, .request-genre, .request-stage-label,
.request-stage-next, .pick-ledger-row small,
details summary span { font-size: var(--type-caption); }
.event-card { min-height: 108px; padding: 10px; }
.event-poster, .production-poster, .production-head-placeholder,
.seat-picked-cover, .session-picked-cover { color: var(--primary); background: #1c1c1c; }
.event-card-foot, .event-date, .session-card-count { color: var(--ink); }
.event-venue, .event-card-foot { color: var(--muted); }
.production-result, .production-selected, .request-info-card,
.request-info-file, .request-info-image-button,
.ticketing-admin-form, .session-empty { background: #fff; }
.ticketing-admin-form input { color: var(--ink); background: #fff; }
.request-ticketing { color: var(--ink); background: #f5f5f5; }
.request-stage-active { border-color: #d4c8ed; border-left-color: var(--primary); background: #faf8fe; }
.demo-strip { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: none; }
.demo-strip summary, .demo-strip-head a { color: var(--ink); }
.demo-strip summary span, .demo-switch .current { color: var(--accent-ink); }
.admin-jumps button { color: var(--ink); background: #fff; border-radius: 6px; }

/* Match Ticketmate's CHARTS list: one white surface, tabs on a line, rows separated by hairlines. */
.home-rank-panel { padding: 16px 16px 5px; border: 0; border-radius: 16px; background: #fff; }
.home-rank-panel .home-quicklinks { margin-bottom: 10px; }
.home-quicklinks a { position: relative; min-height: 56px; padding: 9px 13px; border: 0; border-radius: 14px; background: #ededed; overflow: hidden; }
.home-quicklinks a::after { content: ''; position: absolute; top: 50%; right: -13px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transform: translateY(-50%); }
.home-quick-icon, .home-quick-icon.is-green { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--primary); font-size: var(--type-body-lg); font-weight: 900; }
.home-quick-arrow { position: relative; z-index: 1; color: var(--primary); font-size: 12px; font-weight: 900; }
.home-quick-meta { margin-left: auto; background: #fff; }
.home-chart-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-height: 44px; margin-bottom: 10px; padding: 4px; border-radius: 16px; background: #ededed; }
.home-chart-switch > * { display: grid; place-items: center; min-width: 0; min-height: 40px; border-radius: 12px; color: var(--muted); font-size: var(--type-caption); font-weight: 800; text-align: center; text-decoration: none; white-space: nowrap; }
.home-chart-switch > .active { background: #fff; color: var(--primary); }
.home-chart-switch a:hover { color: var(--primary); }
.home-panel-head { align-items: center; padding: 0; border: 0; }
.home-panel-head h2 { margin: 0; font-size: var(--type-body-lg); }
.home-rank-count { font-size: var(--type-caption); }
.home-rank-panel .ranking-tabs { margin-top: 2px; }
.ranking-tabs { display: flex; gap: 16px; margin: 0 0 4px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ranking-tabs button { position: relative; min-height: 40px; padding: 0 2px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: var(--type-caption); }
.ranking-tabs button.active { border: 0; border-radius: 0; background: transparent; color: var(--ink); }
.ranking-tabs button.active::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); }
.home-rank-list, .ranking-card .rank-list { display: grid; gap: 0; padding: 0; }
.home-rank-row, .home-rank-row.rank-1, .ranking-card .rank-row,
.ranking-card .rank-row.rank-top { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; outline: 0; box-shadow: none; transform: none; }
.home-rank-row:last-child, .ranking-card .rank-row:last-child { border-bottom: 0; }
.home-rank-row.is-me, .ranking-card .rank-row.me { background: transparent; outline: 0; box-shadow: none; }
.home-rank-number { display: block; flex: none; width: auto; height: auto; border-radius: 0; background: transparent; color: var(--accent-pink); font-size: var(--type-body); font-weight: 700; white-space: nowrap; }
.home-rank-row:nth-child(n+6) .home-rank-number { color: var(--ink); }
.home-rank-member, .ranking-card .rank-member { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; min-width: 0; }
.home-rank-member strong, .ranking-card .rank-row .name { color: var(--ink); font-size: var(--type-body); font-weight: 700; text-decoration: none; }
.home-rank-member small, .ranking-card .rank-member .small { color: var(--muted); font-size: var(--type-caption); font-weight: 400; }
.home-rank-score, .ranking-card .rank-row .point { flex: none; margin-left: auto; color: #ff4d8b; font-size: var(--type-number); font-weight: 700; white-space: nowrap; }
.home-rank-row:nth-child(n+6) .home-rank-score,
.ranking-card .rank-row:nth-child(n+6) .point { color: var(--primary); }
.ranking-card { margin-top: 12px; padding: 15px 16px 8px; border: 0; border-radius: 16px; background: #fff; }
.ranking-card .ranking-self { min-height: 48px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
.ranking-card .ranking-self-position, .ranking-card .ranking-self-score { color: var(--accent-pink); font-size: var(--type-number); }
.ranking-card .ranking-star-wallet { margin: 0; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ranking-card-head { margin: 12px 0 3px; }
.ranking-card-head h2 { font-size: var(--type-body-lg); }
.ranking-card .rank-row:hover, .home-rank-row:hover { background: #fafafa; box-shadow: none; transform: none; }
.ranking-card .rank-row > strong { min-width: 25px; color: var(--accent-pink); font-size: var(--type-body); }
.ranking-card .rank-row:nth-child(n+6) > strong { color: var(--ink); }
.ranking-card .rank-row:focus-visible, .home-rank-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* The original Ticketmate dashboard header and first panel. */
body:has(.shell.is-home) { background: #fffaf0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar { padding: 12px 12px 10px; border: 1px solid #e5e5e5; border-radius: 0 0 16px 16px; box-shadow: 0 1px 3px rgb(0 0 0 / 6%); }
.topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 88px; padding: 0; }
.topbar .logo { justify-self: start; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.topbar-right { display: flex; flex-direction: column; align-items: flex-end; justify-self: end; gap: 4px; min-width: 0; }
.kst-clock { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 24px; margin-right: 2px; padding: 4px 10px; border-radius: 999px; background: #dceeb1; color: #0a0a0a; }
.kst-clock svg { width: 14px; height: 14px; }
.kst-clock strong { font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.topbar-actions { display: grid; grid-template-columns: repeat(4, 40px); align-items: center; gap: 10px; }
.top-avatar, .top-action-icon, .top-key { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #8f99aa; background: transparent; border: 0; border-radius: 6px; }
.top-avatar img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.top-action-icon svg, .top-key svg { width: 21px; height: 21px; }
.top-action-icon:hover, .top-key:hover, .top-avatar:hover { color: #6b01c2; background: #f8f6fc; }
.top-key { border: 1px solid #e5e5e5; color: #0a0a0a; background: #fff; }
.header-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.header-search input { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #e5e5e5; border-radius: 10px; background: #fffaf0; color: var(--ink); font-size: 14px; font-weight: 600; }
.header-search input::placeholder { color: #6a6a6a; opacity: 1; }
.header-search input:focus { outline: 2px solid #ead9fa; border-color: #6b01c2; }
.header-search button { min-width: 58px; min-height: 40px; padding: 0 14px; border: 1px solid #6b01c2; border-radius: 10px; background: #6b01c2; color: #fff; font-size: 13px; font-weight: 800; }
.topbar .score-strip { margin: 10px -12px -10px; }
.shell.is-home .topbar .score-strip { display: none; }
.shell.is-home { background: #fffaf0; }
.shell.is-home .main { padding: 12px 12px calc(86px + env(safe-area-inset-bottom)); }
.home-rank-panel { padding: 16px 16px 7px; }
.home-rank-panel .home-quicklinks { margin-bottom: 10px; }
.home-rank-panel .home-panel-head { justify-content: flex-end; min-height: 28px; padding: 2px 0 0; }
.home-rank-panel .home-panel-head h2 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-rank-panel .home-rank-count { color: #6a6a6a; font-size: 14px; font-weight: 400; }
.home-rank-panel .ranking-tabs { gap: 16px; margin: 0; }
.home-rank-panel .ranking-tabs button { padding-inline: 0; font-size: 14px; }
.home-score-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.home-score-summary span { display: flex; flex-direction: column; align-items: center; padding: 7px 2px; color: var(--muted); font-size: var(--type-caption); white-space: nowrap; }
.home-score-summary span + span { border-left: 1px solid var(--line-soft); }
.home-score-summary strong { color: var(--primary); font-size: var(--type-number); line-height: 1.3; }
.home-score-summary span:nth-child(2) strong, .home-score-summary span:nth-child(4) strong { color: #17643b; }
.search-page { display: grid; gap: 12px; }
.search-page > p { margin: 0; }
.search-group { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.search-group h2 { padding-bottom: 7px; font-size: var(--type-body-lg); }
.search-group p { margin: 0; padding: 8px 0; }
.search-result { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.search-result span { color: var(--muted); font-size: var(--type-caption); text-align: right; }

@keyframes live-pulse { 50% { opacity: .45; } }
@media (hover: hover) {
  .home-quicklinks a:hover, .event-card:hover, .session-card:hover { border-color: var(--primary-deep); background: #f8fcfa; transform: none; box-shadow: none; }
  .home-rank-row:hover, .home-event:hover { background: #f8fcfa; transform: none; }
}
@media (max-width: 430px) {
  .home-quicklinks a { gap: 6px; padding-inline: 8px; }
  .home-quick-icon, .home-quick-icon.is-green { width: 30px; height: 30px; }
  .home-quick-arrow, .home-quick-meta { display: none; }
}
@media (max-width: 350px) {
  .topbar { padding-inline: 8px; }
  .topbar-inner { min-height: 84px; gap: 4px; padding: 0; }
  .topbar .logo { font-size: 20px; }
  .topbar-actions { grid-template-columns: repeat(4, 34px); gap: 4px; }
  .top-avatar, .top-action-icon, .top-key { width: 34px; height: 36px; }
  .kst-clock { padding-inline: 7px; }
  .kst-clock strong { font-size: 10px; }
  .header-search button { min-width: 54px; padding-inline: 10px; }
  .score-strip > span { padding-block: 4px; }
  .home-quicklinks a { gap: 4px; padding-inline: 6px; }
  .home-quick-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-live i { animation: none; }
  .button, .home-quicklinks a, .event-card, .session-card,
  .home-rank-row, .home-event, .bottom-tab { transition: none; }
}
