:root {
  color-scheme: light;
  --teal: #1F6E86;
  --deep-teal: #12475A;
  --orange: #F39A1F;
  --blush: #F8F0EE;
  --cream: #FBF7F0;
  --card-white: #FFFFFF;
  --teal-dark: #195A70;
  --teal-pale: #E8F1F1;
  --teal-wash: #F1F6F5;
  --warm-wash: #FFF8EA;
  --orange-dark: #814900;
  --green: #347443;
  --green-pale: #EAF3E8;
  --ink-muted: #3E5A64;
  --placeholder: #536A72;
  --line: #CCDADB;
  --line-warm: #E5DDD1;
  --error: #9D3028;
  --shadow: 0 18px 55px rgb(18 71 90 / 12%);
  --shadow-soft: 0 10px 30px rgb(18 71 90 / 9%);
  --bubble-shadow: 0 10px 30px rgb(18 71 90 / 23%);
  --bubble-border: rgb(31 110 134 / 15%);
  --bubble-surface: rgb(255 255 255 / 94%);
  --font-heading: "Lora", "Noto Serif", serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--deep-teal);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--cream); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--cream); font-family: var(--font-body); color: var(--deep-teal); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--deep-teal); outline-offset: 3px; box-shadow: 0 0 0 6px var(--orange); }
[hidden] { display: none !important; }

.page-form { background: radial-gradient(ellipse at 50% 0%, var(--card-white), var(--cream) 58rem); }
.form-layout, .admin-layout { width: min(100% - 32px, 680px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom)); }
.brand-header, .tree-header, .admin-title-row, .admin-section-heading, .label-row, .page-footer, .tree-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; color: var(--deep-teal); font-size: .94rem; font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.brand-logo { display: block; width: 40px; height: 40px; flex: 0 0 auto; object-fit: contain; }
.event-date, .admin-label { color: var(--ink-muted); font-size: .76rem; letter-spacing: .04em; }
.intro { padding: 42px 0 22px; text-align: center; }
.eyebrow { margin: 0 0 8px; color: var(--deep-teal); font-size: .72rem; font-weight: 700; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.intro h1, .tree-heading h1, .admin-login h1, .admin-title-row h1 { margin-bottom: 12px; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(2.1rem, 7vw, 3.35rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.12; }
.intro h1 span { color: var(--teal); white-space: nowrap; }
.intro-copy { max-width: 520px; margin: 0 auto; color: var(--ink-muted); font-size: .95rem; line-height: 1.6; }

.preview-card { position: relative; margin: 0 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--teal-wash); box-shadow: var(--shadow-soft); }
.preview-tree { width: 100%; }
.preview-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px 14px; }
.preview-count { display: flex; align-items: baseline; gap: 7px; padding-top: 8px; color: var(--deep-teal); }
.preview-count strong { padding: 2px 8px; border-radius: 8px; background: var(--deep-teal); color: var(--orange); font-family: var(--font-heading); font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.count-label { color: var(--ink-muted); font-size: .82rem; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; width: fit-content; color: var(--deep-teal); font-size: .84rem; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.preview-card .text-link { flex: 0 0 auto; }
.form-card, .success-card { padding: clamp(20px, 5vw, 32px); border: 1px solid var(--line-warm); border-radius: 24px; background: var(--card-white); box-shadow: var(--shadow); }
.field-group { margin-bottom: 18px; }
.field-group > label:not(.consent-check), .admin-login label, .settings-form label { display: block; margin-bottom: 8px; color: var(--deep-teal); font-size: .9rem; font-weight: 700; }
.field-group input:not([type="checkbox"]), .field-group textarea, .admin-login input, .settings-form input { display: block; width: 100%; min-height: 52px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-white); color: var(--deep-teal); font-size: 1rem; }
.field-group textarea { min-height: 126px; resize: vertical; line-height: 1.5; }
.field-group input::placeholder, .field-group textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field-note { margin: 7px 0 0; color: var(--ink-muted); font-size: .8rem; line-height: 1.5; }
.field-error { min-height: 0; margin: 0; color: var(--error); font-size: .82rem; line-height: 1.45; }
.field-error:not(:empty) { margin-top: 6px; }
.consent-check { display: flex; min-height: 48px; align-items: center; gap: 12px; margin: 8px 0 0; padding: 4px 2px; color: var(--deep-teal); font-size: .82rem; line-height: 1.45; cursor: pointer; }
.consent-check input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--teal); cursor: pointer; }
.label-row { align-items: baseline; margin-bottom: 8px; }
.label-row label { margin: 0; }
.character-count { color: var(--ink-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.form-message { min-height: 0; margin: 0; color: var(--deep-teal); font-size: .88rem; line-height: 1.5; }
.form-message:not(:empty) { margin: 0 0 12px; }
.form-message[data-state="waiting"] { padding: 12px 14px; border-radius: 12px; background: var(--teal-pale); }
.form-message[data-state="error"] { color: var(--error); }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 12px; padding: 12px 18px; border: 1px solid transparent; border-radius: 999px; font-size: .9rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--teal); color: var(--card-white); box-shadow: 0 7px 16px rgb(18 71 90 / 18%); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--deep-teal); }
.submit-button { width: 100%; justify-content: space-between; padding: 14px 20px; font-size: 1rem; }
.submit-button:disabled { cursor: wait; opacity: .88; }
.privacy-note { display: flex; gap: 9px; margin: 18px 0 0; color: var(--ink-muted); font-size: .8rem; line-height: 1.5; }
.privacy-note span { color: var(--orange-dark); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-slot { min-height: 0; margin-bottom: 8px; }
.turnstile-slot:not(:empty) { min-height: 68px; }
.page-footer { flex-wrap: wrap; margin-top: 23px; color: var(--ink-muted); font-size: .76rem; line-height: 1.4; }
.page-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--deep-teal); text-decoration: none; }
.footer-community { gap: 8px; }
.footer-community img { width: 104px; height: 36px; object-fit: contain; }

