:root {
  --ink: #102938;
  --ink-soft: #395361;
  --paper: #f5f1e8;
  --paper-strong: #fbfaf6;
  --ocean: #155d6f;
  --ocean-deep: #0d2533;
  --mint: #b9d6c7;
  --coral: #e8705e;
  --sun: #e5b65d;
  --line: rgba(16, 41, 56, .14);
  --shadow: 0 24px 70px rgba(13, 37, 51, .12);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }

.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ocean-deep); color: #f9efd9; border-radius: 50%; }
.brand-mark svg { width: 21px; }
.brand strong { display: block; font-size: 15px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 2px; color: #74838a; font: 10px/1 "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; color: #5b6d74; font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 5px rgba(229, 182, 93, .16); }
.status-chip.live .status-dot { background: #4baf86; box-shadow: 0 0 0 5px rgba(75, 175, 134, .13); }
.icon-button, .modal-close { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; }
.icon-button:hover, .modal-close:hover { background: rgba(16, 41, 56, .07); }

.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr); gap: 60px; min-height: 592px; align-items: center; padding: 48px 0 68px; }
.hero-copy { padding-left: clamp(0px, 4vw, 54px); position: relative; z-index: 2; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 11px; color: var(--coral); font: 700 11px/1 "DM Sans", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow-line { width: 42px; height: 1px; background: var(--coral); }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 24px; font-size: clamp(54px, 6vw, 94px); line-height: .98; letter-spacing: -.06em; font-weight: 800; }
h1 em { color: var(--ocean); font-style: normal; }
.hero-copy > p { max-width: 470px; margin-top: 28px; color: var(--ink-soft); font-size: 16px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.primary-button, .ghost-button, .dark-button, .text-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 19px; border-radius: 999px; transition: .25s ease; }
.primary-button { background: var(--coral); color: white; box-shadow: 0 12px 25px rgba(232, 112, 94, .24); }
.primary-button:hover { background: #d45f4e; transform: translateY(-2px); }
.ghost-button { background: transparent; color: var(--ink); border: 1px solid rgba(16, 41, 56, .25); }
.ghost-button:hover { border-color: var(--ocean); color: var(--ocean); background: rgba(21, 93, 111, .05); }
.dark-button { color: white; background: var(--ocean-deep); width: 100%; }
.dark-button:hover { background: var(--ocean); transform: translateY(-2px); }
.primary-button svg, .ghost-button svg, .dark-button svg, .text-button svg { width: 16px; }
.hero-note { margin-top: 30px; color: #74838a; font-size: 12px; }
.live-pulse { width: 8px; height: 8px; margin-right: 8px; display: inline-block; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(232, 112, 94, .12); }
.hero-art { min-height: 480px; position: relative; isolation: isolate; }
.hero-image { position: absolute; inset: 24px 0 0 38px; border-radius: 46% 12% 12% 46%; background: linear-gradient(135deg, rgba(13, 37, 51, .05), rgba(13, 37, 51, .2)), url("https://images.unsplash.com/photo-1500534623283-312aade485b7?auto=format&fit=crop&w=1400&q=90") center/cover; filter: saturate(.85) contrast(1.03); box-shadow: var(--shadow); }
.hero-image::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(13, 37, 51, .02), rgba(13, 37, 51, .42)); }
.hero-orbit { position: absolute; z-index: -1; border: 1px solid rgba(21, 93, 111, .25); border-radius: 50%; }
.orbit-one { width: 470px; height: 470px; top: -2px; left: -15px; }
.orbit-two { width: 540px; height: 540px; top: -36px; left: -47px; border-color: rgba(232, 112, 94, .2); }
.hero-floating-card { position: absolute; display: flex; align-items: center; gap: 10px; min-width: 176px; padding: 13px 15px; color: var(--ink); background: rgba(251, 250, 246, .92); border: 1px solid rgba(251, 250, 246, .9); border-radius: 13px; box-shadow: 0 15px 32px rgba(13, 37, 51, .13); backdrop-filter: blur(14px); }
.hero-floating-card b, .hero-floating-card small { display: block; }
.hero-floating-card b { font-size: 12px; }
.hero-floating-card small { margin-top: 3px; color: #738087; font-size: 10px; }
.floating-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ocean); background: var(--mint); border-radius: 10px; }
.floating-icon svg { width: 15px; }
.card-tide { top: 92px; left: 0; }
.card-species { right: -14px; bottom: 55px; }
.species-mini { width: 31px; height: 31px; display: grid; place-items: center; background: #f5d39b; border-radius: 50%; font-size: 17px; }
.hero-stamp { position: absolute; right: 37px; top: 46px; color: white; text-align: right; transform: rotate(-10deg); opacity: .88; }
.hero-stamp span { display: block; font: 700 9px/1 "DM Sans", sans-serif; letter-spacing: .28em; }
.hero-stamp strong { display: block; margin-top: 7px; font: 800 21px/.86 "DM Sans", sans-serif; letter-spacing: .02em; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-item { padding: 0 30px; border-right: 1px solid var(--line); }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: 0; }
.stat-item strong { display: block; font: 700 31px/1 "DM Sans", sans-serif; letter-spacing: -.05em; }
.stat-item span { display: block; margin-top: 8px; color: #738087; font-size: 12px; }
.stat-item-highlight strong { color: var(--coral); }

.section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 72px 0 52px; }
.section-tab { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 19px 22px; text-align: left; border: 1px solid var(--line); color: var(--ink-soft); background: transparent; border-radius: 13px; transition: .25s ease; }
.section-tab svg { grid-row: span 2; width: 19px; margin-top: 2px; }
.section-tab span { font-weight: 700; color: var(--ink); font-size: 14px; }
.section-tab small { margin-top: 6px; color: #8b969b; font-size: 11px; }
.section-tab:hover, .section-tab.active { color: var(--ocean); border-color: var(--ocean); background: rgba(21, 93, 111, .06); box-shadow: 0 10px 24px rgba(21, 93, 111, .08); }
.section-tab.active span { color: var(--ocean); }

.content-panel { padding-bottom: 84px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 27px; }
.section-kicker { margin-bottom: 10px; color: var(--ocean); letter-spacing: .13em; }
h2 { font-size: clamp(28px, 3vw, 43px); line-height: 1.12; letter-spacing: -.055em; }
.text-button { padding: 0; min-height: auto; color: var(--coral); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--ocean); }
.explore-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .7fr); gap: 20px; }
.place-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.place-card { min-height: 340px; position: relative; overflow: hidden; display: flex; align-items: end; padding: 19px; border-radius: 14px; color: white; background: #204554; cursor: pointer; }
.place-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(13, 37, 51, .86) 100%), var(--card-image) center/cover; transition: transform .5s ease; }
.place-card:hover::before { transform: scale(1.06); }
.place-card::after { content: "→"; position: absolute; top: 17px; right: 17px; width: 30px; height: 30px; display: grid; place-items: center; background: rgba(251, 250, 246, .2); border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-size: 16px; }
.place-copy { position: relative; z-index: 1; }
.place-type { display: inline-block; color: #ffcfaa; font-size: 11px; }
.place-copy h3 { margin-top: 8px; font-size: 20px; }
.place-copy p { margin-top: 7px; color: rgba(255,255,255,.75); font-size: 11px; line-height: 1.6; }
.side-insight { padding: 29px; display: flex; flex-direction: column; border-radius: 14px; background: var(--mint); }
.insight-label { display: flex; align-items: center; gap: 8px; color: #447467; font: 700 10px "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.tiny-wave { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.55); }
.tiny-wave svg { width: 14px; }
.side-insight h3 { margin-top: 43px; font-size: 25px; line-height: 1.2; letter-spacing: -.05em; }
.side-insight > p { margin-top: 14px; color: #3e5f58; font-size: 13px; line-height: 1.8; }
.insight-facts { display: grid; gap: 12px; margin: 29px 0; }
.insight-facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(16, 41, 56, .14); }
.insight-facts strong { color: #254f45; font-size: 12px; }
.insight-facts span { color: #5e7c74; font-size: 11px; text-align: right; }
.species-strip-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 72px 0 24px; }
.muted-note { color: #8d979a; font-size: 12px; }
.species-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.species-card { min-height: 165px; position: relative; padding: 19px; overflow: hidden; border-radius: 14px; background: var(--paper-strong); border: 1px solid var(--line); cursor: pointer; transition: .25s ease; }
.species-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(13, 37, 51, .08); }
.species-card::after { content: ""; position: absolute; right: -15px; bottom: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--species-accent); opacity: .42; }
.species-emoji { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--species-accent); font-size: 21px; }
.species-card h3 { margin-top: 16px; font-size: 15px; }
.species-card p { margin-top: 5px; color: #7b898d; font-size: 11px; }
.species-tag { position: absolute; right: 14px; top: 15px; color: #789096; font-size: 10px; }
.route-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 72px 0 24px; }
.itinerary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.itinerary-card { min-height: 270px; position: relative; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #f2eee4; }
.itinerary-card::after { content: ""; position: absolute; width: 105px; height: 105px; right: -38px; bottom: -45px; border: 1px solid rgba(21, 93, 111, .16); border-radius: 50%; }
.itinerary-topline { display: flex; justify-content: space-between; gap: 8px; color: #879497; font: 700 10px "DM Sans", sans-serif; }
.itinerary-number { color: var(--coral); letter-spacing: .12em; }
.itinerary-time { white-space: nowrap; }
.itinerary-icon { width: 38px; height: 38px; display: grid; place-items: center; margin: 22px 0 16px; border-radius: 12px; color: var(--ocean); background: #dcebe4; }
.itinerary-icon svg { width: 18px; }
.itinerary-card h3 { font-size: 16px; letter-spacing: -.03em; }
.itinerary-card > strong { display: block; margin-top: 7px; color: var(--ocean); font-size: 12px; }
.itinerary-card > p { margin-top: 9px; color: #65777b; font-size: 11px; line-height: 1.7; }
.itinerary-tip { display: flex; align-items: start; gap: 6px; position: absolute; left: 19px; right: 19px; bottom: 17px; color: #7a898c; font-size: 10px; line-height: 1.55; }
.itinerary-tip svg { width: 13px; flex: 0 0 auto; margin-top: 1px; color: var(--coral); }
.data-note { display: flex; align-items: start; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(21, 93, 111, .15); border-radius: 10px; color: #6b7b7e; background: rgba(255,255,255,.46); font-size: 10px; line-height: 1.65; }
.data-note svg { width: 14px; flex: 0 0 auto; margin-top: 1px; color: var(--ocean); }
.data-meta { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 10px; color: #8b9798; font-size: 10px; }
.data-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.data-meta svg { width: 13px; color: var(--ocean); }
.data-meta strong { color: #5f7478; font-weight: 600; }
.data-meta .text-button { color: var(--ocean); }

.confidence-note { display: inline-flex; align-items: center; gap: 8px; color: #6d7d81; font-size: 11px; }
.confidence-note svg { width: 15px; color: #4baf86; }
.identify-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 20px; }
.upload-card, .result-card { min-height: 440px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 36px; border-radius: 16px; }
.upload-card { background: var(--ocean-deep); color: white; text-align: center; }
.upload-glow { position: absolute; width: 350px; height: 350px; left: -105px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(185, 214, 199, .28), transparent 67%); }
.upload-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -95px; border-radius: 50%; border: 1px solid rgba(185, 214, 199, .35); }
.upload-icon { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 22px; color: var(--mint); }
.upload-icon svg { width: 28px; }
.upload-card h3 { position: relative; margin-top: 24px; font-size: 23px; letter-spacing: -.04em; }
.upload-card p { position: relative; max-width: 240px; margin: 12px 0 25px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.7; }
.upload-actions { position: relative; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.upload-card .primary-button { position: relative; background: var(--mint); color: var(--ocean-deep); box-shadow: none; }
.upload-card .primary-button:hover { background: #d0e5da; }
.upload-card .ghost-button { min-height: 46px; color: white; border-color: rgba(255,255,255,.35); }
.upload-card .ghost-button:hover { color: var(--mint); border-color: var(--mint); background: rgba(255,255,255,.06); }
.demo-link { position: relative; margin-top: 17px; border: 0; padding: 0; color: #b2d7c8; background: transparent; font-size: 12px; }
.demo-link:hover { text-decoration: underline; }
.photo-tips { position: relative; display: grid; gap: 7px; width: min(100%, 270px); margin: 20px 0 30px; padding: 0; list-style: none; color: rgba(255,255,255,.62); text-align: left; font-size: 10px; line-height: 1.45; }
.photo-tips li { display: flex; align-items: start; gap: 7px; }
.photo-tips svg { width: 13px; flex: 0 0 auto; margin-top: 1px; color: var(--mint); }
.upload-tip { position: absolute; bottom: 20px; display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.52); font-size: 10px; }
.upload-tip svg { width: 13px; }
.upload-card.dragging { outline: 2px dashed var(--mint); outline-offset: -12px; }
.result-card { align-items: stretch; background: var(--paper-strong); border: 1px solid var(--line); }
.result-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #75868b; }
.result-empty span { margin-top: 17px; font-weight: 700; font-size: 16px; }
.result-empty small { max-width: 270px; margin-top: 9px; color: #9aa6a8; font-size: 11px; line-height: 1.7; }
.result-orbit { width: 92px; height: 92px; display: grid; place-items: center; border: 1px dashed rgba(21, 93, 111, .42); border-radius: 50%; color: var(--ocean); }
.result-orbit svg { width: 27px; }
.result-loaded { width: 100%; }
.result-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.result-kicker { color: var(--ocean); font: 700 10px "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.result-header h3 { margin-top: 8px; font-size: 29px; letter-spacing: -.05em; }
.result-latin { margin-top: 5px; color: #879497; font: italic 11px "DM Sans", sans-serif; }
.result-confidence { padding: 7px 10px; border-radius: 999px; color: #3a7b65; background: #dceee5; font: 700 11px "DM Sans", sans-serif; white-space: nowrap; }
.result-clues { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--ocean); background: #edf4f2; }
.result-clues-label { display: flex; align-items: center; gap: 6px; color: #49766d; font-size: 10px; }
.result-clues-label svg { width: 14px; color: var(--ocean); }
.result-clues p { margin-top: 6px; color: #55716e; font-size: 11px; line-height: 1.65; }
.result-summary { margin: 18px 0; color: #4f656c; font-size: 13px; line-height: 1.8; }
.result-caution { display: flex; align-items: start; gap: 8px; margin: -6px 0 16px; padding: 10px 12px; border-radius: 9px; background: #fff5df; color: #8a6a35; font-size: 11px; line-height: 1.6; }
.result-caution svg { width: 14px; flex: 0 0 auto; margin-top: 1px; }
.result-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.result-meta div { padding: 13px; background: #f2eee4; border-radius: 10px; }
.result-meta small, .result-meta strong { display: block; }
.result-meta small { color: #8b9798; font-size: 10px; }
.result-meta strong { margin-top: 6px; font-size: 12px; }
.result-advice { display: flex; gap: 10px; padding: 13px; border-left: 3px solid var(--coral); background: #fff4e9; color: #7a5948; font-size: 12px; line-height: 1.7; }
.result-advice svg { flex: 0 0 auto; width: 15px; margin-top: 2px; color: var(--coral); }
.result-next-stop { margin-top: 14px; padding: 14px; border-radius: 10px; background: #e6f0ed; color: #315f56; }
.next-stop-label { display: flex; align-items: center; gap: 6px; color: #5d8078; font-size: 10px; }
.next-stop-label svg { width: 14px; color: var(--ocean); }
.result-next-stop > strong { display: block; margin-top: 7px; color: var(--ocean-deep); font-size: 15px; }
.result-next-stop > p { margin-top: 5px; color: #55736d; font-size: 11px; line-height: 1.6; }
.recognition-footnote { display: flex; gap: 14px; align-items: center; margin-top: 20px; padding: 19px 22px; background: var(--mint); border-radius: 13px; color: #365d54; font-size: 12px; line-height: 1.7; }
.footnote-number { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.55); color: #28574d; font: 700 11px "DM Sans", sans-serif; }
.sample-strip { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #eef4f1; }
.sample-strip-heading, .history-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.sample-kicker { display: block; color: var(--coral); font: 700 10px "DM Sans", sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.sample-strip h3, .history-heading h3 { margin-top: 7px; font-size: 18px; letter-spacing: -.035em; }
.sample-strip-heading > span { color: #70837f; font-size: 11px; }
.sample-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 17px; }
.sample-button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid rgba(21, 93, 111, .15); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.55); text-align: left; transition: .2s ease; }
.sample-button:hover { border-color: var(--ocean); background: white; transform: translateY(-2px); }
.sample-button .sample-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #dcebe4; font-size: 18px; }
.sample-button strong, .sample-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-button strong { font-size: 12px; }
.sample-button small { margin-top: 4px; color: #819093; font-size: 10px; }
.sample-button > svg { width: 14px; margin-left: auto; color: var(--ocean); }
.history-section { margin-top: 42px; }
.history-heading { align-items: center; }
.history-heading .text-button { color: #8d6d69; }
.history-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 15px; }
.history-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 11px; color: #8b9798; font-size: 11px; line-height: 1.6; }
.history-empty, .history-empty + * { grid-column: 1 / -1; }
.history-item { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-strong); }
.history-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-item-name { overflow: hidden; color: var(--ocean); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.history-item-source { color: #8c999b; font-size: 9px; white-space: nowrap; }
.history-item p { display: -webkit-box; overflow: hidden; margin-top: 8px; color: #687b7f; font-size: 10px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-item time { display: block; margin-top: 10px; color: #a0aaab; font: 10px "DM Sans", sans-serif; }

.score-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--coral); font-size: 13px; }
.score-badge svg { width: 20px; }
.score-badge b { font-size: 22px; }
.action-intro { margin-bottom: 24px; }
.action-progress { height: 6px; overflow: hidden; border-radius: 10px; background: #e2ded3; }
.action-progress span { display: block; width: 0; height: 100%; background: var(--coral); border-radius: inherit; transition: width .35s ease; }
.action-intro p { margin-top: 10px; color: #7a898c; font-size: 12px; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); gap: 20px; }
.quiz-card { min-height: 358px; padding: 33px; border-radius: 16px; background: var(--paper-strong); border: 1px solid var(--line); }
.quiz-index { color: var(--coral); font: 700 11px "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.quiz-card h3 { margin: 21px 0 22px; max-width: 560px; font-size: 25px; line-height: 1.45; letter-spacing: -.04em; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: transparent; text-align: left; font-size: 13px; transition: .2s ease; }
.quiz-option:hover { border-color: var(--ocean); background: rgba(21, 93, 111, .05); }
.quiz-option .option-letter { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #ece9df; color: #7e898b; font: 700 11px "DM Sans", sans-serif; }
.quiz-option.correct { border-color: #4baf86; background: #e7f4ee; color: #2b6a53; }
.quiz-option.correct .option-letter { background: #4baf86; color: white; }
.quiz-option.wrong { border-color: var(--coral); background: #fff0ea; color: #9f4a3e; }
.quiz-option.wrong .option-letter { background: var(--coral); color: white; }
.quiz-explain { display: flex; align-items: start; gap: 8px; margin-top: 17px; padding: 12px 14px; border-radius: 9px; background: #eef4f1; color: #466d60; font-size: 12px; line-height: 1.7; }
.quiz-explain svg { flex: 0 0 auto; width: 15px; margin-top: 2px; }
.badge-card { min-height: 358px; padding: 28px; position: relative; overflow: hidden; color: white; border-radius: 16px; background: var(--ocean); }
.badge-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.04), 0 0 0 56px rgba(255,255,255,.03); }
.badge-circle { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #e9ce91; }
.badge-circle svg { width: 27px; }
.badge-kicker { display: block; margin-top: 39px; color: #acd0c3; font: 700 10px "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.badge-card h3 { margin-top: 8px; font-size: 27px; letter-spacing: -.04em; }
.badge-card p { margin-top: 13px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.8; }
.badge-checklist { position: absolute; bottom: 27px; left: 28px; display: flex; gap: 11px; flex-wrap: wrap; }
.badge-checklist span { display: inline-flex; align-items: center; gap: 5px; color: #d6ebe0; font-size: 11px; }
.badge-checklist svg { width: 13px; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 0 34px; border-top: 1px solid var(--line); color: #8a9498; font-size: 10px; }
.footer-actions { display: inline-flex; align-items: center; gap: 16px; }
.footer-link { padding: 0; border: 0; color: var(--ocean); background: transparent; font-size: 10px; }
.footer-link:hover { color: var(--coral); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 16px; opacity: 0; pointer-events: none; color: white; background: var(--ocean-deep); border-radius: 999px; box-shadow: 0 10px 25px rgba(13, 37, 51, .2); transform: translate(-50%, 20px); transition: .25s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13, 37, 51, .52); backdrop-filter: blur(5px); }
.modal-backdrop[hidden], [hidden] { display: none !important; }
.detail-modal { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; width: min(780px, 100%); overflow: hidden; border-radius: 18px; background: var(--paper-strong); box-shadow: 0 25px 90px rgba(13,37,51,.27); }
.modal-close { position: absolute; z-index: 2; right: 15px; top: 15px; color: white; border-color: rgba(255,255,255,.6); background: rgba(13,37,51,.25); }
.modal-image { min-height: 390px; background: center/cover; }
.modal-content { padding: 45px 35px 35px; }
.modal-tag { display: inline-block; color: var(--coral); font-size: 11px; }
.modal-content h2 { margin-top: 10px; }
.modal-content > p { margin-top: 17px; color: #5c6e73; font-size: 13px; line-height: 1.85; }
.modal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 27px 0; }
.modal-detail-grid div { padding: 14px; border-radius: 10px; background: #f2eee4; }
.modal-detail-grid small, .modal-detail-grid strong { display: block; }
.modal-detail-grid small { color: #8b9798; font-size: 10px; }
.modal-detail-grid strong { margin-top: 7px; font-size: 12px; line-height: 1.5; }
.modal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-action { max-width: 230px; }
.map-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 15px; border: 1px solid rgba(16, 41, 56, .2); border-radius: 999px; color: var(--ocean); font-size: 12px; }
.map-link:hover { border-color: var(--ocean); background: rgba(21, 93, 111, .05); }
.map-link svg { width: 15px; }
.about-modal { position: relative; width: min(700px, 100%); max-height: min(760px, calc(100vh - 34px)); overflow: auto; padding: 42px; border-radius: 18px; background: var(--paper-strong); box-shadow: 0 25px 90px rgba(13,37,51,.27); }
.about-kicker { color: var(--coral); font: 700 10px "DM Sans", sans-serif; letter-spacing: .18em; }
.about-modal h2 { margin-top: 10px; }
.about-lead { max-width: 590px; margin-top: 15px; color: #5c6e73; font-size: 13px; line-height: 1.85; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 27px; }
.about-grid div { padding: 15px; border-radius: 10px; background: #f2eee4; }
.about-grid span { display: block; color: var(--ocean); font-size: 10px; }
.about-grid strong { display: block; margin-top: 8px; color: #526970; font-size: 11px; line-height: 1.7; font-weight: 500; }
.about-sources { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.about-sources-heading { display: flex; justify-content: space-between; gap: 14px; color: var(--ocean); font-size: 12px; font-weight: 700; }
.about-sources-heading small { color: #8b9798; font-size: 10px; font-weight: 400; }
.about-sources ul { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.about-sources li { padding-left: 13px; position: relative; font-size: 11px; line-height: 1.6; }
.about-sources li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.about-sources a { color: #557b78; text-decoration: none; }
.about-sources a:hover { color: var(--coral); text-decoration: underline; }

@media (max-width: 980px) {
  .shell { width: min(100% - 32px, 760px); }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-top: 40px; }
  .hero-copy { padding-left: 0; }
  .hero-art { min-height: 430px; }
  .hero-image { left: 20px; }
  .orbit-one { left: -20px; }
  .orbit-two { left: -45px; }
  .place-list, .species-grid { grid-template-columns: repeat(2, 1fr); }
  .itinerary-grid { grid-template-columns: repeat(2, 1fr); }
  .side-insight { grid-column: span 2; }
  .species-card:last-child { display: none; }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 560px); }
  .topbar { height: 73px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 8px; }
  .status-chip { display: none; }
  .hero { min-height: auto; padding: 38px 0 35px; }
  h1 { font-size: clamp(51px, 15vw, 78px); }
  .hero-copy > p { font-size: 14px; line-height: 1.8; }
  .hero-art { min-height: 330px; margin-top: 10px; }
  .hero-image { inset: 20px 6px 0 17px; border-radius: 35% 12% 12% 35%; }
  .orbit-one { width: 340px; height: 340px; top: -4px; left: -21px; }
  .orbit-two { width: 390px; height: 390px; top: -28px; left: -46px; }
  .card-tide { top: 38px; left: -4px; transform: scale(.88); transform-origin: left center; }
  .card-species { right: -12px; bottom: 25px; transform: scale(.88); transform-origin: right center; }
  .hero-stamp { right: 30px; top: 29px; transform: rotate(-10deg) scale(.72); transform-origin: right top; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 20px 0; padding: 22px 0; }
  .stat-item { padding: 0 15px; border-right: 0; border-left: 1px solid var(--line); }
  .stat-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat-item strong { font-size: 27px; }
  .section-tabs { gap: 7px; margin: 45px 0 35px; }
  .section-tab { padding: 13px 10px; display: block; text-align: center; }
  .section-tab svg { display: block; margin: 0 auto 9px; width: 18px; }
  .section-tab span { display: block; font-size: 12px; }
  .section-tab small { display: none; }
  .section-heading, .species-strip-heading, .route-heading { align-items: start; flex-direction: column; gap: 14px; }
  h2 { font-size: 30px; }
  .text-button { align-self: end; }
  .explore-layout, .identify-layout, .quiz-layout { grid-template-columns: 1fr; }
  .place-list, .species-grid, .itinerary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .place-card { min-height: 240px; padding: 14px; }
  .place-copy h3 { font-size: 16px; }
  .place-copy p { font-size: 10px; }
  .side-insight { grid-column: auto; padding: 23px; }
  .side-insight h3 { margin-top: 28px; font-size: 22px; }
  .species-card { min-height: 145px; padding: 14px; }
  .species-card h3 { margin-top: 12px; font-size: 13px; }
  .species-card p { font-size: 10px; }
  .species-card:nth-child(n+5) { display: none; }
  .itinerary-card { min-height: 265px; padding: 14px; }
  .itinerary-card:nth-child(n+3) { display: none; }
  .itinerary-tip { left: 14px; right: 14px; bottom: 14px; }
  .upload-card, .result-card { min-height: 380px; padding: 27px 20px; }
  .data-meta { align-items: start; flex-direction: column; gap: 8px; }
  .sample-strip { padding: 18px 14px; }
  .sample-strip-heading { align-items: start; flex-direction: column; gap: 6px; }
  .sample-buttons { grid-template-columns: 1fr; }
  .history-list { grid-template-columns: 1fr 1fr; }
  .history-heading { align-items: start; }
  .history-item:last-child { display: none; }
  .quiz-card { padding: 24px 18px; }
  .quiz-card h3 { font-size: 21px; }
  .badge-card { min-height: 300px; }
  .detail-modal { grid-template-columns: 1fr; max-height: calc(100vh - 34px); overflow-y: auto; }
  .modal-image { min-height: 170px; }
  .modal-content { padding: 28px 23px 24px; }
  .modal-detail-grid { margin: 20px 0; }
  .modal-actions { align-items: stretch; flex-direction: column; }
  .modal-action, .map-link { max-width: none; width: 100%; }
  .footer { flex-direction: column; gap: 7px; }
  .footer-actions { justify-content: space-between; }
  .about-modal { padding: 32px 22px 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-sources-heading { align-items: start; flex-direction: column; gap: 5px; }
}
