/* Shared warm-white / soft-yellow palette for learning, accounts and administration.
   Yellow carries emphasis; readable text, controls and keyboard focus stay dark. */
:root {
  color-scheme: light;
  --app-bg: #fbfaf7;
  --app-paper: #fffefb;
  --app-subtle: #f4f1e9;
  --app-ink: #302c29;
  --app-muted: #716b60;
  --app-line: #e7e2d7;
  --app-control-border: #999080;
  --app-accent: #ffe58a;
  --app-accent-hover: #ffdb61;
  --app-accent-soft: #fff5ce;
  --app-accent-line: #dfc463;
  --app-accent-ink: #493d1d;
  --app-focus: #7a5d16;
  --app-danger: #a63b36;
  --app-danger-soft: #fff0eb;
  --app-danger-line: #c27a6f;
  --app-media: #282623;
  --app-on-dark: #fffefb;
  --app-scrollbar: #c7beac;
}
::selection { background: var(--app-accent); color: var(--app-ink); }
.platform-surface{--p-bg:var(--app-bg);--p-paper:var(--app-paper);--p-ink:var(--app-ink);--p-muted:var(--app-muted);--p-line:var(--app-line);--p-accent:var(--app-accent);color:var(--p-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:15px;line-height:1.65;font-synthesis:none}.platform-surface *{box-sizing:border-box}.platform-surface [hidden]{display:none!important}.platform-surface button,.platform-surface input,.platform-surface select,.platform-surface textarea{font:inherit}.platform-surface button,.platform-surface a,.platform-surface select{touch-action:manipulation}.platform-surface a{color:var(--app-accent-ink);text-decoration:none}.platform-surface button{cursor:pointer}.platform-surface button:disabled{opacity:1;cursor:not-allowed;background:var(--app-subtle);color:var(--app-muted);border-color:var(--app-line)}.platform-surface :focus:not(:focus-visible){outline:none}.platform-surface :focus-visible{outline:2px solid var(--app-focus);outline-offset:3px}.platform-surface input:focus,.platform-surface textarea:focus{outline:2px solid var(--app-focus);outline-offset:1px}.p-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid var(--p-line);border-radius:10px;background:var(--app-paper);color:var(--p-ink);font-weight:600}.p-button.primary{border-color:var(--app-accent-line);background:var(--p-accent);color:var(--p-ink)}.p-button.quiet{border-color:transparent;background:transparent}.p-button.danger{color:var(--app-danger)}.p-button.small{padding:7px 12px;font-size:13px}.p-form{display:grid;gap:18px}.p-field{display:grid;gap:7px;min-width:0;font-weight:600}.p-field input,.p-field select,.p-field textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--app-control-border);border-radius:9px;background:var(--app-paper);color:var(--p-ink);font-weight:400;font-size:16px}.p-field textarea{resize:vertical;min-height:90px}.p-field small,.p-muted{font-weight:400;color:var(--p-muted);font-size:13px}.p-error{padding:12px 14px;background:var(--app-danger-soft);border-radius:9px;color:var(--app-danger);font-size:14px;overflow-wrap:anywhere}.p-notice{padding:12px 14px;border-radius:9px;background:var(--app-subtle);color:var(--app-muted);font-size:14px}.p-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.p-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.p-card{padding:24px;background:var(--p-paper);border:1px solid var(--p-line);border-radius:14px}.p-card h2,.p-card h3{margin:0 0 10px;line-height:1.4}.p-card p{margin:8px 0}.p-badge{display:inline-flex;padding:3px 9px;border-radius:20px;background:var(--app-subtle);color:var(--app-muted);font-size:12px;white-space:nowrap}.p-badge.failed{background:var(--app-danger-soft);color:var(--app-danger)}.p-badge.draft,.p-badge.queued,.p-badge.running{background:var(--app-accent-soft);color:var(--app-accent-ink)}.p-empty{padding:35px 18px;text-align:center;color:var(--p-muted)}.p-check{display:flex;align-items:flex-start;gap:10px;font-size:14px}.p-check input{margin-top:5px;min-width:18px;min-height:18px;accent-color:var(--app-focus)}.p-status{min-height:24px;color:var(--p-muted);font-size:13px}.p-progress{display:block;width:100%;height:9px;margin:10px 0;accent-color:var(--app-focus)}.p-auth-page{margin:0;background:var(--p-bg);min-height:100dvh;padding:35px 22px}.p-brand{display:inline-flex;align-items:center;gap:10px;font-size:19px;font-weight:750}.p-brand img{width:34px;height:34px}.p-auth-card{max-width:440px;margin:8vh auto 28px}.p-auth-card h1{font-size:29px;margin:0 0 8px;letter-spacing:-1px}.p-auth-tabs{display:flex;padding:5px;gap:5px;background:var(--app-subtle);border-radius:12px;margin:24px 0}.p-auth-tabs button{flex:1;border:0;border-radius:8px;padding:10px;background:transparent;color:var(--p-muted);min-height:44px}.p-auth-tabs button[aria-pressed=true]{background:var(--app-paper);color:var(--p-ink);box-shadow:0 1px 3px rgba(48,44,41,0.063)}.p-auth-footer{text-align:center;max-width:440px;margin:auto}.p-route{max-width:1050px;margin:0 auto;padding:28px 24px 100px}.p-route h1{font-size:30px;margin:0 0 8px;letter-spacing:-1px}.p-route-settings{margin:24px 0}.p-route-settings .p-form{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}.p-route-settings .p-row,.p-route-settings .p-error,.p-route-settings .p-status{grid-column:1/-1}.p-route-list{display:grid;gap:14px;padding:0;list-style:none}.p-route-step{display:grid;grid-template-columns:36px 1fr;gap:15px}.p-route-number{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--app-subtle);color:var(--app-muted);font-size:13px}.p-route-step h3{font-size:18px}.p-route-step ol{padding-left:22px;color:var(--app-muted);font-size:14px}.p-route-step .p-row{margin-top:18px}.p-route-completed{border-color:var(--app-accent-line)}.p-route-completed .p-route-number{background:var(--p-accent);color:var(--p-ink)}.p-route-courses{display:grid;gap:8px;margin-top:14px}.p-route-course{text-align:left;justify-content:flex-start;width:100%;font-weight:500}.p-route-method{margin-top:24px}.p-route-method summary{cursor:pointer;font-weight:600;min-height:44px;display:flex;align-items:center}.p-route-method ol{padding-left:22px;color:var(--app-muted)}.p-route-description{max-width:650px}.p-top-space{margin-top:20px}@media(max-width:680px){.p-grid-two{grid-template-columns:1fr}.p-card{padding:20px}.p-route{padding:22px 16px 100px}.p-route h1{font-size:26px}.p-route-settings .p-form{grid-template-columns:1fr}.p-route-step{grid-template-columns:28px 1fr;gap:10px}.p-route-number{width:27px;height:27px}.p-route-step .p-row>.p-button{flex:1}.p-auth-page{padding:24px 18px}.p-auth-card{margin-top:6vh}.p-auth-card h1{font-size:27px}}@media(prefers-reduced-motion:no-preference){.platform-surface .p-button{transition:background-color .12s ease,border-color .12s ease}.platform-surface .p-button:hover:not(:disabled){filter:none}}
.route-page{margin:0;background:var(--app-bg);color:var(--app-ink);min-height:100dvh;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}.route-page-header{max-width:1050px;margin:0 auto;padding:24px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px}.route-page-header a{color:var(--app-ink);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}.route-page-header a:focus-visible{outline:2px solid var(--app-focus);outline-offset:3px}.route-page-header strong{font-size:17px;white-space:nowrap}.p-route-step>.p-route-number+div{min-width:0}.p-route-course{overflow-wrap:anywhere}.p-route-step .p-badge{margin:0 5px 5px 0}@media(max-width:680px){.route-page-header{padding:12px 16px}.route-page-header strong{font-size:15px}}
/* Account actions stay within the existing learning header at narrow widths. */
.ui-simple #mobile-route-button,.ui-simple #member-logout{min-height:44px;white-space:nowrap;padding:8px 10px;font-size:13px}.ui-simple .topbar .room-heading>div{min-width:0}.ui-simple .topbar .room-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-simple .topbar .top-actions{flex-shrink:0}@media(min-width:1101px){.ui-simple #mobile-route-button{display:none}}@media(max-width:620px){.ui-simple .topbar{gap:8px}.ui-simple .topbar .room-heading{flex:1;min-width:0;gap:6px}.ui-simple .topbar .room-avatar{display:none}.ui-simple .topbar .room-heading strong{font-size:13px}.ui-simple .topbar .top-actions{gap:2px}.ui-simple .topbar .mobile-guide{display:inline-flex;min-width:44px;min-height:44px}.ui-simple #mobile-route-button,.ui-simple #member-logout{padding:8px 6px;font-size:12px}.ui-simple .topbar .mobile-library{min-width:60px;min-height:44px;padding:0 8px}}