.success-card { padding-top: 32px; text-align: center; animation: rise-in .4s ease both; }
.success-apple { display: grid; width: 74px; height: 74px; place-items: center; margin: 0 auto 16px; border: 1px solid var(--line); border-radius: 50%; background: var(--green-pale); color: var(--green); animation: apple-pop .8s cubic-bezier(.18,.8,.25,1.3) both; }
.success-apple svg { width: 48px; height: 48px; }
.success-card h2 { margin: 0 auto 12px; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(1.65rem, 6vw, 2.35rem); font-weight: 500; line-height: 1.25; }
.success-card blockquote { margin: 18px 0 22px; padding: 16px 18px; border-left: 3px solid var(--orange); background: var(--warm-wash); color: var(--deep-teal); font-family: var(--font-heading); font-size: 1.05rem; font-style: italic; line-height: 1.55; text-align: left; }
.duplicate-note { margin: 0; color: var(--deep-teal); font-size: .9rem; }
.success-actions { display: flex; flex-direction: column; gap: 10px; }

.tree-page { min-height: 100svh; overflow-x: hidden; background: radial-gradient(ellipse at 50% 48%, var(--card-white), var(--cream) 70%); }
.tree-page-layout { position: relative; display: flex; width: min(100% - 34px, 1100px); min-height: 100svh; flex-direction: column; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom)); }
.tree-heading { z-index: 1; padding: 25px 0 0; text-align: center; }
.tree-heading h1 { margin-bottom: 5px; font-size: clamp(2.2rem, 8vw, 3.8rem); }
.tree-heading > p:not(.eyebrow) { margin-bottom: 9px; color: var(--ink-muted); font-size: .9rem; }
.tree-total { color: var(--deep-teal); font-size: .92rem; }
.tree-total span { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--deep-teal); color: var(--orange); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.full-tree-wrap { display: grid; min-height: 0; flex: 1; place-items: center; margin: 4px 0 0; }
.full-tree { width: 100%; max-width: 1100px; }
.tree-footer { padding-top: 4px; color: var(--ink-muted); font-size: .78rem; }

