/* KanaeYou Next · shared light theme. Layout/data components remain independent. */
:root {
  --navy: #284f89;
  --navy2: #204272;
  --ink: #253044;
  --muted: #647287;
  --line: #e2e7ee;
  --paper: #f6f8fb;
  --white: #fff;
  --gold: #3562a1;
  --gold-soft: #edf3fc;
  --shadow: 0 2px 6px rgb(30 48 75 / 3%);
  --section-gap: 24px;
  --radius: 12px;
}
[hidden] { display: none !important; }
body { font-size: 16px; line-height: 1.6; }
button, input, select, textarea { font-family: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
button { transition: background-color .15s, border-color .15s; }
button:disabled { cursor: not-allowed; }
input:not([type=range]):not([type=checkbox]), select, textarea { border-color: var(--line); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #788497; opacity: 1; }
.sidebar {
  width: 208px; padding: 28px 16px 20px; background: var(--white);
  color: var(--ink); border-right: 1px solid var(--line);
}
.brand { gap: 10px; margin: 0 8px 32px; }
.brand > span, .seal {
  flex-shrink: 0; border-radius: 10px; background: var(--navy);
  font-family: inherit; width: 38px; height: 38px; font-size: 23px;
}
.brand strong { color: var(--ink); font-size: 16px; letter-spacing: -.03em; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .09em; }
.sidebar nav { gap: 4px; }
.sidebar nav a { color: var(--muted); padding: 10px 14px; font-size: 14px; border-radius: 8px; }
.sidebar nav a:hover { color: var(--ink); background: var(--paper); }
.sidebar nav a.active { color: var(--navy); background: var(--gold-soft); box-shadow: none; font-weight: 700; }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 18px; }
.sidebar-foot, .sidebar-foot button { color: var(--muted); }
.content { margin-left: 208px; padding: 32px clamp(24px, 3vw, 56px); max-width: none; }
.content > footer { margin-top: 36px; padding-top: 20px; color: var(--muted); font-size: 12px; }
.content > :is(.panel, .detail-grid, .account-grid, .dashboard-grid, .club-grid, .role-directory, .stats-grid, .standings-grid, .hero, .profile-hero, .league-hero, .club-hero, .market-tape) {
  margin-block: var(--section-gap);
}
.content > :first-child { margin-top: 0; }
.dashboard-grid, .detail-grid, .club-grid, .standings-grid { gap: var(--section-gap); }
.panel, .stat-card, .account-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 24px; min-width: 0; }
.dashboard-grid > *, .detail-grid > * { min-width: 0; }
.dashboard-grid .ranking { max-height: 380px; overflow-y: auto; padding-right: 8px; }
.dashboard-grid .representative { align-self: start; }
.panel.table-panel, .panel.standing { padding: 0; }
.page-head { margin: 0 0 26px; }
.hero h1, .page-head h1, .profile-hero h1, .login-card h1 {
  font-family: inherit; font-size: clamp(26px, 2.5vw, 34px); font-weight: 700; line-height: 1.35; letter-spacing: -.045em;
}
.page-head > p:last-child { margin-top: 10px; font-size: 14px; }
.eyebrow { color: var(--muted) !important; font-size: 11px !important; letter-spacing: .12em; margin-bottom: 6px; }
.section-head { gap: 16px; margin-bottom: 20px; }
.section-head h2, .panel > h2 { font-size: 21px; letter-spacing: -.03em; }
.section-head > a, .back { color: var(--navy); font-size: 13px; }
.section-head > span { color: var(--muted); font-size: 13px; }
.hero, .profile-hero, .league-hero, .club-hero, .authority-banner {
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px;
}
.hero { min-height: 160px; align-items: center; gap: 24px; }
.hero::after { content: none; }
.hero p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.hero-status { background: var(--paper); border: 1px solid var(--line); padding: 12px 16px; border-radius: 8px; }
.hero-status small, .league-hero p, .league-hero > div:last-child span, .authority-banner > span { color: var(--muted); }
.status-dot { background: var(--green); box-shadow: 0 0 0 4px #eaf4ef; }
.profile-hero { gap: 24px; }
.profile-hero .avatar.xl { width: 116px; height: 116px; flex-basis: 116px; border: 3px solid var(--paper); }
.profile-hero .price-card small, .profile-hero .price-card span { color: var(--muted); }
.tag { border-radius: 6px; padding: 4px 8px; line-height: 1.6; }
.tag.gold { color: var(--navy); background: var(--gold-soft); }
.notice { color: var(--navy); border: 1px solid #d9e5f5; }
.price-card strong, .rep-profile strong, .account-card > strong, .league-hero > div:last-child strong, .ranking .rank, .ranking > b, .fixture-date h3 {
  font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: -.025em;
}
.price-card strong { font-size: 30px; }
.account-card > strong { font-size: 27px; }
.account-card.dark { color: var(--ink); background: var(--gold-soft); border-color: #d5e1f2; }
.account-card.dark > span, .account-card.dark > small { color: var(--muted); }
.market-tape { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.market-tape > div { border-color: var(--line); }
.market-tape span { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.market-tape strong { font-size: 15px; }
.filters { flex-wrap: wrap; gap: 8px; }
.filters a { border-radius: 8px; color: var(--muted); }
.filters a.active { background: var(--gold-soft); border-color: #c9d9ef; color: var(--navy); font-weight: 700; }
.search input { max-width: 520px; }
th { background: var(--paper); color: var(--muted); font-size: 12px; letter-spacing: 0; font-weight: 600; }
th, td { border-color: var(--line); }
tbody tr:hover { background: #f5f8fd; }
.number, .standing-number, .close-list b, .order-estimate strong { font-variant-numeric: tabular-nums; }
.note, .subtle, .muted, .empty { color: var(--muted); }
.ranking small, .member-cell small, .timeline-row time, .timeline-row > small, .close-list span, .close-list small { color: var(--muted); }
.role-directory-member, .candidate-card, .fixture, .proposal-card, .position { box-shadow: none; border-color: var(--line); border-radius: 10px; }
.role-directory-member:hover { border-color: #bbcde5; box-shadow: none; }
.member-editor button:not(.portrait-cancel-load):not(.secondary) { background: var(--navy); }
.portrait-dropzone.drag-active, .portrait-dropzone:focus-visible, .portrait-history-card.is-current { background: var(--gold-soft); border-color: var(--gold); }
.portrait-search-links a:hover, .representative-card:hover, .representative-card:focus-visible { background: var(--gold-soft); }
.representative-card.current .representative-name, .representative-card.current .representative-price b { color: var(--navy); }
.representative-card.current .representative-generation small { color: white; }
.representative-card.current > .avatar { box-shadow: 0 0 0 3px var(--gold); }
.representative-history-scroll { scrollbar-color: #acbfd9 transparent; }
.fixture-date h3 { font-size: 22px; }
.jam-tablist button { border-radius: 8px; }
.metric-tabs > .jam-tablist button[aria-selected=true], .jam-record-table .metric-active { color: var(--navy); background: var(--gold-soft); }
.order-estimate { background: var(--paper); border-color: var(--line); }
.order-form .form-actions { flex-wrap: wrap; }
.login-body { background: var(--paper); }
.login-card { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 32px rgb(30 48 75 / 6%); }
.login-card .seal { width: 46px; height: 46px; }

/* Searchable order instrument. The list is bounded and keyboard accessible. */
.stock-picker { min-width: 0; position: relative; }
.stock-search-field { position: relative; }
.stock-search-field > span { position: absolute; left: 14px; top: 10px; font-size: 23px; line-height: 1; color: var(--muted); pointer-events: none; }
.order-form .stock-search-field input { padding: 12px 34px 12px 42px; font-size: 15px; min-height: 48px; }
.stock-results {
  position: absolute; left: 0; right: 0; top: 78px; z-index: 4;
  max-height: 290px; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #c4d4ea; border-radius: 10px; background: white;
  box-shadow: 0 10px 30px rgb(30 48 75 / 12%); padding: 5px;
}
.stock-results > [role=option] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.stock-results > [role=option]:hover, .stock-results > [aria-selected=true] { background: var(--gold-soft); }
.stock-results strong, .stock-results small { display: block; }
.stock-results strong { font-size: 14px; font-weight: 600; }
.stock-results small { color: var(--muted); font-size: 12px; }
.stock-results b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-selection { font-size: 13px; margin: 10px 0 2px; color: var(--navy); overflow-wrap: anywhere; }
[data-stock-count] { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 1000px) {
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .sidebar { position: static; width: auto; padding: 16px 18px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 0 14px; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
  .sidebar nav a { padding: 9px 12px; flex-shrink: 0; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 0; padding: 10px 0 0; }
  .sidebar-foot button { font-size: 12px; }
  .content { margin-left: 0; padding: 24px 16px; }
  .dashboard-grid, .detail-grid, .club-grid { grid-template-columns: minmax(0, 1fr); }
  .search input { min-width: 0; }
  .rep-profile { gap: 16px; flex-wrap: wrap; }
  .panel { padding: 20px; }
  .hero, .profile-hero, .league-hero, .club-hero, .authority-banner { padding: 24px; }
  .profile-hero .avatar.xl { width: 84px; height: 84px; flex-basis: 84px; }
  .profile-hero { gap: 18px; }
  .profile-hero h1 { font-size: 27px; }
  .section-head { gap: 10px; flex-wrap: wrap; }
  .section-head h2, .panel > h2 { font-size: 20px; }
  .login-card { padding: 32px; }
  .stock-results > [role=option] { padding: 10px 8px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

/* Shared point tooltip for member and market charts. */
.chart-plot { position: relative; }
.price-chart-svg { cursor: crosshair; }
.chart-tooltip {
  position: fixed; z-index: 30; pointer-events: none;
  width: max-content; max-width: min(300px, calc(100vw - 16px));
  padding: 12px 16px; border: 1px solid #cad8eb; border-radius: 10px;
  background: #fff; color: var(--ink); box-shadow: 0 6px 24px rgb(30 48 75 / 16%);
}
.chart-tooltip time, .chart-tooltip strong, .chart-tooltip small { display: block; }
.chart-tooltip time, .chart-tooltip small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.chart-tooltip strong { font-size: 22px; line-height: 1.5; margin-top: 4px; font-variant-numeric: tabular-nums; }
.chart-tooltip small { margin-top: 6px; }
.chart-readout {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