/* The same control states on touch screens and with a keyboard. */
.platform-surface .p-field :is(input,textarea)::placeholder { color: var(--app-muted); opacity: 1; }
.platform-surface .p-field :is(input,select,textarea):disabled { background: var(--app-subtle); color: var(--app-muted); opacity: 1; }
.platform-surface [aria-busy="true"] button:disabled { cursor: progress; }
.platform-surface .p-button:active:not(:disabled) { background: var(--app-accent-soft); }
.platform-surface .p-button.primary:active:not(:disabled) { background: var(--app-accent-hover); }
.platform-surface .p-auth-tabs button[aria-pressed="true"],
.platform-surface .p-route-number { background: var(--app-accent-soft); color: var(--app-accent-ink); }
.platform-surface .p-badge.published,
.platform-surface .p-badge.ready,
.platform-surface .p-badge.used { background: var(--app-accent-soft); color: var(--app-accent-ink); }
.platform-surface .p-badge.archived { background: var(--app-subtle); color: var(--app-muted); }
.platform-surface .p-route-completed .p-route-number { background: var(--app-accent); color: var(--app-ink); }
.platform-surface .p-auth-footer a { text-decoration: underline; text-underline-offset: 3px; }
.platform-surface .p-progress::-webkit-progress-bar { background: var(--app-subtle); border-radius: 8px; }
.platform-surface .p-progress::-webkit-progress-value { background: var(--app-focus); border-radius: 8px; }
.platform-surface .p-progress::-moz-progress-bar { background: var(--app-focus); border-radius: 8px; }
@media (hover:hover) {
  .platform-surface .p-button:hover:not(:disabled) { background: var(--app-subtle); }
  .platform-surface .p-button.primary:hover:not(:disabled) { background: var(--app-accent-hover); }
  .platform-surface .p-button.danger:hover:not(:disabled) { background: var(--app-danger-soft); }
  .platform-surface .p-auth-tabs button:hover:not(:disabled) { color: var(--app-ink); }
}
@media (max-width:680px) {
  .platform-surface .p-route-step .p-row { align-items: stretch; }
  .platform-surface .p-route-step .p-row > .p-button { min-width: 0; }
  .route-page-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion:reduce) {
  .platform-surface *, .platform-surface *::before, .platform-surface *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
