:root {
  --bg: #0e0a07;
  --bg-soft: #17110b;
  --panel: rgba(31, 22, 14, 0.88);
  --panel-strong: #21170f;
  --line: rgba(255, 204, 128, 0.16);
  --line-strong: rgba(255, 196, 100, 0.34);
  --text: #fff9ef;
  --muted: #c9b9a5;
  --faint: #8f7d6c;
  --orange: #ff8a24;
  --orange-strong: #ff6a00;
  --gold: #f6c463;
  --gold-pale: #ffe3a2;
  --danger: #ff6b6b;
  --success: #7ee0a8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% -10%, rgba(255, 121, 24, 0.12), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(246, 196, 99, 0.08), transparent 30%),
    linear-gradient(180deg, #100b07 0%, #0d0906 52%, #090705 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; }
textarea, input { color: var(--text); }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(255, 196, 99, 0.82);
  outline-offset: 3px;
}
button:disabled { opacity: .52; cursor: not-allowed; }
.hidden { display: none !important; }
.skip-link {
  position: fixed; z-index: 999; left: 12px; top: 12px; transform: translateY(-160%);
  background: var(--gold); color: #1a0e04; padding: 10px 14px; border-radius: 12px; font-weight: 800;
}
.skip-link:focus { transform: none; }

.ambient { position: fixed; pointer-events: none; filter: blur(45px); border-radius: 999px; opacity: .25; z-index: 0; }
.ambient-a { width: 230px; height: 230px; top: 14%; right: -110px; background: #ff7214; animation: drift 11s ease-in-out infinite alternate; }
.ambient-b { width: 180px; height: 180px; top: 56%; left: -95px; background: #e9b94f; animation: drift 13s ease-in-out -4s infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(14px, 38px, 0) scale(1.12); } }

.app-shell { position: relative; z-index: 1; min-height: 100dvh; padding-bottom: calc(90px + var(--safe-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  min-height: calc(68px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) max(16px, var(--safe-right)) 10px max(16px, var(--safe-left));
  background: linear-gradient(180deg, rgba(13, 9, 6, .97) 0%, rgba(13, 9, 6, .84) 72%, rgba(13, 9, 6, 0) 100%);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; min-height: 44px; }
.brand img { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 8px 24px rgba(255, 119, 20, .22); }
.brand span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand small { color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px;
  border: 1px solid transparent; background: rgba(255,255,255,.04); cursor: pointer;
}
.icon-button.bordered { border-color: var(--line); background: var(--panel); }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice { margin: 0 16px 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 107, 107, .12); border: 1px solid rgba(255, 107, 107, .3); color: #ffd4d4; font-size: 13px; }
.notice-info { background: rgba(246, 196, 99, .1); border-color: rgba(246, 196, 99, .25); color: var(--gold-pale); }
.main-content { width: min(100%, 760px); margin: 0 auto; padding: 2px max(14px, var(--safe-right)) 24px max(14px, var(--safe-left)); }
.view { animation: viewIn .38s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.reveal { animation: reveal .68s cubic-bezier(.2,.76,.25,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px) scale(.985); } }

.hero-card, .input-card, .detail-section, .guide-note {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(42, 29, 17, .94), rgba(22, 15, 10, .96)); box-shadow: var(--shadow);
}
.hero-card { padding: 26px 22px 22px; margin: 8px 0 16px; }
.hero-card::before {
  content: ""; position: absolute; inset: -45% -25% auto 40%; height: 260px;
  background: conic-gradient(from 150deg, rgba(255, 138, 36, 0), rgba(255, 138, 36, .28), rgba(246, 196, 99, .08), transparent 70%);
  filter: blur(14px); transform: rotate(-12deg); animation: sweep 8s ease-in-out infinite alternate;
}
@keyframes sweep { to { transform: rotate(18deg) translateX(-30px); } }
.hero-topline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .24em; }
.time-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.16); }
.hero-card h1, .page-heading h1 { position: relative; margin: 18px 0 12px; font-size: clamp(30px, 9vw, 52px); line-height: 1.14; letter-spacing: -.055em; }
.hero-card h1 em, .page-heading h1 em { color: var(--gold); font-style: normal; text-shadow: 0 0 35px rgba(246,196,99,.17); }
.hero-card > p, .page-heading > p { position: relative; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.difference-card { position: relative; margin-top: 22px; padding: 14px; display: flex; align-items: center; gap: 12px; border-radius: 18px; background: rgba(255, 154, 51, .08); border: 1px solid rgba(255, 166, 70, .16); }
.difference-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--orange), #c94c00); font-weight: 900; box-shadow: 0 8px 24px rgba(255, 106, 0, .24); }
.difference-card div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.difference-card small { color: var(--faint); font-size: 10px; }
.difference-card strong { font-size: 13px; line-height: 1.5; }

.input-card { padding: 22px 18px; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; }
.section-number { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #241207; background: linear-gradient(145deg, var(--gold-pale), var(--orange)); font-size: 11px; font-weight: 900; box-shadow: 0 8px 22px rgba(255, 122, 24, .16); }
.section-heading h2 { margin: 1px 0 4px; font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.5; }
.choice-grid { display: grid; gap: 9px; margin-top: 17px; }
.stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice-chip { min-height: 57px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); color: var(--muted); padding: 9px 10px; text-align: left; font-size: 12px; line-height: 1.35; cursor: pointer; transition: .2s ease; }
.choice-chip span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 5px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--gold); font-size: 10px; font-weight: 900; }
.choice-chip.compact { min-height: 48px; text-align: center; padding: 8px 4px; font-weight: 800; }
.choice-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.choice-chip.selected { border-color: rgba(255, 169, 71, .64); color: var(--text); background: linear-gradient(145deg, rgba(255, 137, 35, .18), rgba(246, 196, 99, .06)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 12px 30px rgba(255, 106, 0, .08); }
.choice-chip.selected span { color: #251307; background: linear-gradient(145deg, var(--gold), var(--orange)); }
.divider { height: 1px; margin: 22px 0; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.textarea-wrap { position: relative; display: block; margin-top: 17px; }
.textarea-wrap textarea, .memo-field textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 18px; background: rgba(7,5,4,.45); color: var(--text); padding: 15px 15px 30px; line-height: 1.7; font-size: 16px; min-height: 126px; }
.textarea-wrap textarea::placeholder, .memo-field textarea::placeholder { color: #746455; }
.textarea-wrap textarea:focus, .memo-field textarea:focus { border-color: rgba(246,196,99,.58); background: rgba(11,7,5,.7); }
.textarea-wrap > span { position: absolute; bottom: 10px; right: 13px; color: var(--faint); font-size: 10px; pointer-events: none; }
.prompt-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.mini-prompt { min-height: 36px; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--faint); font-size: 11px; cursor: pointer; }
.mini-prompt:hover { color: var(--gold-pale); border-color: var(--line-strong); }
.primary-button, .secondary-button, .danger-button {
  min-height: 52px; border-radius: 17px; font-weight: 900; letter-spacing: .015em; cursor: pointer; transition: transform .18s ease, filter .18s ease;
}
.primary-button { width: 100%; margin-top: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; color: #241207; background: linear-gradient(120deg, #ffd07a 0%, #ff9a36 44%, #ff7216 100%); box-shadow: 0 14px 34px rgba(255, 112, 18, .24), inset 0 1px rgba(255,255,255,.5); }
.primary-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: scale(.985); }
.secondary-button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); color: var(--gold-pale); padding: 0 16px; }
.danger-button { border: 1px solid rgba(255,107,107,.32); background: rgba(255,107,107,.08); color: #ffc2c2; padding: 0 16px; }
.form-hint { margin: 10px 2px 0; min-height: 20px; color: #ffaaa2; font-size: 12px; }
.autosave-status { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--faint); font-size: 10px; margin: 8px 0 0; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(126,224,168,.45); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(126,224,168,0); } }

