:root {
  color-scheme: dark;
  --color-background: #02070c;
  --color-surface: #071018;
  --color-image-backdrop: #000;
  --color-gold: #c49145;
  --color-selected: #f4ce67;
  --color-text: #f5f2ea;
  --color-secondary: #aaa7a2;
  --color-border: rgb(196 145 69 / 45%);
  --color-border-soft: rgb(196 145 69 / 20%);
  --color-announcement-border: #8a713f;
  --color-announcement-text: #d6b66f;
  --color-artwork-frame-top: #f7d885;
  --color-artwork-frame-bottom: #e7ad56;
  --color-hover: #111c25;
  --color-pressed: #18222a;
  --color-danger: #ef4444;
  /* Secondary-page card frame: the page header card, dialog headings and the tongxing focus frame.
     Same gold as the settings dialogs' outer frame (--status-accent), so the title card is no longer the brightest line. */
  --page-frame: var(--color-announcement-text);
  /* Toned-down gold of the one primary action (設定視窗「儲存設定」) and of the confirmation dialogs it opens. */
  --gold-action-bright: #d4b566;
  --gold-action: #b48c3d;
  /* Solid gold key (Precision 訂閱鈕、我的頁「查看方案與價格」): face, inner frame line and dark label. */
  --gold-key-face: linear-gradient(180deg, var(--gold-action-bright) 0%, var(--gold-action) 58%, #96702c 100%);
  --gold-key-frame: rgb(255 236 180 / 48%);
  --gold-key-text: #2a1b03;
  /* Dark panel surface shared by the notebook panels and entries and the guide preview. */
  --panel-surface: linear-gradient(145deg, rgb(8 16 22 / 96%), rgb(2 8 13 / 98%));
  /* Gold call-to-action (同星版路「開始搜尋」、筆記本「寫入筆記」、Core「開始探索」): one copy of the frame, text, glow,
     sparkle layer and bottom light. The generated lpa-core-source.css still carries Core's own copy of the same values. */
  --cta-border: #c99a2e;
  --cta-text: #f6d472;
  --cta-glow: radial-gradient(circle at 50% 135%, rgb(234 171 35 / 34%), transparent 55%);
  --cta-shadow-inner: inset 0 0 18px rgb(238 183 52 / 14%);
  --cta-shadow-outer: 0 0 18px rgb(203 148 35 / 16%);
  --cta-sparkle:
    radial-gradient(circle at 6% 54%, rgba(255, 238, 190, .68) 0 .55px, transparent 1.5px),
    radial-gradient(circle at 10% 25%, rgba(255, 222, 127, .9) 0 .7px, transparent 1.7px),
    radial-gradient(circle at 14% 42%, rgba(255, 205, 77, .5) 0 .5px, transparent 1.4px),
    radial-gradient(circle at 18% 72%, rgba(255, 205, 77, .72) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 82%, rgba(255, 232, 164, .58) 0 .65px, transparent 1.6px),
    radial-gradient(circle at 29% 36%, rgba(255, 232, 164, .7) 0 .6px, transparent 1.6px),
    radial-gradient(circle at 36% 68%, rgba(255, 205, 77, .42) 0 .5px, transparent 1.45px),
    radial-gradient(circle at 64% 31%, rgba(255, 205, 77, .4) 0 .55px, transparent 1.5px),
    radial-gradient(circle at 71% 68%, rgba(255, 232, 164, .72) 0 .7px, transparent 1.7px),
    radial-gradient(circle at 77% 83%, rgba(255, 232, 164, .56) 0 .6px, transparent 1.55px),
    radial-gradient(circle at 82% 32%, rgba(255, 205, 77, .74) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 53%, rgba(255, 238, 190, .54) 0 .55px, transparent 1.5px),
    radial-gradient(circle at 92% 74%, rgba(255, 222, 127, .86) 0 .7px, transparent 1.7px),
    repeating-linear-gradient(112deg, transparent 0 19px, rgba(223, 165, 42, .16) 20px, transparent 21px 32px),
    radial-gradient(circle at 12% 72%, rgba(255, 205, 77, .55) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 28%, rgba(255, 205, 77, .48) 0 1px, transparent 2px);
  --cta-light: linear-gradient(90deg, transparent, rgb(242 190 59 / 75%), transparent);
  --cta-light-shadow: 0 0 8px rgb(242 190 59 / 55%);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-latin: Arial, sans-serif;
  /* Inter-first stacks: the notebook screen and feedback dialog, and the tongxing/notebook control rows. */
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui-tc: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --page-inline: 16px;
  --safe-inline-start: env(safe-area-inset-left, 0px);
  --safe-inline-end: env(safe-area-inset-right, 0px);
  --home-inline: 12px;
  --home-draw-side-space: clamp(16px, 5%, 28px);
  --home-logo-aspect-ratio: 1536 / 658;
  --home-announcement-draw-gap: 0px;
  --home-draw-entries-gap: 10px;
  --home-action-summary-gap: 12px;
  /* Leave room for native scroll rounding inside the requested 8–12px range. */
  --home-frame-gap: clamp(9px, 1.25dvh, 11px);
  --home-utilities-nav-gap: clamp(8px, 1.25dvh, 12px);
  --home-utility-hover: rgb(255 255 255 / 6%);
  --home-utility-pressed: rgb(0 0 0 / 18%);
  --home-action-height: 44px;
  /* Both action entries scale together up to this height; on wider screens the pair is centred instead of growing. */
  --home-action-max-height: 50px;
  /* The lottery button shifts toward the draw-card anchor; the row gap and the Core entry compensate for it. */
  --home-lottery-logo-block-space: 5px;
  --home-group-inline: 4px;
  /* Lottery button surface: the Core artwork's interior tones, sampled from its rim bevel, body and lower bevel. */
  --home-entry-surface-top: #2b2213;
  --home-entry-surface: #151008;
  --home-entry-surface-bottom: #211810;
  --gap: 8px;
  /* Corner radii: --radius-sm for small parts (tags, badges, compact dialog controls), --radius for controls, cards,
     panels and dialogs, --radius-pill for capsules. Circles stay 50%; artwork-bound frames keep their own geometry. */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-pill: 999px;
  --nav-height: 70px;
  --target-size: 44px;
  /* Drawn height of a framed text control, sized to its 12–13px label: compact for secondary controls, primary for a
     card's main action. Each keeps the --target-size tap area through an invisible ::after around the frame. */
  --control-compact-height: 30px;
  --control-primary-height: 36px;
  --control-compact-hit-outset: calc((var(--target-size) - var(--control-compact-height)) / 2);
  --control-primary-hit-outset: calc((var(--target-size) - var(--control-primary-height)) / 2);
  --icon-size: 24px;
  --motion-fast: 140ms;
  /* Raised controls (2026-11-10): a faint light on the top edge and a soft shadow under the bottom; pressing scales the
     control to 98% (96% for the dialog's primary actions) without moving anything around it. */
  --control-relief-highlight: inset 0 1px 0 0 rgb(255 255 255 / 9%);
  --control-relief-shadow: 0 2px 3px rgb(0 0 0 / 45%);
  --control-relief: var(--control-relief-highlight), var(--control-relief-shadow);
  --control-press-scale: .98;
  --control-press-strong-scale: .96;
  --control-press-duration: 120ms;
  /* Keys (2026-11-12): a raised key is its face plus a darker lip under the bottom edge. Outside the home action row
     the lip is the control's own bottom border, inside its existing box: nothing around it moves, the face gives up
     the lip's height and the lip stays part of the tap target. The face frame is drawn as an inset 1px line in the
     face's own colour (--key-frame), so the frame closes above the lip. Primary actions take the thicker lip, page
     options the thinner one. Pressing a primary key sinks its face (a transparent top border) until its lip is
     --key-lip-pressed thick. A held or selected option is pressed down to a --key-lip-option-pressed lip under a face
     sunk by --key-option-selected-sink, a selected one with an inner top shadow; its lip ends level with the raised
     neighbours'. The lip colour is the key's base colour mixed toward black; a key on another base colour derives its
     own with the same mix. */
  --key-lip-primary: 3px;
  --key-lip-option: 2px;
  --key-lip-pressed: 1px;
  --key-lip-option-pressed: 1.5px;
  /* The selected sink is a state, so reduced motion keeps it; --key-sink-* are the press movements it sets to 0. */
  --key-option-selected-sink: calc(var(--key-lip-option) - var(--key-lip-option-pressed));
  --key-sink-primary: calc(var(--key-lip-primary) - var(--key-lip-pressed));
  --key-sink-option: var(--key-option-selected-sink);
  --key-lip-mix: 42%;
  --key-lip-color: color-mix(in srgb, var(--color-gold) var(--key-lip-mix), #000);
  /* Border widths snap down to whole pixels (a 1.5px border draws as 1px), so an option key also paints its lip as a
     background layer under its bottom border. Held or selected, the key hides the border lip, moves down by its sink
     (translate, which does not snap) and shows the painted lip that much shorter (--key-option-lip-selected, or the
     held size from --key-sink-option), so the lip still ends where the raised neighbours' lips end. */
  --key-option-lip: linear-gradient(var(--key-lip-color), var(--key-lip-color)) left 0 bottom 0 / 100% var(--key-lip-option) no-repeat border-box;
  --key-option-lip-selected: linear-gradient(var(--key-lip-color), var(--key-lip-color)) left 0 bottom var(--key-option-selected-sink) / 100% var(--key-lip-option-pressed) no-repeat border-box;
  --key-primary-shadow: 0 2px 7px rgb(0 0 0 / 60%);
  --key-primary-pressed-shadow: 0 1px 1.5px rgb(0 0 0 / 45%);
  /* A selected key's label keeps this share of its area's gold and takes black for the rest, a shade quieter than the
     raised faces around it. */
  --key-selected-text-mix: 88%;
  /* Label of an unselected (raised) key: the neutral grey dimmed toward the page, so the chosen key is the brightest.
     The home status block and the algorithm page share it, so unselected keys read the same on both. */
  --key-raised-text: color-mix(in srgb, var(--color-secondary) 80%, var(--color-background));
  /* The faces are near black, so the held-down shadow needs depth to read; the faint warm line is the lower inner edge. */
  --key-pressed-inset: inset 0 2px 4px rgb(0 0 0 / 85%), inset 0 -1px 1px rgb(255 236 190 / 10%);
  /* The lip is a bottom border, so the lower corners are drawn that much taller; the face keeps its round corners. */
  --key-option-radius: var(--radius) / var(--radius) var(--radius) calc(var(--radius) + var(--key-lip-option)) calc(var(--radius) + var(--key-lip-option));
  --key-primary-radius: var(--radius) / var(--radius) var(--radius) calc(var(--radius) + var(--key-lip-primary)) calc(var(--radius) + var(--key-lip-primary));
  /* Home artwork (utility bar, Core entry and the lottery button rim) sits one step under the draw card frame. */
  --home-artwork-brightness: .9;
  --image-hover-brightness: 1.1;
  --image-pressed-brightness: .85;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-background);
}

/* Hide only the scrollbar painting; each surface retains its existing scroll ownership. */
* { box-sizing: border-box; scrollbar-width: none; scrollbar-color: auto; }
html, body { margin: 0; min-width: 0; height: 100%; }
body { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; }
svg { display: block; flex-shrink: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-selected);
  outline-offset: 3px;
}
::selection { color: var(--color-background); background: var(--color-selected); }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* The hidden attribute wins over every class display rule on every screen; screens no longer repeat this. */
[hidden] { display: none !important; }