.apple-card-backdrop { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); background: rgb(18 71 90 / 30%); }
.apple-card { position: relative; width: min(100%, 490px); max-height: min(78svh, 620px); overflow-y: auto; margin: 0; padding: 23px 22px 22px; border: 1px solid var(--line-warm); border-radius: 20px; background: var(--card-white); color: var(--deep-teal); box-shadow: var(--shadow); animation: sheet-in .22s ease both; }
.apple-card h2 { margin: 0 48px 8px 0; color: var(--deep-teal); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.apple-card > p[data-apple-words] { margin: 0 0 14px; color: var(--deep-teal); font-family: var(--font-heading); font-size: 1rem; font-style: italic; line-height: 1.6; overflow-wrap: anywhere; }
.apple-number { margin: 0; color: var(--ink-muted); font-size: .82rem; font-weight: 600; }
.apple-card-close { position: absolute; top: 8px; right: 8px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: var(--teal-wash); color: var(--deep-teal); font-size: 1.6rem; cursor: pointer; }

.apple-group { cursor: pointer; }
.apple-group:focus-visible { outline: none; filter: drop-shadow(0 0 5px var(--orange)); }
.apple-group:hover { filter: drop-shadow(0 2px 4px rgb(18 71 90 / 30%)); }
.apple-hit-target { fill: transparent; pointer-events: all; cursor: pointer; }
.apple-graphic { pointer-events: none; }
.apple-bubble-anchor .apple-graphic { filter: drop-shadow(0 0 7px var(--orange)) drop-shadow(0 1px 1px rgb(18 71 90 / 55%)); }
.apple-highlight { fill: none; stroke: var(--orange); stroke-width: 3; opacity: .98; }
.apple-pop { animation: apple-pop .55s cubic-bezier(.18,.8,.25,1.2) both; transform-box: fill-box; transform-origin: center; }
.tree-artwork { position: relative; width: 100%; aspect-ratio: 11906 / 6803; overflow: hidden; isolation: isolate; background: var(--teal-pale); }
.tree-artwork > img, .tree-artwork > .tree-overlay { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.tree-artwork > img { object-fit: fill; }
.tree-overlay { overflow: visible; }
.tree-bubble-layer { position: absolute; z-index: 3; inset: 0; overflow: hidden; pointer-events: none; }
.tree-bubble { position: absolute; width: min(340px, 70%); max-width: 340px; padding: 11px 14px 12px; border: 1px solid var(--bubble-border); border-radius: 14px; background: var(--bubble-surface); color: var(--deep-teal); box-shadow: var(--bubble-shadow); font-size: clamp(15px, .94vw, 18px); line-height: 1.4; overflow-wrap: anywhere; }
.tree-bubble__name { display: block; margin: 0 0 4px; overflow: hidden; color: var(--deep-teal); font-family: var(--font-body); font-size: clamp(15px, 1.04vw, 20px); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tree-bubble__text { display: -webkit-box; margin: 0; overflow: hidden; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(15px, .94vw, 18px); font-style: italic; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.tree-bubble::after { position: absolute; width: 12px; height: 12px; border: 1px solid var(--bubble-border); background: var(--card-white); content: ""; transform: rotate(45deg); }
.tree-bubble[data-side="above"]::after { bottom: -7px; left: calc(50% - 6px); border-top: 0; border-left: 0; }
.tree-bubble[data-side="below"]::after { top: -7px; left: calc(50% - 6px); border-right: 0; border-bottom: 0; }
.tree-bubble[data-side="left"]::after { top: calc(50% - 6px); right: -7px; border-bottom: 0; border-left: 0; }
.tree-bubble[data-side="right"]::after { top: calc(50% - 6px); left: -7px; border-top: 0; border-right: 0; }
.tree-bubble.is-entering { animation: bubble-in .4s ease-out both; }
.tree-bubble.is-leaving { animation: bubble-out .4s ease-in both; }

.page-screen { width: 100vw; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--cream); color: var(--deep-teal); }
.screen-layout { position: relative; display: grid; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; grid-template: 7% 75% 13% 5% / 1fr; overflow: hidden; padding: 0 3.2vw; background: radial-gradient(ellipse at 37% 43%, var(--card-white), var(--teal-pale) 72%); }
.screen-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--deep-teal); font-size: clamp(12px, 1vw, 18px); font-weight: 700; letter-spacing: .1em; }
.screen-event { display: inline-flex; align-items: center; gap: 10px; }
.screen-event img { display: block; width: 36px; height: 36px; object-fit: contain; }
.screen-tree { position: absolute; top: 8%; bottom: 17%; left: 0; display: flex; width: 72%; align-items: center; }
.screen-tree-art { width: 100%; max-height: 100%; }
.screen-stats { position: absolute; top: 13%; right: 4%; display: flex; width: 24%; height: 70%; flex-direction: column; align-items: flex-start; }
.screen-eyebrow { margin: 0 0 8px; color: var(--deep-teal); font-size: clamp(12px, 1vw, 18px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.screen-stats h1 { margin: 0; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(38px, 4vw, 74px); font-weight: 500; letter-spacing: -.03em; }
.screen-total { display: flex; align-items: baseline; gap: .12em; margin: 0 0 12px; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(18px, 1.65vw, 30px); }
.screen-total strong { padding: 0 .12em; border-radius: .08em; background: var(--deep-teal); color: var(--orange); font-size: clamp(54px, 6.6vw, 124px); font-weight: 600; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.screen-split { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-muted); font-size: clamp(14px, 1.1vw, 20px); }
.screen-split b { margin-left: 5px; color: var(--deep-teal); }
.screen-progress { width: 100%; height: 8px; margin: 18px 0; overflow: hidden; border-radius: 99px; background: var(--line); }
.screen-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); transition: width .22s ease; }
.screen-qr-block { display: flex; align-items: center; gap: 15px; margin-top: auto; }
.screen-qr-block img { display: block; width: clamp(90px, 8vw, 150px); height: clamp(90px, 8vw, 150px); border: 7px solid var(--card-white); border-radius: 8px; background: var(--card-white); box-shadow: var(--shadow-soft); }
.screen-qr-block p { margin: 0; color: var(--deep-teal); font-size: clamp(14px, 1.1vw, 20px); line-height: 1.45; }
.screen-ticker { position: absolute; right: 3.2vw; bottom: 5.5%; left: 3.2vw; display: flex; height: 11%; align-items: center; gap: 20px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticker-label { flex: 0 0 auto; color: var(--deep-teal); font-size: clamp(12px, .85vw, 16px); font-weight: 700; letter-spacing: .1em; }
.ticker-track { display: block; min-width: 0; flex: 1; overflow: hidden; color: var(--deep-teal); font-family: var(--font-heading); font-size: clamp(15px, 1.25vw, 22px); white-space: nowrap; }
.ticker-marquee { display: flex; width: max-content; align-items: center; gap: 42px; animation: ticker-scroll 75s linear infinite; }
.ticker-item { animation: ticker-in .4s ease both; }
.ticker-item b { color: var(--deep-teal); font-family: var(--font-body); font-size: .8em; font-weight: 700; }
.screen-footer { position: absolute; right: 3.2vw; bottom: 1.2%; left: 3.2vw; display: flex; justify-content: space-between; color: var(--ink-muted); font-size: clamp(11px, .75vw, 14px); letter-spacing: .03em; }

.admin-layout { width: min(100% - 36px, 1040px); }
.admin-login { max-width: 560px; margin: 70px auto 100px; padding: 32px; border: 1px solid var(--line-warm); border-radius: 24px; background: var(--card-white); box-shadow: var(--shadow); }
.admin-login h1, .admin-title-row h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.login-row { display: flex; gap: 10px; }
.login-row input { flex: 1; min-width: 0; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.admin-panel { padding-top: 36px; }
.admin-title-row { margin-bottom: 20px; }
.admin-title-row h1 { margin-bottom: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card-white); }
.stat-card span { display: block; margin-bottom: 6px; color: var(--ink-muted); font-size: .8rem; }
.stat-card strong { color: var(--deep-teal); font-family: var(--font-heading); font-size: 1.45rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-section { margin: 15px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card-white); }
.admin-section h2 { margin: 0; color: var(--deep-teal); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.admin-section-heading { margin-bottom: 15px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: .88rem; }
th { color: var(--deep-teal); font-size: .78rem; font-weight: 700; }
.settings-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: start; }
.settings-form { display: grid; grid-template-columns: 100px minmax(70px, 1fr) 90px minmax(70px, 1fr) auto; gap: 9px; align-items: center; }
.settings-form label { margin: 0; font-size: .82rem; }
.settings-form input { min-height: 44px; padding: 8px 10px; }
.settings-form .button { min-height: 44px; padding: 8px 13px; white-space: nowrap; }
.settings-form .form-message { grid-column: 1 / -1; }
.list-heading { align-items: end; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.filter-tabs button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--teal-wash); color: var(--deep-teal); font-size: .84rem; font-weight: 700; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.filter-tabs button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-pale); }
.admin-list { display: grid; gap: 10px; }
.admin-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.admin-row h3 { margin: 0 0 4px; color: var(--deep-teal); font-size: .98rem; }
.admin-row p { margin: 0 0 5px; color: var(--deep-teal); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.admin-row .row-meta { color: var(--ink-muted); font-size: .78rem; }
.row-actions { display: flex; flex-wrap: wrap; align-content: center; justify-content: end; gap: 6px; }
.row-actions button { min-height: 44px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--deep-teal); font-size: .78rem; font-weight: 700; cursor: pointer; }
.row-actions button:disabled { opacity: .55; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 17px; }
.pagination .button { min-height: 44px; padding: 8px 14px; }
#page-label { color: var(--ink-muted); font-size: .86rem; }
.ai-reason { padding: 9px 11px; border-left: 3px solid var(--orange); background: var(--warm-wash); }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes apple-pop { 0% { opacity: 0; transform: translateY(-22px) scale(.45); } 70% { opacity: 1; transform: translateY(2px) scale(1.08); } 100% { transform: translateY(0) scale(1); } }
@keyframes bubble-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes bubble-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ticker-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (min-width: 900px) {
  .form-layout { padding-top: 24px; }
  .intro { padding-top: 48px; }
  .tree-page-layout { width: min(100% - 56px, 1200px); }
  .tree-heading { padding-top: 24px; }
  .apple-card-backdrop { align-items: flex-end; justify-content: flex-end; padding: 30px; background: transparent; }
  .apple-card { width: 420px; margin: 0; }
}

