/* ThermoMom — light, simple, animated */
:root {
  --bg: #F5F6FB;
  --card: #FFFFFF;
  --ink: #16182B;
  --muted: #5B5F78;
  --line: #E6E8F0;
  --blue: #3B5BDB;
  --blue-soft: #E8EDFF;
  --heat: #D9480F;
  --heat-soft: #FFF4EC;
  --heat-glow: #FFD8BF;
  --heat-ink: #7A4A2E;
  --cool: #1C7ED6;
  --cool-soft: #EAF4FF;
  --cool-glow: #C5E1FF;
  --cool-ink: #1E4E7A;
  --green: #0E8A66;
  --purple: #7C5CFF;
  --purple-soft: #ECE8FF;
  --danger: #C92A2A;
  --radius: 24px;
  --shadow: 0 6px 24px rgba(22, 24, 43, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}
a { color: var(--blue); }
h1, h2, h3 { margin: 0; letter-spacing: -0.5px; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell ---------- */
.app { max-width: 460px; margin: 0 auto; padding: 20px 18px 120px; display: flex; flex-direction: column; gap: 14px; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; }
.hello small { display: block; font-size: 17px; font-weight: 600; color: var(--muted); }
.hello strong { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 22px; font-weight: 800; box-shadow: 0 8px 20px rgba(59,91,219,.3); overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }
.icon-tile { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; }
.icon-tile.blue { background: var(--blue-soft); color: var(--blue); }
.icon-tile.purple { background: var(--purple-soft); color: var(--purple); }
.label { font-size: 15px; font-weight: 600; color: var(--muted); }
.value { font-size: 18px; font-weight: 700; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-temp { font-size: 26px; font-weight: 800; line-height: 1; text-align: right; }

/* ---------- Recommendation hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 32px; padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero.heat { background: var(--heat-soft); --accent: var(--heat); --glow: var(--heat-glow); --hero-ink: var(--heat-ink); --track: #FBE3D3; }
.hero.cool { background: var(--cool-soft); --accent: var(--cool); --glow: var(--cool-glow); --hero-ink: var(--cool-ink); --track: #D6E9FB; }
.hero.auto { background: #EEF8F3; --accent: var(--green); --glow: #C9EEDC; --hero-ink: #1D5A43; --track: #D5EEE2; }
.hero.off  { background: #F1F2F7; --accent: #5B5F78; --glow: #E0E2EC; --hero-ink: #3C3F55; --track: #E2E4EE; }
.hero-head { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero-head .label { color: var(--hero-ink); font-size: 17px; font-weight: 700; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.dial { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; transform: rotate(135deg); }
.dial .glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: var(--glow); }
.dial .num { position: relative; text-align: center; }
.dial .num strong { display: block; font-size: 78px; font-weight: 800; line-height: 1; letter-spacing: -3px; }
.dial .num span { font-size: 16px; font-weight: 700; color: var(--hero-ink); }
.dial .num strong.word { font-size: 54px; letter-spacing: -1px; }
.reason { font-size: 18px; line-height: 1.45; font-weight: 600; text-align: center; color: var(--hero-ink); margin: 0; }
.alts { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alts div { background: rgba(255,255,255,.75); border-radius: 16px; padding: 8px 12px; }
.alts span { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.alts b { font-size: 19px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 22px; border: 0; border-radius: 18px; background: var(--blue); color: #fff; font: inherit; font-size: 19px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { box-shadow: 0 8px 20px rgba(59,91,219,.3); }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.danger { background: #fff; color: var(--danger); border: 2px solid #F3C4C4; }
.btn.small { min-height: 46px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
.link-btn { background: none; border: 0; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; padding: 10px 4px; min-height: 44px; }

.feel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.feel { min-height: 58px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s ease, background-color .2s ease, color .2s ease; }
.feel:active { transform: scale(.96); }
.feel.cold:hover, .feel.cold:focus-visible { background: var(--blue); color: #fff; }
.feel.right:hover, .feel.right:focus-visible { background: var(--green); color: #fff; }
.feel.warm:hover, .feel.warm:focus-visible { background: #E8542A; color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 17px; font-weight: 700; color: var(--ink); }
input[type=text], input[type=time], input[type=date], input[type=search], select {
  width: 100%; min-height: 56px; padding: 0 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); font: inherit; font-size: 18px;
}
input:focus, select:focus, .btn:focus-visible, .choice:focus-within { outline: 3px solid #A5B8FF; outline-offset: 2px; }

/* Big radio choices */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 10px 18px; background: #fff; border: 3px solid var(--line); border-radius: 18px; cursor: pointer; transition: border-color .2s ease, transform .15s ease; }
.choice:active { transform: scale(.98); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #9CA3AF; flex-shrink: 0; transition: border .2s ease; }
.choice .name { flex: 1; font-size: 20px; font-weight: 800; }
.choice .sub { display: block; font-size: 15px; font-weight: 600; color: var(--muted); }
.choice .side { font-size: 18px; font-weight: 700; color: #374151; }
.choice:has(input:checked) { border-color: var(--blue); }
.choice:has(input:checked) .dot { border: 9px solid var(--blue); }

.steps { font-size: 17px; font-weight: 700; color: var(--muted); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; background: var(--blue); border-radius: 4px; transition: width .6s ease; }
.page-title { font-size: 32px; font-weight: 800; line-height: 1.15; }

.flash { background: #E6F6EE; color: #0B5B43; border-radius: 16px; padding: 14px 16px; font-weight: 700; }
.flash.error { background: #FDECEC; color: #8A1F1F; }

/* Schedule */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tab { min-height: 56px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; display: grid; place-items: center; }
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.slot { display: grid; grid-template-columns: 1fr 168px; gap: 10px; align-items: center; }
.slot .label { font-size: 18px; color: var(--ink); font-weight: 700; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 700; min-height: 48px; cursor: pointer; }
.check input { width: 26px; height: 26px; accent-color: var(--blue); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 2px solid #F1F3F6; }
.list-row:last-child { border-bottom: 0; }

/* ---------- Bottom nav ---------- */
.tabbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(430px, calc(100% - 28px)); display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ink); border-radius: 26px; padding: 8px; z-index: 10; box-shadow: 0 10px 30px rgba(22,24,43,.25); }
.tabbar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 54px; border-radius: 20px; text-decoration: none; color: #C5C8DA; font-size: 16px; font-weight: 800; transition: background-color .2s ease, color .2s ease; }
.tabbar a.active { background: #fff; color: var(--ink); }

/* ---------- Landing ---------- */
.site { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.site-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; background: var(--heat); display: grid; place-items: center; }
.landing-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 48px 0 72px; }
.landing-hero .copy { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.landing-hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; }
.landing-hero .copy p { font-size: 22px; color: var(--muted); margin: 0; max-width: 540px; }
.landing-hero .demo { flex: 1 1 320px; max-width: 400px; min-width: 0; }
.section { padding: 64px 0; }
.section h2 { font-size: 38px; font-weight: 800; margin-bottom: 28px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature-grid .card { padding: 24px; }
.feature-grid h3 { font-size: 22px; margin: 12px 0 6px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 18px; }
.num-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.site-foot { border-top: 2px solid var(--line); padding: 28px 0 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 16px; }
.login-box { max-width: 440px; margin: 8vh auto; padding: 0 18px; display: flex; flex-direction: column; gap: 22px; text-align: center; align-items: center; }

/* ---------- Motion ---------- */
@keyframes tmFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tmArc { from { stroke-dashoffset: 540; } to { stroke-dashoffset: var(--off); } }
@keyframes tmFlame { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
@keyframes tmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tmGlow { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.08); opacity: .85; } }
@keyframes tmTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes tmSpin { to { transform: rotate(360deg); } }
.in { animation: tmFadeUp .6s cubic-bezier(.2,.8,.2,1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .42s; } .d5 { animation-delay: .54s; }
.arc { animation: tmArc 1.4s cubic-bezier(.2,.8,.2,1) .35s both; }
.flame { transform-origin: 50% 80%; animation: tmFlame 1.2s ease-in-out infinite; }
.float { animation: tmFloat 3.2s ease-in-out infinite; }
.glow { animation: tmGlow 3s ease-in-out infinite; }
.twinkle { animation: tmTwinkle 2.4s ease-in-out infinite; }
.spin-slow { animation: tmSpin 8s linear infinite; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .arc { stroke-dashoffset: var(--off); }
}