/* Gold call-to-action shared by 同星版路「開始搜尋」and 筆記本「寫入筆記」: frame, text, glow, sparkle layer and bottom light are
   written once; each page keeps its own size, padding and base gradient (tongxing.css, notebook.css). */
:is(.tongxing-search, .notebook-write-button) { position: relative; overflow: hidden; border: 1px solid var(--cta-border); border-radius: var(--radius); color: var(--cta-text); box-shadow: var(--cta-shadow-inner), var(--cta-shadow-outer); }
:is(.tongxing-search, .notebook-write-button)::before { position: absolute; inset: 0; background-image: var(--cta-sparkle); opacity: .78; mask-image: linear-gradient(90deg, #000, transparent 35%, transparent 65%, #000); pointer-events: none; content: ""; }
:is(.tongxing-search, .notebook-write-button)::after { position: absolute; right: 9%; bottom: 5px; left: 9%; height: 1px; background: var(--cta-light); box-shadow: var(--cta-light-shadow); pointer-events: none; content: ""; }
:is(.tongxing-search, .notebook-write-button) > :is(svg, span) { position: relative; z-index: 1; }

.app-shell {
  display: grid;
  grid-template: "brand" auto "content" minmax(0, 1fr) "utilities" auto "navigation" auto / minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin-inline: auto;
  background: var(--color-background);
  overflow: hidden;
}
.app-shell[data-page="home"] {
  --home-wall-opacity: .2;
  --home-wall-seam: 24px;
  /* 首頁的分隔線與按鈕邊框改用低飽和的霧面金，與暖金招牌協調；其他頁面維持原值。 */
  --color-border: rgb(176 148 100 / 42%);
  --color-border-soft: rgb(176 148 100 / 20%);
  --color-announcement-border: #7d6a4a;
  position: relative;
  isolation: isolate;
}
.app-shell[data-page="home"]::before {
  content: "";
  position: absolute;
  grid-column: 1;
  /* The cropped sign and Core corners reveal the same continuous homepage wall. */
  grid-row: brand-start / utilities-end;
  inset-block: 0;
  inset-inline: calc(var(--page-inline) + var(--safe-inline-start)) calc(var(--page-inline) + var(--safe-inline-end));
  z-index: -1;
  background: url("./assets/lpa-home-wall-20261106.jpg") center top / cover no-repeat;
  opacity: var(--home-wall-opacity);
  mask-image: linear-gradient(180deg, transparent, #000 var(--home-wall-seam), #000 calc(100% - var(--home-wall-seam)), transparent);
  pointer-events: none;
}
.brand-header {
  grid-area: brand;
  padding: calc(8px + env(safe-area-inset-top, 0px)) calc(var(--page-inline) + var(--safe-inline-end)) 0 calc(var(--page-inline) + var(--safe-inline-start));
  /* Large static announcements must leave the main controls usable. */
  max-height: calc((100vh - var(--nav-height)) / 2);
  max-height: calc((100dvh - var(--nav-height)) / 2);
  overflow: auto;
  overscroll-behavior-y: contain;
}
.brand-frame {
  position: relative;
  width: 100%;
  padding-bottom: var(--brand-announcement-extension, 0px);
  border-style: solid;
  border-color: transparent;
  border-width: 1px 1px 0;
  border-radius: 0;
  overflow: visible;
  background: var(--color-background);
}
.app-shell[data-page="home"] .brand-frame { background: transparent; }
.brand-image, .entry-image {
  display: block;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
/* Keep a wide, short viewport usable while preserving the banner's proportions. */
.brand-image {
  width: 100%;
  max-height: calc((100vh - var(--nav-height)) / 3);
  max-height: calc((100dvh - var(--nav-height)) / 3);
  object-fit: contain;
}
.app-shell[data-page="home"] .brand-image {
  aspect-ratio: var(--home-logo-aspect-ratio);
  /* 招牌照片的金光過於集中；以濾鏡壓低亮部與飽和度約三成，保留招牌本身的材質與造型。 */
  filter: brightness(.86) saturate(.88);
  /* Follow the sign's shared seam without changing the photograph's layout or scale. */
  clip-path: polygon(0 0, 100% 0, 100% var(--brand-crop-right, 100%), 0 var(--brand-crop-left, 100%));
}
.page-content {
  grid-area: content;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  padding: 0;
  scroll-padding-block: 12px;
}
.page-content:focus { outline: none; }
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px calc(var(--page-inline) + var(--safe-inline-end)) 16px calc(var(--page-inline) + var(--safe-inline-start));
}
.home-screen {
  padding-block: 0 var(--home-frame-gap);
  padding-inline-start: calc(var(--home-inline) + var(--safe-inline-start));
  padding-inline-end: max(0px, calc(var(--home-inline) + var(--safe-inline-end) - var(--home-scrollbar-width, 0px)));
}
.home-entries {
  position: relative;
  display: flex;
  flex: 1 0 auto;
}
.lottery-entries {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lottery-entry {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius);
  background: transparent;
}
.home-utilities {
  /* The shared artwork canvas is 2162 × 278px; its painted bar spans columns 40–2128 and ends at row 258, the rest is transparent. */
  --home-utility-canvas-width: 2162;
  --home-utility-canvas-height: 278;
  --home-utility-art-left: 40;
  --home-utility-art-width: 2088;
  --home-utility-art-bottom: 258;
  grid-area: utilities;
  padding: 0 calc(var(--home-inline) + var(--safe-inline-end)) var(--home-utilities-nav-gap) calc(var(--home-inline) + var(--safe-inline-start));
}
.home-utilities:not([hidden]) { display: block; }
.home-utility-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  min-height: var(--target-size);
}
.home-utility-artwork {
  grid-area: 1 / 1 / 2 / -1;
  align-self: end;
  justify-self: start;
  display: block;
  /* Scale the canvas so only the painted bar fills the bar box; the transparent margins overflow into the page inset. */
  width: calc(100% * var(--home-utility-canvas-width) / var(--home-utility-art-width));
  max-width: none;
  margin-inline-start: calc(-100% * var(--home-utility-art-left) / var(--home-utility-art-width));
  height: auto;
  /* The bar is an option key (styles.css --key-*): the box keeps the canvas ratio, and the bottom padding squeezes the
     drawn canvas so the painted bar ends one lip higher; the lip fills the strip it gave up. */
  aspect-ratio: var(--home-utility-canvas-width) / var(--home-utility-canvas-height);
  padding-block-end: calc(var(--key-lip-option) * var(--home-utility-canvas-height) / var(--home-utility-art-bottom));
  /* The painted bar keeps its own alpha, so the lip and the soft shadow follow the artwork rather than the grid box. */
  filter: brightness(var(--home-artwork-brightness)) drop-shadow(0 var(--key-lip-option) 0 var(--key-lip-color)) drop-shadow(0 2px 2px rgb(0 0 0 / 45%));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.entry {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: calc(100% * var(--frame-radius) / var(--frame-width)) / calc(100% * var(--frame-radius) / var(--frame-height));
  background: var(--color-image-backdrop);
  box-shadow: var(--control-relief-shadow);
  transition: filter var(--motion-fast), scale var(--control-press-duration) ease-out;
}
/* The crop removes embedded black padding so the visible cards follow the layout gaps. */
.entry-artwork {
  display: block;
  position: relative;
  aspect-ratio: var(--frame-width) / var(--frame-height);
  overflow: hidden;
  border-radius: inherit;
}
.entry-image {
  position: absolute;
  width: calc(100% * var(--artwork-width) / var(--frame-width));
  left: calc(-100% * var(--frame-left) / var(--frame-width));
  top: calc(-100% * var(--frame-top) / var(--frame-height));
}
.entry-lottery .entry-artwork {
  background: linear-gradient(180deg, var(--home-entry-surface-top), var(--home-entry-surface) 28% 72%, var(--home-entry-surface-bottom));
}
.entry-lottery-frame, .entry-lottery-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.entry-lottery-logo { padding: var(--home-lottery-logo-block-space) var(--gap); }
/* The Core entry artwork and the lottery button rim cut from it dim together; the lottery logo keeps its own colours. */
.entry-feature .entry-image, .entry-lottery-frame { filter: brightness(var(--home-artwork-brightness)); }
.entry-utility {
  grid-row: 1;
  position: relative;
  min-width: 0;
  /* Touch targets stay usable when the shared artwork scales below 44px. */
  min-height: var(--target-size);
  border-radius: var(--radius);
  background: transparent;
  transition: background-color var(--motion-fast), scale var(--control-press-duration) ease-out;
}
.entry-utility:first-of-type { grid-column: 1; }
.entry-utility:last-of-type { grid-column: 2; }
.entry-utility:focus-visible { outline-offset: -3px; }
.home-announcement {
  --announcement-min-line-height: 24px;
  --announcement-frame-clearance: 3px;
  --announcement-metal-depth: 3px;
  --announcement-joint-depth: 4px;
  /* 跑馬燈的燈管框與字色略為壓暗，避免與招牌同時搶眼。 */
  --announcement-tube-core: #e6d394;
  --announcement-tube-glow: #e6a128;
  --announcement-letter-core: #ecdcaa;
  position: absolute;
  z-index: 1;
  left: var(--announcement-left, 0px);
  top: var(--announcement-top, 0px);
  width: var(--announcement-width, 100%);
  display: block;
  min-width: 0;
  padding-bottom: calc(var(--announcement-frame-clearance) + var(--announcement-metal-depth));
  transform: var(--announcement-projection, none);
  transform-origin: top left;
  visibility: hidden;
}
.home-announcement[data-aligned="true"] { visibility: visible; }
.home-announcement::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 2px;
  top: calc(-1 * var(--announcement-joint-depth));
  height: calc(var(--announcement-joint-depth) + var(--radius));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-top: 1px solid rgb(185 131 59 / 40%);
  background: linear-gradient(#0b0906, #42301c 55%, #17110b);
  box-shadow: 0 -2px 4px rgb(0 0 0 / 85%), 0 1px 2px rgb(0 0 0 / 80%);
  pointer-events: none;
}
.home-announcement-sign {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: calc(var(--announcement-min-line-height) + 6px);
  padding: 2px 8px;
  border: 1px solid var(--color-announcement-border);
  border-radius: var(--radius);
  background: #211b12;
  box-shadow: 0 var(--announcement-metal-depth) 0 #17130f, 0 4px 4px rgb(0 0 0 / 50%), inset 0 3px 4px rgb(5 3 1 / 65%), inset 0 1px 1px #9a7843;
  overflow: hidden;
}
.home-announcement-sign::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--announcement-tube-core);
  border-radius: calc(var(--radius) - 3px);
  box-shadow: 0 0 2px color-mix(in srgb, var(--announcement-tube-glow) 70%, transparent), inset 0 0 2px color-mix(in srgb, var(--announcement-tube-glow) 70%, transparent);
  pointer-events: none;
}
.home-announcement-material { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; opacity: .72; pointer-events: none; }
.home-announcement-viewport { flex: 1; min-width: 0; overflow: hidden; }
.home-announcement-track { width: max-content; white-space: nowrap; }
.home-announcement-track[data-ready="true"] {
  animation: home-announcement-marquee var(--announcement-duration) linear infinite;
}
.home-announcement-text {
  display: block;
  padding-inline: 10px;
  color: var(--announcement-letter-core);
  font-family: var(--font-display);
  font-size: calc(.6875rem / var(--announcement-far-scale, 1));
  font-weight: 600;
  line-height: max(var(--announcement-min-line-height), 1.5em);
  letter-spacing: .02em;
  text-shadow: 0 1px 1px #633b13, 0 0 3px rgb(255 181 46 / 38%);
}
@keyframes home-announcement-marquee {
  from { transform: translateX(var(--announcement-start)); }
  to { transform: translateX(-100%); }
}
@media (hover: hover) {
  .entry-feature:hover > .entry-artwork { filter: brightness(var(--image-hover-brightness)); }
  .entry-utility:hover { background: var(--home-utility-hover); }
  .entry-lottery:hover > .entry-artwork { filter: brightness(var(--image-hover-brightness)); }
  .nav-link:hover { opacity: 1; }
  summary:hover { color: var(--color-selected); }
}
/* The Core key sinks with the lottery key (home-status.css); here it only darkens like the lottery artwork does. */
.entry-feature:active > .entry-artwork { filter: brightness(var(--image-pressed-brightness)); }
.entry-utility:active { background: var(--home-utility-pressed); scale: var(--control-press-scale); }
.entry-lottery:active > .entry-artwork { filter: brightness(var(--image-pressed-brightness)); }
.bottom-nav {
  /* 中性深黑，不偏暖也不偏藍，亮度接近頁面漸層的底端；每一頁同一色，與頁面之間以一條暗金細線分隔。 */
  --nav-panel: #0a0a0a;
  --nav-gold: #e5b34d;
  --nav-text: #c3beb6;
  --nav-motion: 180ms;
  grid-area: navigation;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 6px max(8px, var(--safe-inline-end)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, var(--safe-inline-start));
  border-top: 1px solid var(--color-announcement-border);
  background: var(--nav-panel);
  isolation: isolate;
}
.nav-link {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--target-size);
  padding: 6px 0;
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
  opacity: .7;
  touch-action: manipulation;
  transition: color var(--nav-motion) ease-out, opacity var(--nav-motion) ease-out;
}
.nav-link .icon { width: var(--icon-size); height: var(--icon-size); }
.nav-link[aria-current="page"] { color: var(--nav-gold); opacity: 1; }
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--nav-motion) ease-out;
}
.nav-link[aria-current="page"]::after { opacity: 1; }
.nav-link:active { opacity: .75; }
.skip-link { position: fixed; z-index: 10; left: 12px; top: -120px; padding: 12px; border-radius: var(--radius); color: var(--color-background); background: var(--color-selected); }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript-message { padding: 20px; font-size: .875rem; }