.results-section { margin: 28px 0 0; scroll-margin-top: 80px; }
.results-heading { padding: 0 4px; }
.context-strip { margin: 15px 0 12px; padding: 12px 14px; border-left: 3px solid var(--orange); border-radius: 0 14px 14px 0; background: rgba(255,138,36,.06); color: var(--muted); font-size: 12px; line-height: 1.65; }
.result-cards { display: grid; gap: 12px; }
.result-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; padding: 18px; background: linear-gradient(145deg, rgba(35,24,15,.95), rgba(18,12,8,.96)); box-shadow: 0 16px 45px rgba(0,0,0,.22); animation: cardIn .52s cubic-bezier(.2,.75,.25,1) both; }
.result-card:nth-child(2) { animation-delay: .08s; }
.result-card:nth-child(3) { animation-delay: .16s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.result-card::after { content:""; position:absolute; width:110px; height:110px; border-radius:50%; right:-52px; top:-55px; background: radial-gradient(circle, rgba(255,141,35,.16), transparent 66%); }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-type { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.result-type i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 16px currentColor; }
.result-time { color: var(--faint); font-size: 10px; }
.result-card h3 { margin: 13px 0 7px; font-size: 20px; line-height: 1.4; letter-spacing: -.03em; }
.result-card > p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; }
.metric-list { display: grid; gap: 8px; margin: 16px 0; }
.metric { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 8px; font-size: 10px; color: var(--faint); }
.metric-track { height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); }
.metric-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--gold)); transform-origin: left; animation: grow .75s .15s both; }
@keyframes grow { from { transform: scaleX(0); } }
.metric b { color: var(--gold-pale); text-align: right; font-size: 10px; }
.select-result { width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); color: var(--gold-pale); font-weight: 800; cursor: pointer; }
.select-result:hover { background: rgba(255,138,36,.11); }
.result-card.recommended { border-color: rgba(246,196,99,.4); }
.recommend-badge { position: absolute; top: 12px; right: 12px; padding: 5px 8px; border-radius: 999px; background: rgba(246,196,99,.12); color: var(--gold-pale); font-size: 9px; font-weight: 800; }