@media (max-width: 700px) {
  .tree-page { min-height: 0; }
  .tree-page-layout { width: min(100% - 28px, 1100px); min-height: 0; }
  .tree-header { gap: 8px; flex-wrap: wrap; }
  .tree-header .brand { gap: 6px; font-size: .86rem; }
  .tree-header .brand-logo { width: 36px; height: 36px; }
  .tree-header .text-link { gap: 4px; font-size: .8rem; white-space: nowrap; }
  .full-tree-wrap { flex: 0 0 auto; margin-top: 6px; }
  .full-tree { width: 100%; }
  .tree-footer { padding-top: 10px; font-size: .72rem; }
  .tree-bubble { width: 70%; padding: 8px 10px; font-size: 13px; }
  .tree-bubble__name { font-size: 14px; }
  .tree-bubble__text { font-size: 13px; }
  .apple-card-backdrop { padding: 0 0 max(0px, env(safe-area-inset-bottom)); }
  .apple-card { width: 100%; max-height: 82svh; padding: 25px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .screen-layout { padding: 0 3vw; }
  .screen-topline { gap: 8px; font-size: 10px; letter-spacing: .04em; }
  .screen-event { gap: 5px; }
  .screen-event img { width: 28px; height: 28px; }
  .screen-tree { top: 13%; bottom: 23%; left: -8%; width: 74%; }
  .screen-stats { top: 16%; right: 3%; width: 28%; height: 68%; }
  .screen-stats h1 { font-size: clamp(28px, 6vw, 42px); }
  .screen-total strong { font-size: clamp(36px, 7vw, 64px); }
  .screen-split { gap: 5px 10px; }
  .screen-progress { margin: 10px 0; }
  .screen-qr-block { gap: 8px; }
  .screen-qr-block img { width: 70px; height: 70px; border-width: 4px; }
  .screen-ticker { right: 3vw; left: 3vw; gap: 10px; }
  .ticker-label { max-width: 70px; font-size: 9px; }
  .ticker-track { gap: 20px; }
  .ticker-marquee { gap: 24px; }
  .screen-footer { font-size: 9px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-card { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 82px 1fr 82px 1fr; }
  .settings-form .button { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .form-layout { width: min(100% - 26px, 680px); }
  .event-date { font-size: .68rem; text-align: right; }
  .intro { padding-top: 34px; }
  .preview-bottom { flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; }
  .preview-count { flex-wrap: wrap; gap: 3px 6px; }
  .preview-count strong { font-size: 1.7rem; }
  .count-label { font-size: .78rem; }
  .preview-card .text-link { font-size: .78rem; }
  .form-card { padding: 20px 17px; }
  .page-footer { align-items: flex-start; gap: 6px 12px; font-size: .72rem; }
  .footer-community img { width: 84px; height: 32px; }
  .tree-heading { padding-top: 18px; }
  .tree-heading h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .tree-heading > p:not(.eyebrow) { max-width: 310px; margin-right: auto; margin-left: auto; font-size: .84rem; }
  .tree-footer { justify-content: center; text-align: center; }
  .admin-layout { width: min(100% - 24px, 1040px); }
  .admin-login { margin: 44px auto 70px; padding: 22px; }
  .login-row { flex-direction: column; }
  .login-row .button { width: 100%; }
  .admin-title-row { align-items: flex-start; }
  .admin-title-row .button { min-height: 44px; padding: 9px 13px; font-size: .8rem; }
  .admin-section { padding: 17px 14px; }
  .admin-row { grid-template-columns: 1fr; }
  .row-actions { justify-content: start; }
  .settings-form { grid-template-columns: 74px 1fr; }
  .settings-form label:nth-of-type(2) { grid-column: 1; }
  .settings-form #target-count { grid-column: 2; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tree-bubble.is-entering { animation-name: bubble-in-reduced !important; }
  .tree-bubble.is-leaving { animation-name: bubble-out-reduced !important; }
  .apple-pop, .success-apple { animation-name: fade-only !important; }
  .ticker-marquee { animation: none !important; }
}

@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
@keyframes bubble-in-reduced { from { opacity: 0; } to { opacity: 1; } }
@keyframes bubble-out-reduced { from { opacity: 1; } to { opacity: 0; } }
