:root {
  color-scheme: dark;
  --bg: #15171b;
  --ink: #f4f5f7;
  --muted: #afb2bc;
  --line: #353840;
  --card: #23262c;
  --surface: #1c1f24;
  --blue: #ffda40;
  --blue-2: #efbe26;
  --teal: #ffda40;
  --nav: 70px;
  --accent-ink: #18160e;
}

body { background: #101216; color: var(--ink); font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif; }
.app-shell, .page { background: var(--bg); }
.app-shell { width: min(100%, 520px); box-shadow: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.app-shell [hidden] { display: none !important; }
.ui-icon { flex: none; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon.ai-symbol { stroke: none; }
.teach-wordmark { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 24px; font-weight: 850; letter-spacing: -.03em; white-space: nowrap; }
.teach-mark { width: 30px; height: 24px; object-fit: contain; }
.teach-header, .teach-topbar, .map-header, .profile-heading {
  display: flex; justify-content: space-between; align-items: center;
  height: calc(58px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 18px 0;
  background: var(--bg); color: var(--ink);
  border: 0; box-shadow: none; text-align: left;
}
.teach-header h1, .map-header h1, .profile-heading h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: 0; }
.map-header h1, .profile-heading h1, .teach-topbar #teachTitle { color: var(--ink); }
.map-header .eyebrow, .profile-heading #productFeedbackButton { display: none; }
.city-picker-button, .product-share-button {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; min-height: 34px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: none;
  font-size: 12px; white-space: nowrap;
}
.city-picker-button > svg:first-child { width: 15px; height: 15px; color: var(--blue); }
.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 8px var(--safe); background: #191b20; border-top: 1px solid var(--line); box-shadow: none; z-index: 1200; }
.nav-item { gap: 5px; color: #bfc2ca; font-size: 12px; font-weight: 600; }
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--blue); }
.nav-item.active::before { display: none; }
.nav-item[data-target="home"].active svg { fill: currentColor; }

.home-page.active { display: flex; flex-direction: column; }
.home-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 0 18px 19px; }
.home-hero { position: relative; isolation: isolate; padding: 19px 0 0; }
.home-hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; right: -18px;
  width: min(55%, 260px); height: 140px;
  background: url(teach-hero.webp) no-repeat right top / cover; opacity: .75; pointer-events: none;
}
.home-hero h1 { margin: 0 0 7px; font-size: clamp(29px, 8.2vw, 38px); line-height: 1.2; letter-spacing: -.04em; }
.home-hero > p { margin: 0 0 20px; color: #c8c9cd; font-size: 13px; line-height: 1.5; }
.home-search { display: grid; gap: 11px; padding: 16px 14px; margin: 0 -3px; border: 1px solid #d6ac32; border-radius: 18px; background: #30291b; box-shadow: inset 0 0 23px #fbc82725, 0 0 13px #fbc8271c; }
.home-input { display: flex; align-items: center; gap: 7px; min-height: 49px; padding: 0 10px; color: #ffdf75; border: 1px solid #766446; border-radius: 12px; background: #332e22; }
.home-input .ui-icon { width: 18px; height: 18px; }
.home-input input { min-width: 0; flex: 1; height: 44px; padding: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; }
.home-input input::placeholder { color: #c5bfb2; }
.home-search > button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; border: 1px solid #ffe768; border-radius: 11px; background: var(--blue); color: var(--accent-ink); font-size: 16px; font-weight: 850; }
.home-search > button .ui-icon { width: 16px; height: 16px; }
.home-section { margin-top: 22px; }
.home-section h2 { margin: 0; font-size: 19px; font-weight: 800; }
.home-section-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.home-section-title button { display: flex; align-items: center; padding: 5px 0 5px 8px; color: var(--muted); background: transparent; font-size: 13px; }
.home-section-title button svg { width: 15px; height: 15px; }
.home-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.home-shortcuts button { display: flex; align-items: center; gap: 7px; min-height: 47px; padding: 7px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 700; text-align: left; }
.home-shortcuts button svg { color: var(--blue); }
.home-orders { display: grid; gap: 8px; }
.home-order-row { position: relative; min-width: 0; border: 1px solid #2b2e35; background: var(--card); border-radius: 12px; }
.home-order-detail { display: grid; gap: 7px; padding: 11px 12px; width: 100%; text-align: start; background: none; color: var(--ink); }
.home-order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 7px; font-size: 14px; }
.home-order-head strong { min-width: 0; overflow-wrap: anywhere; }
.home-order-head b { color: var(--blue); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-order-tags { display: flex; flex-wrap: wrap; gap: 5px; padding-right: 42px; }
.home-order-tags span, .tag, .tag.warn, .tag.special, .tag.online { border: 0; background: #30333b; color: #e3e4e7; padding: 2px 6px; font-size: 12px; border-radius: 5px; overflow-wrap: anywhere; }
.home-order-detail small { color: var(--muted); font-size: 12px; padding-right: 38px; overflow-wrap: anywhere; }
.home-order-star { position: absolute; right: 4px; bottom: 4px; min-width: 38px; min-height: 36px; padding: 0; background: transparent; color: var(--muted); font-size: 20px; }
.home-order-star[aria-pressed="true"] { color: var(--blue); }

.teach-tabs { display: flex; height: 46px; border-bottom: 1px solid #2a2c32; }
.teach-tabs button { position: relative; flex: 1; min-width: 0; padding: 6px 10px 10px; background: none; color: var(--muted); font-size: 16px; font-weight: 650; }
.teach-tabs button[aria-pressed="true"] { color: var(--blue); }
.teach-tabs button[aria-pressed="true"]::after { position: absolute; content: ""; bottom: 0; left: 50%; width: 42px; height: 3px; background: var(--blue); border-radius: 3px 3px 0 0; transform: translateX(-50%); }
#orderTabs { position: absolute; z-index: 1100; top: calc(58px + env(safe-area-inset-top, 0px)); inset-inline: 0; }
.map-header .map-header-actions { right: 16px; }
.map-wrap {
  top: calc(104px + env(safe-area-inset-top, 0px));
  background: #e8eef5;
  color-scheme: light;
}
.map-wrap:has(#mapPlaceholder:not([hidden]))::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(teach-map-fallback.webp) center / cover no-repeat;
  filter: invert(1);
  opacity: .78;
  pointer-events: none;
}
.city-picker-button { top: 11px; left: 14px; z-index: 500; }
.map-service-chip { z-index: 500; top: 53px; left: 14px; background: #26282c; border-color: #4c4434; color: #dacfba; box-shadow: none; padding: 5px 9px; }
.map-wrap:has(#mapPlaceholder:not([hidden])) .map-service-chip { display: none; }
.map-placeholder { top: 100px; width: auto; min-width: 160px; max-width: 85%; background: #fffffff0; border-color: #c1cddd; padding: 10px 12px; color: #26374e; border-radius: 12px; box-shadow: none; }
.map-placeholder-icon, .map-placeholder p { display: none; }
.map-placeholder strong { font-size: 12px; }
.map-header .icon-button { top: calc(114px + env(safe-area-inset-top, 0px)); right: 14px; }
.icon-button, .icon-button.is-disabled { background: var(--card); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.order-panel { color: var(--ink); background: #22252a; border: 1px solid #42454d; border-bottom: 0; border-radius: 21px 21px 0 0; box-shadow: 0 -9px 26px #0004; }
.panel-drag { height: 31px; padding: 0 12px; }
.grabber { width: 44px; height: 4px; margin: 8px auto 5px; background: #7e8189; }
.panel-peek { justify-content: flex-end; }
.panel-peek b { display: none; }
.panel-peek small, .recommendation-hint { color: var(--muted); font-size: 11px; }
.panel-content { padding: 0 12px; }
.panel-title, .recommendation-hint { display: none; }
.filter-entry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0 0 8px; }
.filter-entry-grid > button { display: flex; justify-content: space-between; min-width: 0; min-height: 39px; height: auto; padding: 5px 7px; background: #30333a; border: 1px solid #41444c; color: var(--ink); border-radius: 10px; box-shadow: none; gap: 2px; }
.filter-entry-grid > button span { min-width: 0; }
.filter-entry-grid > button small { color: #c0c3ca; font-size: 11px; }
.filter-entry-grid > button strong { color: var(--ink); font-size: 11px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.filter-entry-grid > button svg { width: 12px; height: 12px; color: #c0c3ca; }
.online-filter-shortcut { align-self: flex-start; margin: 0 0 9px; min-height: 34px; border: 1px solid #41444c; color: #eceef0; background: #2c3036; border-radius: 9px; }
.online-filter-shortcut[aria-pressed="true"] { color: var(--accent-ink); background: var(--blue); border-color: var(--blue); }
.favorites-in-orders { position: absolute; inset: calc(104px + env(safe-area-inset-top, 0px)) 0 0; }
.favorites-in-orders .favorites-list { inset: 0; }
.favorite-row { color: var(--ink); background: var(--card); border-color: var(--line); box-shadow: none; }
.favorite-row strong { color: var(--ink); }
.favorite-row button:first-child span { color: var(--muted); }
.favorites-login, .favorites-retry, .retry-orders { background: var(--blue); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.order-card, .result-card { position: relative; background: #282b31; color: var(--ink); border: 1px solid #363940; border-radius: 11px; box-shadow: none; padding: 10px 11px; }
.order-entry { position: relative; }
.order-entry .order-card, .order-entry .result-card { padding-bottom: 8px; }
.order-entry .home-order-star { bottom: 3px; }
.compact-favorite-controls { position:absolute; right:4px; bottom:4px; display:inline-flex; align-items:center; gap:5px; }
.compact-favorite-controls .home-order-star { position:static; min-width:32px; }
.detail-favorite-controls { display:inline-flex; align-items:center; gap:9px; margin-left:auto; }
.favorite-signal { display:inline-flex; align-items:flex-end; gap:2px; color:var(--muted); font-size:.7rem; white-space:nowrap; }
.favorite-signal i { width:4px; height:5px; border-radius:1px; background:currentColor; opacity:.25; }
.favorite-signal i:nth-child(2) { height:8px; }
.favorite-signal i:nth-child(3) { height:11px; }
.favorite-signal b { margin-left:3px; line-height:1; font-variant-numeric:tabular-nums; }
.favorite-signal[data-level="1"] { color:#25a65a; }
.favorite-signal[data-level="2"] { color:#d4a10b; }
.favorite-signal[data-level="3"] { color:#e4545d; }
.favorite-signal[data-level="1"] i:first-child,
.favorite-signal[data-level="2"] i:nth-child(-n+2),
.favorite-signal[data-level="3"] i { opacity:1; }
.order-reminder-heading { margin-top:20px; }
.order-reminder-row strong { white-space:normal; line-height:1.45; }
.order-card:hover, .result-card:hover, .order-card.focused { border-color: #908047; box-shadow: none; }
.card-head h3, .result-card .result-head h3 { color: var(--ink); font-size: 15px; line-height: 1.4; }
.card-head, .result-card .result-head { align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.card-head h3, .result-card .result-head h3 { min-width: min(100%, 136px); }
.card-pay-inline { color: var(--blue); font-size: 14px; text-align: end; font-weight: 800; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-number, .card-meta, .card-location, .location-pending, .location-distance, .result-card .result-location, .result-card .result-reasons { color: var(--muted); }
.card-meta { margin-top: 5px; line-height: 1.45; }
.card-location, .result-card .result-reasons { margin-top: 5px; padding: 3px 36px 0 0; border-color: #383a40; }
.card-location svg, .card-meta svg { color: #a8aab2; }
.card-recommendation { color: #d4ccb2; margin-top: 4px; }
.card-recommendation b, .card-recommendation.muted b { padding: 1px 6px; background: #3c3421; color: #ffdf8d; }
.tag-row { margin-top: 3px; }
.card-meta > span, .card-location .location-copy { color: var(--muted); }
.order-entry .order-card .card-location {
  grid-template-columns:15px minmax(0,1fr) auto;
  padding-inline-end:4.25rem;
}
.order-entry .order-card .location-distance,
.order-entry .order-card .location-pending { grid-column:3; white-space:nowrap; }
.card-location-line { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.card-location-line .location-distance { flex:none; white-space:nowrap; font-size:11px; }
.home-order-detail .card-location-line,
.order-entry .result-card .card-location-line { padding-inline-end:4.25rem; }
.favorite-row button:first-child .card-location-line { display:flex; }
.empty, .empty h3 { color: var(--muted); }

.teach-topbar { justify-content: flex-start; }
.teach-topbar h1 { display: flex; font-size: 24px; }
.teach-topbar .clear-button { margin-left: auto; color: var(--muted); background: var(--card); border-color: var(--line); box-shadow: none; font-size: 12px; }
.teach-page > .ai-connection { display: none; }
.teach-workspace { inset: calc(58px + env(safe-area-inset-top, 0px)) 0 66px; padding: 10px 14px 14px; }
.teach-brand-copy h2 { color: var(--ink); }
.teach-brand-copy p { color: var(--muted); }
.bot-icon, .avatar-small.bot-avatar { background: var(--blue); color: var(--accent-ink); box-shadow: none; }
.teach-guidance { margin-top: 14px; padding: 12px; color: var(--ink); background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.prompt-examples { margin-top: 13px; }
.prompt-examples button { background: var(--card); color: var(--ink); border-color: var(--line); border-radius: 11px; box-shadow: none; }
.prompt-examples button:active { background: #35383f; }
.prompt-examples span { color: var(--muted); }
.message.user p { background: var(--blue); color: var(--accent-ink); box-shadow: none; }
.message.ai p { color: var(--ink); background: #24272d; border-color: var(--line); box-shadow: none; }
.avatar-small.user-avatar { background: #30333a; color: var(--ink); }
.teach-results { gap: 8px; }
.teach-results .result-card { width: 100%; margin: 0; }
.teach-more { background: var(--card); color: var(--blue); border-color: var(--line); }
.composer { height: 64px; margin: 0; padding: 8px 14px 10px 56px; grid-template-columns: minmax(0, 1fr) 43px; background: var(--bg); border-color: #292c31; box-shadow: none; }
.composer-tools { position: absolute; z-index: 11; left: 12px; bottom: 15px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--card); font-size: 24px; }
.composer-tools[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); }
.teach-quick-prompts { position: absolute; z-index: 12; bottom: 63px; left: 12px; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.teach-quick-prompts button, .teach-followup { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); }
.teach-quick-prompts button svg { color: var(--blue); }
.teach-followup { margin: 10px 0 4px; color: var(--blue); font-size: 13px; }
.composer input { height: 44px; padding: 0 12px; color: var(--ink); background: #292c33; border: 1px solid #454852; font-size: 14px; }
.composer button, .composer button:disabled { width: 43px; height: 43px; background: var(--blue); color: var(--accent-ink); }
.composer button:disabled { opacity: .48; }

.updates-list { padding: 14px 13px; display: grid; row-gap: 8px; }
.update-row { display: grid; grid-template-columns: 41px 1fr auto 16px; align-items: center; gap: 9px; min-height: 65px; padding: 10px 11px; color: var(--ink); text-align: left; background: var(--card); border: 1px solid #2d3037; border-radius: 12px; }
.update-row > svg:first-child { padding: 9px; width: 40px; height: 40px; border-radius: 50%; background: #3b3421; color: var(--blue); }
.update-row > svg:last-child { width: 15px; height: 15px; color: var(--muted); }
.update-row strong, .update-row small { display: block; }
.update-row strong { font-size: 15px; }
.update-row small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.pending-tag { color: #d5c89b; font-size: 12px; white-space: nowrap; }
.updates-list { position: absolute; inset: calc(104px + env(safe-area-inset-top, 0px)) 0 0; overflow-y: auto; align-content: start; }
.updates-heading { margin: 2px 3px 4px; color: var(--ink); font-size: 16px; }
.platform-notice-list { display: grid; gap: 8px; }
.platform-user-status { margin: 2px 4px 9px; color: var(--muted); font-size: 13px; }
.platform-user-status:empty { display: none; }
.platform-unread-dot { color: var(--blue); font-size: 12px; white-space: nowrap; }
.nav-item[data-unread]:not([data-unread=""])::after {
  content: attr(data-unread); position: absolute; top: 10px; left: calc(50% + 7px);
  min-width: 15px; padding: 2px 3px; border-radius: 999px; background: var(--blue);
  color: var(--accent-ink); font-size: 9px; line-height: 1; text-align: center;
}
.message-dialog { width: min(calc(100% - 32px), 360px); padding: 20px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.message-dialog::backdrop { background: #0009; }
.message-dialog h2 { margin: 0 0 10px; font-size: 20px; }
.message-dialog p { color: var(--muted); }
.message-dialog form button { width: 100%; }
.platform-dialog { width: min(calc(100% - 32px), 460px); max-height: calc(100dvh - 44px); }
.platform-content-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); line-height: 1.65; padding-bottom: 16px; }
.platform-content-date { font-size: 13px; }
.platform-dialog-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.45fr); gap: 8px; }
.platform-dialog-actions button:not(.auth-primary) { min-height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); }

.profile-heading { justify-content: flex-start; }
.profile-scroll { height: 100%; padding: calc(68px + env(safe-area-inset-top, 0px)) 14px 25px; }
.teacher-identity-main { display: grid; width: 100%; grid-template-columns: 60px 1fr 18px; align-items: center; gap: 13px; padding: 12px 5px 20px; color: var(--ink); background: none; text-align: left; }
.profile-avatar { width: 58px; height: 58px; background: #343127; color: var(--blue); border: 1px solid #5d5034; font-size: 24px; }
.teacher-identity-main strong { display: block; font-weight: 850; font-size: 23px; overflow-wrap: anywhere; }
.teacher-identity-main small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.row-chevron { color: var(--muted); font-size: 23px; line-height: 1; }
.teacher-completion { display: grid; width: 100%; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); text-align: left; }
.teacher-completion strong { font-size: 15px; }
.completion-track { display: flex; gap: 10px; align-items: center; }
.completion-track progress { flex: 1; min-width: 0; height: 12px; appearance: none; border: 1px solid #44474f; border-radius: 10px; overflow: hidden; background: #202228; }
.completion-track progress::-webkit-progress-bar { background: #202228; }
.completion-track progress::-webkit-progress-value { background: var(--blue); border-radius: 10px; }
.completion-track progress::-moz-progress-bar { background: var(--blue); border-radius: 10px; }
.completion-track b { font-size: 14px; font-variant-numeric: tabular-nums; }
.teacher-completion small, .teacher-menu small, .guest-profile-note { color: var(--muted); font-size: 12px; }
.teacher-menu { margin-top: 16px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.teacher-menu button { display: flex; gap: 8px; justify-content: space-between; align-items: center; width: 100%; min-height: 57px; padding: 8px 0; border-bottom: 1px solid #363940; background: none; font-weight: 680; text-align: left; }
.teacher-menu button:last-child { border-bottom: 0; }
.teacher-menu button > .ui-icon { margin-right: 3px; }
.teacher-menu button > .row-chevron { margin-left: auto; }
.teacher-menu button small { margin-left: auto; overflow-wrap: anywhere; }
.teacher-menu button small + .row-chevron { margin-left: 0; }
.teacher-account { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.teacher-account button { min-height: 40px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: var(--surface); }
.guest-profile-note { background: transparent; border-color: var(--line); }

.filter-page, .location-picker, .detail-sheet, .auth-sheet-card, .product-dialog > div,
.registration-card, .info-card, .commute-card, .selected-route-panel { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.filter-page-header, .filter-page-footer, .location-picker-header, .location-picker-card, .location-search, .location-search-results,
.detail-box, .detail-section, .auth-tabs, .auth-close, .detail-close, .profile-form input, .profile-form select,
.profile-form input[readonly], .address-picker-button, .auth-form input, .product-dialog input, .product-dialog textarea {
  background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: none;
}
.filter-options button, .filter-page-header button, .location-picker-header button, .location-search-results button, .commute-modes button, .form-actions .secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.filter-options button.active, .filter-options button.selected, .filter-page-footer button, .form-actions .save, .auth-primary, .copy-button,
.commute-navigate, .detail-favorite[aria-pressed="true"] { background: var(--blue); color: var(--accent-ink); border-color: var(--blue); box-shadow: none; }
.registration-card p, .profile-form label, .detail-box span, .filter-page-body > p, .auth-form label { color: var(--muted); }
.detail-favorite { background: #383120; color: var(--blue); }
.toast { background: #3c3d43; color: var(--ink); }
@media (min-width: 700px) {
  .app-shell { border: 1px solid var(--line); border-radius: 18px; }
  .map-header, .teach-topbar, .profile-heading, .bottom-nav { border-radius: 0; }
}
@media (max-width: 360px) {
  .home-scroll { padding-inline: 13px; }
  .home-hero::before { right: -13px; }
  .teach-header, .map-header, .profile-heading { padding-inline: 13px; }
  .filter-entry-grid > button { padding-inline: 5px; }
}