.detail-section { margin-top: 18px; padding: 24px 18px; scroll-margin-top: 80px; }
.detail-glow { position: absolute; top: -100px; right: -80px; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(255,130,26,.24), transparent 65%); filter: blur(6px); }
.detail-label { position: relative; color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .22em; }
.detail-section h2 { position: relative; margin: 13px 0 8px; font-size: 26px; line-height: 1.35; letter-spacing: -.04em; }
.detail-summary { position: relative; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 18px; }
.detail-grid article { padding: 14px; min-height: 108px; border-radius: 17px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.detail-grid small { display: block; color: var(--faint); font-size: 9px; margin-bottom: 8px; }
.detail-grid strong { font-size: 12px; line-height: 1.65; }
.action-plan { margin-top: 18px; padding: 17px; border-radius: 18px; background: rgba(7,5,4,.38); border: 1px solid var(--line); }
.action-plan h3 { margin: 0 0 11px; font-size: 13px; }
.action-plan ol { margin: 0; padding: 0; list-style: none; counter-reset: steps; display: grid; gap: 9px; }
.action-plan li { counter-increment: steps; display: grid; grid-template-columns: 26px 1fr; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.action-plan li::before { content: counter(steps); width: 24px; height: 24px; display:grid; place-items:center; border-radius:8px; background: rgba(255,138,36,.12); color: var(--gold); font-size: 10px; font-weight: 900; }
.memo-field { display: grid; gap: 8px; margin-top: 18px; }
.memo-field > span { color: var(--gold-pale); font-size: 12px; font-weight: 800; }
.memo-field textarea { min-height: 92px; padding-bottom: 14px; }
.detail-actions { display: grid; gap: 9px; }
.detail-actions .secondary-button { width: 100%; }
.save-status { min-height: 18px; margin: 9px 0 0; color: var(--success); text-align: center; font-size: 11px; }

.page-heading { padding: 24px 8px 18px; }
.page-heading h1 { margin-top: 14px; }
.rediscovery-card { margin: 0 0 14px; padding: 18px; border: 1px solid rgba(246,196,99,.26); border-radius: 22px; background: linear-gradient(135deg, rgba(246,196,99,.11), rgba(255,116,19,.06)); }
.rediscovery-card p { margin: 10px 0 6px; color: var(--text); line-height: 1.7; font-size: 13px; }
.text-button { min-height: 40px; border: 0; background: transparent; color: var(--gold); font-size: 12px; font-weight: 800; padding: 4px 0; cursor: pointer; }
.timeline-tools { display: grid; grid-template-columns: 1fr 44px; gap: 8px; margin-bottom: 12px; }
.search-field { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.search-field svg { width: 18px; height: 18px; fill:none; stroke:var(--faint); stroke-width:1.8; stroke-linecap:round; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #756452; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.stat-card { min-height: 82px; padding: 13px; border-radius: 17px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.stat-card small { display: block; color: var(--faint); font-size: 9px; margin-bottom: 7px; }
.stat-card strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.stat-card span { color: var(--gold); font-size: 9px; margin-left: 2px; }
.timeline-list { position: relative; display: grid; gap: 12px; }
.timeline-list::before { content:""; position:absolute; left:16px; top:14px; bottom:14px; width:1px; background: linear-gradient(var(--orange), rgba(246,196,99,.1)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.timeline-dot { width: 34px; height: 34px; z-index:1; border-radius: 12px; display:grid; place-items:center; color:#241207; background:linear-gradient(145deg,var(--gold),var(--orange)); font-size:10px; font-weight:900; box-shadow:0 8px 20px rgba(255,122,24,.18); }
.timeline-card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 16px; cursor: pointer; }
.timeline-date { display:flex; justify-content:space-between; gap:10px; color:var(--faint); font-size:9px; }
.timeline-card h3 { margin:9px 0 5px; font-size:16px; line-height:1.45; }
.timeline-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.timeline-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:11px; }
.timeline-tags span { padding:5px 8px; border-radius:999px; background:rgba(255,138,36,.08); color:var(--gold-pale); font-size:9px; }
.empty-state { text-align:center; padding:54px 20px; border:1px dashed var(--line); border-radius:24px; color:var(--muted); }
.empty-mark { width:58px; height:58px; margin:0 auto 14px; display:grid; place-items:center; border-radius:19px; background:rgba(255,138,36,.08); color:var(--gold); font-size:26px; }
.empty-state h2 { color:var(--text); font-size:18px; }
.empty-state p { font-size:12px; line-height:1.7; }
.empty-state .secondary-button { margin-top:10px; }

.guide-list { display:grid; gap:10px; }
.guide-card { display:grid; grid-template-columns:48px 1fr; gap:13px; padding:18px; border:1px solid var(--line); border-radius:20px; background:var(--panel); }
.guide-card > span { width:44px; height:44px; display:grid; place-items:center; border-radius:14px; background:linear-gradient(145deg,rgba(246,196,99,.18),rgba(255,111,16,.1)); color:var(--gold); font-weight:900; }
.guide-card h2 { margin:1px 0 6px; font-size:16px; }
.guide-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.guide-note { margin-top:14px; padding:20px; }
.guide-note h2 { margin:0 0 7px; font-size:16px; }
.guide-note p { margin:0; color:var(--muted); font-size:12px; line-height:1.75; }
.guide-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:16px; }

.bottom-nav { position:fixed; z-index:80; left:50%; bottom:0; transform:translateX(-50%); width:min(100%,760px); display:grid; grid-template-columns:repeat(3,1fr); padding:8px max(12px,var(--safe-right)) calc(8px + var(--safe-bottom)) max(12px,var(--safe-left)); background:linear-gradient(180deg,rgba(14,10,7,.1),rgba(14,10,7,.96) 22%); backdrop-filter:blur(18px); }
.bottom-nav::before { content:""; position:absolute; top:5px; left:18px; right:18px; height:1px; background:linear-gradient(90deg,transparent,var(--line),transparent); }
.nav-item { min-height:58px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border:0; border-radius:15px; background:transparent; color:var(--faint); cursor:pointer; }
.nav-item svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.nav-item span { font-size:10px; }
.nav-item.active { color:var(--gold-pale); background:linear-gradient(180deg,rgba(255,138,36,.1),rgba(255,138,36,.025)); }

.onboarding-dialog, .record-dialog { width:min(calc(100% - 28px),520px); max-height:calc(100dvh - 30px - var(--safe-top) - var(--safe-bottom)); overflow:auto; border:1px solid var(--line-strong); border-radius:28px; background:linear-gradient(155deg,#2a1b10,#120d09 72%); color:var(--text); box-shadow:0 30px 100px rgba(0,0,0,.66); padding:24px 20px calc(22px + var(--safe-bottom)); }
.onboarding-dialog::backdrop, .record-dialog::backdrop { background:rgba(4,3,2,.78); backdrop-filter:blur(9px); }
.onboarding-dialog[open], .record-dialog[open] { animation:dialogIn .35s cubic-bezier(.2,.75,.25,1) both; }
@keyframes dialogIn { from { opacity:0; transform:translateY(16px) scale(.97); } }
.onboarding-visual { position:relative; height:138px; display:grid; place-items:center; margin-bottom:5px; }
.onboarding-visual img { position:relative; border-radius:32px; box-shadow:0 18px 50px rgba(255,112,20,.25); }
.orbit { position:absolute; border:1px solid rgba(246,196,99,.18); border-radius:50%; animation:spin 12s linear infinite; }
.orbit::after { content:""; position:absolute; width:7px; height:7px; border-radius:50%; background:var(--gold); top:10px; left:24px; box-shadow:0 0 15px var(--gold); }
.orbit-one { width:150px; height:90px; transform:rotate(14deg); }
.orbit-two { width:176px; height:116px; transform:rotate(-18deg); animation-direction:reverse; animation-duration:15s; }
@keyframes spin { to { rotate:360deg; } }
.onboarding-dialog h2 { margin:12px 0 9px; font-size:26px; line-height:1.35; letter-spacing:-.04em; }
.onboarding-dialog > p { color:var(--muted); font-size:13px; line-height:1.75; }
.onboarding-dialog ul { list-style:none; padding:0; margin:18px 0 0; display:grid; gap:8px; }
.onboarding-dialog li { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; }
.onboarding-dialog li span { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:rgba(255,138,36,.1); color:var(--gold); font-size:9px; font-weight:900; }
.onboarding-dialog .text-button { width:100%; margin-top:5px; }
.record-dialog { position:relative; }
.dialog-close { position:sticky; top:0; float:right; width:42px; height:42px; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.24); color:var(--muted); font-size:24px; cursor:pointer; }
.record-dialog h2 { margin:14px 0; font-size:23px; line-height:1.4; clear:both; }
.record-body-section { padding:14px 0; border-top:1px solid var(--line); }
.record-body-section small { display:block; color:var(--faint); font-size:9px; margin-bottom:6px; }
.record-body-section p { margin:0; color:var(--muted); font-size:12px; line-height:1.75; white-space:pre-wrap; }
.toast { position:fixed; z-index:200; left:50%; bottom:calc(88px + var(--safe-bottom)); transform:translate(-50%,20px); width:max-content; max-width:calc(100% - 32px); padding:12px 15px; border-radius:14px; background:#f6d08a; color:#241207; font-size:12px; font-weight:800; box-shadow:0 15px 40px rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:.25s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }

@media (min-width: 650px) {
  .main-content { padding-left:24px; padding-right:24px; }
  .hero-card, .input-card, .detail-section { padding-left:28px; padding-right:28px; }
  .result-cards { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
  .result-card { display:flex; flex-direction:column; }
  .result-card .select-result { margin-top:auto; }
}

@media (max-width: 360px) {
  .main-content { padding-left:10px; padding-right:10px; }
  .topbar { padding-left:12px; padding-right:12px; }
  .brand small { display:none; }
  .hero-card { padding:22px 16px 18px; }
  .input-card { padding:20px 14px; }
  .hero-card h1, .page-heading h1 { font-size:29px; }
  .choice-chip { font-size:11px; padding-left:7px; padding-right:7px; }
  .choice-chip span { width:22px; height:22px; margin-right:3px; }
  .time-grid { gap:6px; }
  .detail-grid { grid-template-columns:1fr; }
  .guide-actions { grid-template-columns:1fr; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .topbar { position:relative; }
  .hero-card h1, .page-heading h1 { font-size:32px; }
  .bottom-nav { width:100%; }
  .onboarding-dialog, .record-dialog { max-height:calc(100dvh - 12px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.001ms !important; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(255, 222, 170, .42); --line-strong: rgba(255, 222, 170, .72); --muted:#eadfce; --faint:#c7b49f; }
}
