:root {
  color-scheme: light;
  --sky: #a9d2ec;
  --sky-pale: #dceef8;
  --cream: #fff8e9;
  --paper: #fffdf7;
  --ink: #17263f;
  --muted: #5d6879;
  --red: #ff6247;
  --green: #2a9453;
  --line: rgba(23, 38, 63, 0.18);
  --shadow: 7px 8px 0 var(--ink);
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--sky-pale); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--sky-pale); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.topbar { width: min(1220px, calc(100% - 48px)); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.wordmark { color: inherit; font: 800 .8rem var(--mono); text-decoration: none; }.wordmark span { opacity: .48; }
.account-menu { position: relative; z-index: 3; }
.account-menu summary { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; min-width: 176px; max-width: min(280px, calc(100vw - 32px)); display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 12px 32px rgba(23,38,63,.14); }
.account-menu-name { padding: 8px 10px; color: var(--muted); font-size: .76rem; font-weight: 700; overflow-wrap: anywhere; }
.account-menu-panel button { padding: 11px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.account-menu-panel button:hover, .account-menu-panel button:focus-visible { background: var(--sky-pale); }
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: clamp(60px, 12vh, 120px) 0 60px; display: flex; flex-direction: column; align-items: center; gap: 36px; }
h1, h2 { margin: 0; font-family: var(--body); font-weight: 700; letter-spacing: -.035em; }
h1 { font-size: 28px; line-height: 1.3; }
h2 { font-size: 24px; line-height: 1.3; }
.portal { width: min(100%, 420px); min-width: 0; }
.panel { padding: 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 36px rgba(23,38,63,.06); }
#login-title { margin-bottom: 28px; text-align: center; }
.message:empty { display: none; }
.panel-copy { overflow-wrap: anywhere; margin: 20px 0 26px; color: var(--muted); line-height: 1.7; }
.google-button, .primary-link, .secondary-button { min-height: 54px; border: 2px solid var(--ink); font-weight: 800; cursor: pointer; }
.google-button { width: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 13px; color: var(--ink); background: white; border-radius: 12px; box-shadow: none; }.google-button span { width: 25px; height: 25px; display: grid; place-items: center; color: #4285f4; font-family: Arial, sans-serif; font-size: 22px; }
.google-button:hover, .secondary-button:hover, .primary-link:hover { transform: translate(2px,2px); box-shadow: 1px 2px 0 var(--ink); }
.link-button { padding: 8px; color: var(--muted); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }.panel > .link-button { width: 100%; margin-top: 15px; }
.legacy-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }.legacy-panel summary { color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }.legacy-panel > p { margin: 18px 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
form { display: grid; gap: 15px; }label { display: grid; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 750; }input { width: 100%; min-height: 49px; padding: 0 14px; color: var(--ink); background: white; border: 1.5px solid var(--line); border-radius: 10px; outline: none; }input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,98,71,.24); }
.secondary-button { padding: 0 18px; color: var(--ink); background: var(--cream); border-radius: 12px; box-shadow: 3px 4px 0 var(--ink); }.secondary-button.compact { min-height: 44px; }
.message { min-height: 1.4em; margin: 15px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }.message.error { color: #a33425; }
.session-message:empty { display: none; }.session-message:not(:empty) { margin: 0 0 14px; padding: 11px 14px; background: var(--cream); border: 1px solid var(--red); border-radius: 10px; }
.account-id { margin: -12px 0 22px; color: var(--muted); font: 700 .69rem var(--mono); word-break: break-all; }.link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }.link-actions .link-button { font-size: .76rem; }
.status-stamp { display: inline-block; margin-bottom: 22px; padding: 7px 11px; color: white; background: var(--red); border-radius: 999px; font: 800 .68rem var(--mono); letter-spacing: .08em; }
.feature-links { display: grid; gap: 13px; }.feature-card { position: relative; padding: 17px 48px 17px 18px; display: grid; gap: 4px; color: inherit; background: var(--sky-pale); border: 1.5px solid var(--ink); border-radius: 13px; text-decoration: none; transition: transform 150ms ease; }.feature-card strong { font-size: .98rem; }.feature-card span { color: var(--muted); font-size: .76rem; }.feature-card i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 900; }.feature-card:hover { transform: translateX(4px); }
.empty-state { color: var(--muted); font-size: .85rem; }.primary-link { margin-top: 20px; padding: 0 20px; display: flex; align-items: center; justify-content: center; color: white; background: var(--ink); border-radius: 12px; box-shadow: 3px 4px 0 var(--red); text-decoration: none; }
.admin-section { width: 100%; min-width: 0; grid-column: 1 / -1; margin-top: 35px; padding: clamp(24px,4vw,40px); background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }.admin-tools { display: flex; gap: 10px; align-items: end; }.search-field input { min-width: 250px; }.admin-help { margin: 18px 0 22px; color: var(--muted); font-size: .84rem; }.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }table { width: 100%; min-width: 860px; border-collapse: collapse; background: white; }th, td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: center; font-size: .76rem; }th { background: var(--sky-pale); font-weight: 800; }th:first-child, td:first-child { position: sticky; left: 0; z-index: 1; min-width: 190px; text-align: left; background: white; }th:first-child { background: var(--sky-pale); }td:first-child strong, td:first-child span { display: block; }td:first-child span { margin-top: 3px; color: var(--muted); font-size: .68rem; }.check-control { min-height: 32px; place-items: center; }.check-control input { width: 20px; min-height: 20px; accent-color: var(--red); }.save-button { padding: 8px 13px; color: white; background: var(--ink); border: 0; border-radius: 8px; cursor: pointer; }.no-results { padding: 26px; color: var(--muted); text-align: center !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
button:disabled { cursor: wait; opacity: .58; }button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
@media (max-width: 860px) { .admin-heading { align-items: stretch; flex-direction: column; }.admin-tools { align-items: stretch; }.search-field { flex: 1; }.search-field input { min-width: 0; }.topbar { width: calc(100% - 32px); } }
@media (max-width: 520px) { main { width: calc(100% - 32px); padding-top: 64px; }.panel { padding: 28px; }.admin-tools { flex-direction: column; } }

.allowlist-form { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0; }
.allowlist-form input { flex:1; min-width:180px; }
#login-allowlist { margin:24px 0; }

/* Signed-in home: primary destination first, account administration folded. */
body[data-view="account"] main { padding-top: 56px; gap: 28px; }
body[data-view="account"] .portal { width: min(100%, 760px); }
#account-view { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#account-title { margin-bottom: 24px; }
.feature-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-card { min-height: 104px; padding: 24px 48px 24px 24px; align-content: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.feature-card strong { font-size: 18px; }
.feature-card span { font-size: 13px; }
.feature-card i { right: 24px; font-size: 22px; }
.feature-card-primary { grid-column: 1 / -1; min-height: 148px; color: white; background: var(--ink); border-color: var(--ink); }
.feature-card-primary strong { font-size: 28px; }
.feature-card-primary span { color: #c4d5e8; }
.admin-section { width: min(100%, 760px); margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; background: rgba(255,253,247,.65); }
.admin-section > summary { padding: 20px 24px; cursor: pointer; font-size: 14px; font-weight: 700; }
.admin-content { padding: 0 24px 24px; }
.admin-heading { justify-content: flex-end; }
@media (max-width: 520px) { body[data-view="account"] main { padding-top: 36px; }.feature-links { gap: 12px; }.feature-card { padding: 20px 34px 20px 18px; }.feature-card strong { font-size: 16px; }.feature-card-primary strong { font-size: 26px; }.feature-card i { right: 16px; }.feature-card-primary { min-height: 136px; }.admin-content { padding: 0 16px 20px; } }