@media (max-width: 600px), (max-height: 600px) and (pointer: coarse) {
  /* Phones keep the app navigation; the Android system bar is hidden by the native wrapper, so the home page must fit once that bar is gone. */
  .app-shell {
    --home-draw-entries-gap: 4px;
    --home-action-summary-gap: 6px;
    --home-frame-gap: 6px;
    --home-utilities-nav-gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Keys keep their lip while held instead of sinking. */
  :root { --key-sink-primary: 0px; --key-sink-option: 0px; }
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .home-announcement-track[data-ready="true"] { animation: none; transform: none; width: auto; white-space: normal; }
  .home-announcement-text { overflow-wrap: anywhere; }
}
@media (forced-colors: active) {
  /* Keys show a plain system frame: every lip is 1px of frame plus 1px of bottom border, so a held primary key keeps its
     frame; options do not move when held or selected (the painted lips are dropped with the other gradients). */
  :root { --key-lip-primary: 2px; --key-lip-option: 2px; --key-lip-option-pressed: 2px; }
  .app-shell[data-page="home"]::before { display: none; }
  .home-utility-artwork { display: none; }
  .entry-utility {
    display: grid;
    place-items: center;
    padding: var(--gap);
    border: 1px solid ButtonText;
    background: Canvas;
  }
  .entry-utility-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .entry-lottery .entry-artwork { border: 1px solid ButtonText; background: Canvas; box-shadow: none; }
  .entry-lottery-frame, .entry-lottery .entry-artwork::after { display: none; }
  .entry, .brand-frame { border-color: ButtonText; }
  .home-announcement-sign { border-color: CanvasText; background: Canvas; box-shadow: none; }
  .home-announcement-material, .home-announcement-sign::after, .home-announcement::before { display: none; }
  .home-announcement-text { color: CanvasText; text-shadow: none; }
  .nav-link[aria-current="page"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
