:root {
  color-scheme: light;
  --polaris-purple: #8053cf;
  --ink: #30343a;
  --deep-purple: #1c112a;
  --soft-purple: #dbc5f5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--deep-purple); color: #f7f4fa; font-family: Arial, Helvetica, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.intro-splash { position: fixed; z-index: 30; inset: 0; overflow: hidden; display: grid; place-items: center; isolation: isolate; background: #0c0717 url("polaris-night-sky.jpg") center / contain no-repeat; animation: splash-exit .75s ease 4.35s forwards; }
.intro-splash::before { content: ""; position: absolute; z-index: 0; inset: -28px; background: url("polaris-night-sky.jpg") center 52% / cover no-repeat; filter: blur(22px) brightness(.42); opacity: .28; transform: scale(1.04); }
.intro-splash.is-dismissing { animation: splash-exit .45s ease forwards; }
.splash-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(10,4,18,.28), rgba(12,5,20,.06) 48%, rgba(9,4,16,.28)); }
.skip-intro { position: absolute; z-index: 2; top: max(22px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); padding: 10px 14px; border: 1px solid rgba(243,232,255,.38); border-radius: 999px; color: rgba(255,255,255,.86); background: rgba(19,8,33,.3); font-size: 12px; letter-spacing: .04em; backdrop-filter: blur(8px); }
.skip-intro:hover { color: #fff; border-color: rgba(255,255,255,.75); background: rgba(19,8,33,.55); }
.splash-logo { position: absolute; z-index: 2; top: clamp(56px, 10vh, 92px); left: 50%; display: flex; align-items: center; gap: 12px; color: #fff; font-size: clamp(18px, 2vw, 24px); font-weight: 700; letter-spacing: .24em; opacity: 0; transform: translate(-50%, 9px); text-shadow: 0 1px 22px rgba(191,143,241,.7); animation: logo-arrive .65s ease 2.95s forwards; }
.splash-logo-mark { color: var(--polaris-purple); font-size: 1.35em; line-height: 1; text-shadow: 0 0 20px rgba(128,83,207,.8); }
.constellation { position: relative; z-index: 2; width: min(80vw, 590px); height: min(80vh, 760px); overflow: visible; filter: drop-shadow(0 0 12px rgba(128,83,207,.5)); }
.constellation-art { transform-box: fill-box; transform-origin: center; animation: constellation-resolve 2.95s cubic-bezier(.2,.7,.15,1) .08s both; }
.constellation-path path { fill: none; stroke: var(--polaris-purple); stroke-width: .42; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; filter: url(#star-glow); animation: trace-constellation 1.32s cubic-bezier(.48,0,.16,1) .04s forwards; }
.constellation-arrival { opacity: 0; transform-box: fill-box; transform-origin: center; animation: star-whip .42s cubic-bezier(.14,.82,.18,1) both; }
.star-1 .constellation-arrival { animation-delay: .04s; }.star-2 .constellation-arrival { animation-delay: .23s; }.star-3 .constellation-arrival { animation-delay: .42s; }.star-4 .constellation-arrival { animation-delay: .61s; }.star-5 .constellation-arrival { animation-delay: .80s; }.star-6 .constellation-arrival { animation-delay: .99s; }.star-7 .constellation-arrival { animation-delay: 1.18s; }
.point-star { fill: #faf4ff; filter: url(#star-glow); }
.is-origin .point-star { fill: var(--polaris-purple); }
.point-flare { fill: #fff; opacity: 0; filter: url(#star-glow); animation: flare-bloom .48s ease both; }
.star-1 .point-flare { animation-delay: .04s; }.star-2 .point-flare { animation-delay: .23s; }.star-3 .point-flare { animation-delay: .42s; }.star-4 .point-flare { animation-delay: .61s; }.star-5 .point-flare { animation-delay: .80s; }.star-6 .point-flare { animation-delay: .99s; }.star-7 .point-flare { animation-delay: 1.18s; }
.splash-app-icon { position: absolute; z-index: 3; top: 50%; left: 50%; width: clamp(64px, 12vw, 92px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 23%; background: var(--soft-purple); color: #291641; opacity: 0; transform: translate(-50%,-50%) scale(.05); box-shadow: 0 0 30px rgba(191,142,255,.55); animation: app-icon-arrive .72s cubic-bezier(.16,1,.3,1) 2.28s both; }
.splash-app-icon span { font-size: 60%; line-height: 1; }
.splash-caption { position: absolute; z-index: 2; bottom: max(34px, env(safe-area-inset-bottom)); color: rgba(241,229,254,.65); font-size: 10px; letter-spacing: .36em; opacity: 0; animation: caption-arrive .6s ease 3.15s forwards; }.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 7vw, 112px); background: var(--deep-purple); color: #f7f4fa; }
.page-nav { display: flex; gap: 8px; }
.page-nav-button { border: 1px solid rgba(242,231,253,.2); border-radius: 999px; padding: 10px 16px; background: transparent; color: #d4c8e2; font-size: 13px; }
.page-nav-button.is-active { border-color: var(--polaris-purple); background: var(--polaris-purple); color: #fff; }
.site-footer { padding: 18px clamp(22px, 7vw, 112px); background: var(--deep-purple); color: #c9b9d9; font-size: 12px; line-height: 1.5; text-align: center; }
.mobile-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.brand-mark {
  width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px;
  background: var(--polaris-purple); color: #fff; font-size: 16px;
}
.demo-badge {
  padding: 6px 10px; border-radius: 999px; background: rgba(128,83,207,.15); color: var(--soft-purple);
  font-size: 10px; letter-spacing: .08em;
}
.setup { min-height: 100vh; display: flex; align-items: center; padding: 50px clamp(32px, 7vw, 112px); background: var(--deep-purple); color: #f7f4fa; }
.home-layout {
  position: relative; width: min(1320px, 100%); min-height: 690px; margin: 0 auto; padding: 60px 0 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); gap: clamp(40px, 7vw, 100px); align-items: center;
}
.home-copy { max-width: 620px; }
.home-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; color: #ddc3f6; font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.home-kicker .brand-mark { background: var(--soft-purple); color: var(--deep-purple); }
.kicker-divider { opacity: .55; }
.home-copy h1 { margin: 0 0 22px; max-width: 640px; font-size: clamp(45px, 6vw, 76px); line-height: 1.02; letter-spacing: -.055em; font-weight: 600; }
.narrow-title, .narrow-description { display: none; }
.home-description { max-width: 440px; margin: 0 0 32px; color: #c9b9d9; font-size: 17px; line-height: 1.6; }
.setup-controls { max-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; color: #e3d8ee; font-size: 12px; font-weight: 600; }
.field select {
  width: 100%; height: 50px; padding: 0 14px; border: 1px solid rgba(242,231,253,.22); border-radius: 9px;
  color: #f7f4fa; background: #30203f; font-size: 14px; outline-color: var(--soft-purple);
}
.field select option { color: #241a30; background: #fff; }
.action-button { min-height: 48px; border: 0; border-radius: 9px; font-size: 14px; font-weight: 600; }
.start-button { grid-column: 1; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--soft-purple); color: #291641; }
.start-button:hover { background: #ead5ff; }
.reset-button { grid-column: 2; justify-self: start; padding: 0 14px; background: transparent; color: #c9b9d9; }
.reset-button:hover { color: #fff; }
.cloud-panel { max-width: 520px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(242,231,253,.14); }
.cloud-help { margin: 0 0 12px; color: #c4afd8; font-size: 12px; line-height: 1.45; }
.cloud-help[data-state="error"] { color: #ffaaa0; }
.cloud-help[data-state="success"] { color: #9ce0b1; }
.cloud-signin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cloud-signin[hidden], .cloud-account[hidden], .submit-row[hidden], .print-report[hidden] { display: none !important; }
.cloud-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #d4c8e2; font-size: 11px; font-weight: 600; }
.cloud-field input, .cloud-field select { min-width: 0; height: 39px; padding: 0 10px; border: 1px solid rgba(242,231,253,.2); border-radius: 7px; color: #f7f4fa; background: #30203f; font-size: 13px; }
.cloud-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.cloud-button, .cloud-sign-out { min-height: 36px; padding: 0 12px; border: 1px solid var(--polaris-purple); border-radius: 7px; background: var(--polaris-purple); color: #fff; font-size: 12px; font-weight: 700; }
.cloud-button.secondary, .cloud-sign-out { background: transparent; color: #e3d8ee; }
.cloud-button:disabled { opacity: .45; cursor: wait; }
.cloud-account-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: #e3d8ee; font-size: 12px; }
.saved-check-field { margin-bottom: 8px; }
.cloud-account .cloud-button { width: 100%; }
.home-visual { display: grid; justify-items: center; align-content: center; min-width: 0; }
.hero-rink {
  position: relative; width: min(100%, 590px); aspect-ratio: 1.58; border: 2px solid rgba(237,221,251,.62);
  border-radius: 999px; transform: rotate(-20deg); background: radial-gradient(ellipse at 55% 45%, rgba(111,65,150,.38), rgba(28,17,42,0) 70%);
}
.hero-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(237,221,251,.48); }
.hero-center { position: absolute; top: 50%; left: 50%; width: 90px; height: 90px; border: 1px solid rgba(237,221,251,.5); border-radius: 50%; transform: translate(-50%,-50%); }
.hero-point { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--soft-purple); box-shadow: 0 0 24px rgba(221,195,246,.65); }
.point-one { left: 16%; top: 22%; }.point-two { left: 16%; top: 72%; }.point-three { left: 39%; top: 8%; }.point-four { left: 53%; top: 75%; }.point-five { left: 77%; top: 18%; }.point-six { left: 85%; top: 68%; }
.visual-caption { margin: 30px 0 0; color: #af9bc5; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-align: center; }
.visual-caption span { color: #e6d8f2; }
.home-footnote { position: absolute; right: 0; bottom: 20px; left: 0; display: flex; justify-content: space-between; color: #af9bc5; font-size: 11px; }
.home-footnote span:first-child { color: #e6d8f2; }

.rink-stage { display: none; padding: 42px 4.1vw 30px; overflow: hidden; background: #fff; color: var(--ink); }
.rink-stage.is-active { display: block; }
.rink-viewport { width: min(100%, 1650px); margin: 0 auto; position: relative; }
.rink-art { display: block; width: 100%; height: auto; overflow: visible; }
.rink-border { fill: #fff; stroke: #30343a; stroke-width: 3.5; }
.rink-markings { fill: none; stroke: #85898d; stroke-width: 2.5; }
.rink-center-line, .rink-blue-line, .rink-goal-line { stroke: #85898d; stroke-width: 3; }
.rink-circle { stroke: #85898d; stroke-width: 2.5; }
.rink-crease { fill: none; stroke: #85898d; stroke-width: 2.5; }
.rink-label { fill: #62676f; stroke: none; font-size: 18px; font-weight: 700; text-anchor: middle; }
.submit-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 20px; background: #f7f4fa; color: #30343a; }
.submit-row p { margin: 0; color: #59446c; font-size: 14px; }
.submit-check-button { padding: 0 22px; background: var(--polaris-purple); color: #fff; }
.submit-check-button:hover { background: #6740a3; }
.print-report { display: none; }
.history-page { min-height: calc(100vh - 64px); padding: 46px clamp(22px, 7vw, 112px) 64px; background: #f7f4fa; color: #241a30; }
.history-page[hidden] { display: none !important; }
.setup[hidden], .rink-stage[hidden] { display: none !important; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 1320px; margin: 0 auto 30px; }
.history-kicker { margin: 0 0 12px; color: var(--polaris-purple); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.history-heading h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.045em; }
.history-heading p:not(.history-kicker) { max-width: 640px; margin: 0; color: #6f627b; line-height: 1.55; }
.history-controls, .history-map-wrap, .history-empty { max-width: 1320px; margin: 0 auto; }
.history-controls { display: flex; align-items: end; gap: 20px; margin-bottom: 18px; }
.history-controls label { display: flex; width: min(440px, 100%); flex-direction: column; gap: 7px; color: #59446c; font-size: 12px; font-weight: 700; }
.history-controls select { height: 46px; padding: 0 12px; border: 1px solid #d8cfe0; border-radius: 8px; background: white; color: #241a30; }
.history-status { padding: 0 0 12px; color: #6f627b; font-size: 13px; }
.history-map-wrap { padding: 22px 24px 18px; border: 1px solid #e7dfed; border-radius: 15px; background: #fff; box-shadow: 0 10px 34px rgba(50,28,70,.06); }
.history-map-wrap[hidden] { display: none !important; }
.history-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.history-map-heading h2 { margin: 0 0 4px; font-size: 19px; }
.history-map-heading p { margin: 0; color: #6f627b; font-size: 13px; }
.heat-legend { display: flex; align-items: center; gap: 9px; color: #6f627b; font-size: 11px; white-space: nowrap; }
.heat-legend i { display: block; width: 110px; height: 10px; border-radius: 999px; background: linear-gradient(90deg,#2f80ed,#4cc9a0,#f5d547,#ee6a3c); }
.history-rink-viewport { max-width: 1200px; }
.history-view-toggle { display: flex; justify-content: flex-end; gap: 7px; margin: -1px 0 12px; }
.view-choice { padding: 8px 12px; border: 1px solid #ded4e6; border-radius: 999px; background: #fff; color: #59446c; font-size: 11px; font-weight: 700; }
.view-choice.is-active { border-color: var(--polaris-purple); background: var(--polaris-purple); color: #fff; }
.terrain-controls { display: flex; align-items: end; gap: 24px; padding: 4px 4px 14px; }
.terrain-controls[hidden] { display: none !important; }
.terrain-controls label { display: grid; min-width: 210px; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; color: #59446c; font-size: 11px; font-weight: 700; }
.terrain-controls output { color: #241a30; font-variant-numeric: tabular-nums; }
.terrain-controls input { grid-column: 1 / -1; width: 100%; margin: 2px 0 0; accent-color: var(--polaris-purple); }
.drag-hint { margin: 0 0 7px auto; color: #6f627b; font-size: 11px; }
.terrain-frame { display: grid; min-height: 410px; place-items: center; overflow: hidden; border-radius: 12px; background: radial-gradient(ellipse at 48% 38%, #fff 0%, #f7f4fa 72%, #f1ebf6 100%); }
.terrain-frame[hidden], #history-flat-map[hidden] { display: none !important; }
#terrain-canvas { display: block; width: min(100%, 1100px); height: auto; aspect-ratio: 1100 / 640; touch-action: none; cursor: grab; }
#terrain-canvas:active { cursor: grabbing; }
.history-heat-points { position: absolute; inset: 0; pointer-events: none; }
.heat-point { position: absolute; width: clamp(25px, 3vw, 42px); aspect-ratio: 1; display: grid; place-items: center; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.95); border-radius: 50%; color: var(--deep-purple); font-size: clamp(10px, .9vw, 13px); font-weight: 800; box-shadow: 0 2px 9px rgba(0,0,0,.22), 0 0 18px color-mix(in srgb, var(--heat-color) 55%, transparent); background: var(--heat-color); }
.heat-point.unmeasured { border-style: dashed; color: #6f627b; background: #dfe5e1; box-shadow: none; }
.timeline { margin-top: 17px; padding: 16px 18px 12px; border-radius: 11px; background: #f7f4fa; }
.timeline-labels { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #6f627b; font-size: 11px; }
.timeline-labels strong { color: #241a30; font-size: 13px; }
.timeline input[type="range"] { width: 100%; margin: 17px 0 10px; accent-color: var(--polaris-purple); }
.timeline-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #6f627b; font-size: 12px; }
.play-timeline { padding: 8px 12px; border: 0; border-radius: 7px; background: #ede0f9; color: #492f61; font-size: 12px; font-weight: 700; }
.play-timeline:disabled { opacity: .45; cursor: not-allowed; }
.history-empty { padding: 28px; border: 1px dashed #d7c9e1; border-radius: 12px; color: #6f627b; text-align: center; }
.history-empty[hidden] { display: none !important; }

.markers { position: absolute; inset: 0; pointer-events: none; }
.marker {
  position: absolute; transform: translate(-50%, -50%); width: clamp(34px, 2.6vw, 42px); height: clamp(34px, 2.6vw, 42px);
  display: grid; place-items: center; border: 1px solid #6740a3; border-radius: 50%; pointer-events: auto;
  background: var(--polaris-purple); color: #fff; font-size: clamp(15px, 1.1vw, 18px); font-weight: 700;
  box-shadow: none; transition: transform .14s ease, box-shadow .14s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.marker:hover, .marker.selected { z-index: 4; transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 0 3px rgba(48,52,58,.15); }
.marker.has-reading { background: var(--polaris-purple); color: #fff; border-color: #6740a3; }
.marker.has-reading:hover, .marker.has-reading.selected { box-shadow: 0 0 0 3px rgba(48,52,58,.15); }
.marker .value { font-size: .87em; }

.point-editor {
  position: absolute; z-index: 6; width: 280px; padding: 12px;
  background: #f8f8f8; border: 1px solid #d1d4d7; border-radius: 9px;
  box-shadow: 0 3px 13px rgba(0,0,0,.15);
}
.point-editor::after { content: ""; position: absolute; width: 16px; height: 16px; background: #f8f8f8; }
.point-editor[data-side="right"]::after { left: -9px; top: calc(var(--arrow-offset) - 8px); border-left: 1px solid #d1d4d7; border-bottom: 1px solid #d1d4d7; transform: rotate(45deg); }
.point-editor[data-side="left"]::after { right: -9px; top: calc(var(--arrow-offset) - 8px); border-right: 1px solid #d1d4d7; border-top: 1px solid #d1d4d7; transform: rotate(45deg); }
.point-editor[data-side="above"]::after { bottom: -9px; left: calc(var(--arrow-offset) - 8px); border-right: 1px solid #d1d4d7; border-bottom: 1px solid #d1d4d7; transform: rotate(45deg); }
.point-editor[data-side="below"]::after { top: -9px; left: calc(var(--arrow-offset) - 8px); border-left: 1px solid #d1d4d7; border-top: 1px solid #d1d4d7; transform: rotate(45deg); }
.editor-point { margin-bottom: 8px; font-size: 24px; }
.reading-entry { display: flex; height: 46px; align-items: center; border: 3px solid var(--soft-purple); border-radius: 6px; background: white; }
.reading-entry input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 10px; font-size: 20px; }
.reading-entry span { padding: 0 10px; color: #7b8086; }
.editor-actions { display: flex; gap: 10px; margin-top: 10px; }
.editor-actions button { border: 0; border-radius: 24px; padding: 10px 17px; color: #fff; font-size: 16px; }
.save-button { background: var(--polaris-purple); }.clear-button { background: #85898d; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 12; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 7px; background: #30343a; color: white; transition: .2s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) and (min-width: 781px) {
  .setup { padding-right: 5vw; padding-left: 5vw; }
  .home-layout { grid-template-columns: 1.08fr .92fr; gap: 38px; }
  .home-copy h1 { font-size: clamp(42px, 5.5vw, 62px); }
  .hero-point { width: 12px; height: 12px; }
  .rink-stage { padding: 32px 2vw 30px; }
}
@media (max-width: 780px) {
  body { background: #fff; color: var(--ink); }
  .topbar {
    min-height: 62px; display: flex; align-items: center; padding: 8px 14px 8px 22px;
    background: #fff; color: var(--ink); border-bottom: 1px solid #eee8f2;
  }
  .page-nav { gap: 5px; }
  .page-nav-button { padding: 8px 10px; border-color: #dfe5e1; color: #59446c; font-size: 11px; }
  .page-nav-button.is-active { border-color: var(--polaris-purple); background: var(--polaris-purple); color: #fff; }
  .mobile-brand { font-size: 15px; }
  .setup { min-height: 0; display: block; padding: 0; background: #fff; color: var(--ink); }
  .history-page { min-height: calc(100vh - 62px); padding: 28px 16px 42px; }
  .history-heading { align-items: flex-start; }
  .history-heading h1 { font-size: 34px; }
  .history-heading p:not(.history-kicker) { font-size: 13px; }
  .history-controls { display: block; }
  .history-controls label { width: 100%; }
  .history-status { padding-top: 10px; }
  .history-map-wrap { padding: 14px 10px 12px; }
  .history-view-toggle { justify-content: center; }
  .terrain-controls { flex-wrap: wrap; gap: 10px 14px; padding: 4px 5px 12px; }
  .terrain-controls label { min-width: 130px; flex: 1 1 40%; font-size: 10px; }
  .drag-hint { width: 100%; margin: 0; text-align: center; }
  .terrain-frame { min-height: 0; }
  #terrain-canvas { width: 760px; max-width: none; }
  .history-map-heading { align-items: flex-start; }
  .heat-legend { gap: 5px; font-size: 9px; }
  .heat-legend i { width: 60px; height: 8px; }
  .history-rink-viewport { width: 860px; max-width: none; margin: 0 0 0 0; }
  .history-map-wrap { overflow-x: auto; }
  .timeline { padding: 13px 10px 10px; }
  .timeline-labels strong { text-align: center; }
  .home-layout { width: min(100%, 420px); min-height: 0; display: flex; flex-direction: column; gap: 20px; padding: 30px 22px 24px; }
  .home-copy { position: relative; z-index: 1; width: 100%; max-width: none; }
  .home-kicker { margin-bottom: 12px; color: var(--polaris-purple); font-size: 10px; letter-spacing: .12em; }
  .home-kicker .brand-mark, .wide-kicker { display: none; }
  .narrow-kicker { display: inline; }
  .home-copy h1 { margin-bottom: 10px; font-size: 36px; line-height: 1.04; letter-spacing: -.045em; color: #241a30; }
  .wide-title, .wide-description { display: none; }
  .narrow-title, .narrow-description { display: block; }
  .home-description { margin-bottom: 23px; color: #6f627b; font-size: 14px; line-height: 1.5; }
  .setup-controls { max-width: none; grid-template-columns: 1fr; gap: 14px; }
  .field { gap: 7px; color: #6f627b; font-size: 11px; letter-spacing: .04em; }
  .field select { height: 48px; border-color: #dfe5e1; background: #fff; color: #241a30; font-size: 14px; }
  .field select option { color: #241a30; background: #fff; }
  .start-button { min-height: 48px; grid-column: 1; margin-top: 4px; background: var(--polaris-purple); color: #fff; }
  .start-button:hover { background: #6740a3; }
  .reset-button { grid-column: 1; justify-self: center; min-height: 34px; color: #6f627b; font-size: 12px; }
  .cloud-panel { margin-top: 4px; padding-top: 16px; border-top-color: #eae2f0; }
  .cloud-help { color: #6f627b; }
  .cloud-help[data-state="error"] { color: #b3261e; }
  .cloud-help[data-state="success"] { color: var(--polaris-purple); }
  .cloud-field { color: #6f627b; }
  .cloud-field input, .cloud-field select { height: 42px; border-color: #dfe5e1; color: #241a30; background: #fff; }
  .cloud-button.secondary, .cloud-sign-out { border-color: #baacc7; color: #59446c; }
  .home-visual { position: absolute; z-index: 0; top: auto; right: 4%; bottom: 78px; width: 92%; min-height: 0; display: block; opacity: .16; pointer-events: none; }
  .hero-rink { width: 100%; aspect-ratio: 2.45; transform: none; border: 1px solid #d7c2e8; background: #f1e9f7; }
  .hero-line { width: 1px; background: #e0d2e9; }
  .hero-center { width: 48px; height: 48px; border-color: #d7c2e8; }
  .hero-point { width: 9px; height: 9px; background: var(--polaris-purple); box-shadow: none; transition: left 7s ease-in-out, top 7s ease-in-out; }
  .visual-caption { display: none; }
  .home-footnote { position: static; margin: -8px 0 0; display: block; color: #6f627b; font-size: 11px; line-height: 1.5; text-align: center; }
  .home-footnote span { display: block; }
  .home-footnote span:first-child { color: #241a30; }
  .rink-stage { padding: 24px 0 20px; overflow-x: auto; }
  .rink-viewport { width: 860px; max-width: none; margin: 0 14px; }
  .marker { width: 36px; height: 36px; font-size: 15px; }
  .point-editor { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-splash { animation-duration: .45s; animation-delay: .35s; }
  .constellation-art { opacity: 0; animation: none; }
  .constellation-path path, .constellation-arrival, .point-flare, .splash-logo, .splash-caption { animation-duration: .01ms; animation-delay: 0s; }
  .splash-app-icon { opacity: 1; animation-duration: .01ms; animation-delay: 0s; transform: none; }
  .hero-point { transition: none !important; }
}

@media print {
  @page { size: landscape; margin: 9mm; }
  body { min-height: auto; background: #fff; color: #111; }
  .topbar, .intro-splash, .site-footer, main > :not(.print-report) { display: none !important; }
  .print-report:not([hidden]) { display: block !important; width: 100%; }
  .print-report h1 { margin: 0 0 2mm; font-size: 18pt; }
  .report-details { margin: 0 0 2mm; color: #444; font-size: 9pt; }
  .report-rink-art { display: block; width: 100%; height: auto; max-height: 150mm; }
  .report-markers circle { fill: #6e42b0; stroke: #fff; stroke-width: 2; }
  .report-markers text { fill: #fff; stroke: none; text-anchor: middle; font-family: Arial, Helvetica, sans-serif; font-weight: 700; }
  .report-point-number { font-size: 16px; }
  .report-point-value { font-size: 20px; }
  .report-reading-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1mm 4mm; margin: 1mm 0 0; padding: 0; list-style: none; font-size: 7.5pt; }
  .report-reading-list li { padding-left: 1mm; }
}

