/* 짬단어 — 한 손 엄지 · 1초 한 장 · 높은 대비 */
:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --surface2: #F0ECE4;
  --text: #1C1C1C;
  --muted: #555049;
  --line: #DCD5C9;
  --primary: #1D4ED8;
  --primary-ink: #FFFFFF;
  --primary-soft: #E3EBFF;
  --good: #15803D;
  --good-soft: #DCF3E3;
  --mid: #A15C07;
  --mid-soft: #FDEFD5;
  --bad: #B91C1C;
  --bad-soft: #FBE1E1;
  --en: #1D4ED8;
  --ja: #B4235A;
  --shadow: 0 2px 10px rgba(40, 30, 10, .08);
  --radius: 18px;
  --tap: 3.4rem;        /* 최소 버튼 높이 */
  font-size: 18px;
}
html[data-font="normal"] { font-size: 18px; }
html[data-font="large"]  { font-size: 21px; }
html[data-font="xlarge"] { font-size: 24px; }

html[data-theme="dark"] {
  --bg: #121212;
  --surface: #1D1D1F;
  --surface2: #2A2A2D;
  --text: #F4F4F4;
  --muted: #C4C0B8;
  --line: #3A3A3E;
  --primary: #7DA7FF;
  --primary-ink: #0B1633;
  --primary-soft: #1B2B52;
  --good: #5BD58A;
  --good-soft: #143722;
  --mid: #F3B24E;
  --mid-soft: #3D2C10;
  --bad: #FF8A8A;
  --bad-soft: #451818;
  --en: #8DB3FF;
  --ja: #FF8FB8;
  --shadow: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
  overflow-wrap: break-word;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem calc(6rem + env(safe-area-inset-bottom));
  min-height: 100vh;
}
#app.no-tabbar { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.boot { padding: 4rem 0; text-align: center; color: var(--muted); }

h1 { font-size: 1.45rem; margin: .3rem 0 1rem; line-height: 1.3; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
p { margin: .3rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: .8rem; }

/* 카드 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card.hero { border: 2px solid var(--primary); }

/* 버튼 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap);
  padding: .55rem 1.1rem;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.big { min-height: 4.2rem; font-size: 1.2rem; border-radius: 18px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); width: auto; min-height: 2.8rem; padding: .3rem .6rem; }
.btn.line { background: transparent; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.sm { min-height: 2.8rem; font-size: .9rem; width: auto; padding: .3rem .9rem; flex: none; white-space: nowrap; }

/* 세그먼트 선택 (설정) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .4rem; }
.seg button {
  min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface); font-weight: 700; padding: .3rem .3rem; font-size: .95rem; line-height: 1.25;
}
.seg button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.seg button { position: relative; }
.seg button.on { border-width: 3px; }
.seg button.on::after { content: "✓"; position: absolute; top: .05rem; right: .35rem; font-size: .75rem; color: var(--primary); }
.set-item { padding: .9rem 0; border-top: 1px solid var(--line); }
.set-item:first-of-type { border-top: 0; padding-top: .2rem; }
.set-item > label, .set-item > .lbl { display: block; font-weight: 700; margin-bottom: .45rem; }
.set-item > label.switch { display: flex; margin-bottom: 0; font-weight: 700; }
.set-item .hint { color: var(--muted); font-size: .85rem; margin-top: .35rem; }

input[type=text], input[type=time], input[type=search], input[type=tel], select {
  width: 100%; min-height: var(--tap); padding: .4rem .8rem;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface);
}

/* 스위치 */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--tap); }
.switch input { appearance: none; -webkit-appearance: none; width: 3.4rem; height: 2rem; border-radius: 2rem; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--good); }
.switch input:checked::after { left: 1.6rem; }

/* 탭바 (엄지 닿는 하단) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  border: 0; background: none; min-height: 4rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: var(--muted); gap: .1rem;
}
.tabbar .ti { font-size: 1.35rem; line-height: 1; filter: grayscale(1); opacity: .7; }
.tabbar button.on { color: var(--primary); }
.tabbar button.on .ti { filter: none; opacity: 1; }
@media (min-width: 780px) { .tabbar { max-width: 760px; margin: 0 auto; border-radius: 18px 18px 0 0; border: 1px solid var(--line); } }

/* 홈 */
.hello { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.hello h1 { margin: 0; font-size: 1.25rem; }
.hello .btn { flex: none; }
.today-date { color: var(--muted); margin-bottom: 1rem; }
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .8rem 0 1rem; }
.plan .n { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.plan > div { background: var(--surface2); border-radius: 14px; padding: .7rem .8rem; }
.done-banner { background: var(--good-soft); color: var(--good); font-weight: 800; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .8rem; text-align: center; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; text-align: center; margin-top: .6rem; }
.week .d { font-size: .8rem; color: var(--muted); }
.week .dot { width: min(2.1rem, 100%); aspect-ratio: 1; height: auto; margin: .2rem auto 0; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.week .dot.on { background: var(--good); border-color: var(--good); color: #fff; }
.week .dot.today { border-color: var(--primary); border-width: 3px; }
.big-num { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }

/* 학습 화면 */
.study-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; white-space: nowrap; }
.study-top .btn.ghost { padding-left: 0; }
.timer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.timer.over { color: var(--good); }
.bar { height: .7rem; background: var(--surface2); border-radius: 1rem; overflow: hidden; margin-bottom: 1rem; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 1rem; transition: width .3s; }
.flash {
  background: var(--surface); border: 2px solid var(--line); border-radius: 22px;
  padding: 1.2rem 1rem 1.3rem; text-align: center; box-shadow: var(--shadow);
  min-height: 15rem; display: flex; flex-direction: column; justify-content: center; margin-bottom: 1rem;
}
.flash.new { border-color: var(--mid); }
.tag { display: inline-block; font-size: .8rem; font-weight: 800; padding: .15rem .7rem; border-radius: 1rem; margin: 0 .2rem .6rem; }
.tag.en { background: var(--primary-soft); color: var(--en); }
.tag.ja { background: var(--bad-soft); color: var(--ja); }
.tag.new { background: var(--mid-soft); color: var(--mid); }
.tag.again { background: var(--bad-soft); color: var(--bad); }
.w-main { font-size: clamp(2.1rem, 9vw, 3.4rem); font-weight: 800; line-height: 1.2; margin: .2rem 0; letter-spacing: -.01em; }
.w-main.long { font-size: clamp(1.6rem, 7vw, 2.5rem); }
.w-pron { font-size: 1.25rem; color: var(--muted); font-weight: 600; }
.w-mean { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 800; margin: .4rem 0 .2rem; color: var(--good); }
.w-other { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); font-size: 1.05rem; }
.w-other .lab { font-size: .8rem; font-weight: 800; color: var(--muted); margin-right: .3rem; }
.jw { font-weight: 800; }
.jr { display: block; font-size: .55em; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.jp-piece { display: inline-block; margin: 0 .35em; }
.speak {
  margin: .9rem auto 0; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 3rem; padding: .3rem 1.2rem; border-radius: 2rem;
  border: 2px solid var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 800;
}
.say-hint { margin-top: .7rem; color: var(--mid); font-weight: 700; font-size: .9rem; }
.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.grades .btn { min-height: 4.4rem; flex-direction: column; gap: 0; font-size: 1.05rem; padding: .3rem; }
.grades .btn small { font-size: .72rem; font-weight: 600; opacity: .85; }
.btn.g0 { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn.g1 { background: var(--mid-soft); border-color: var(--mid); color: var(--mid); }
.btn.g2 { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.choices { display: grid; gap: .55rem; }
.choices .btn { justify-content: flex-start; text-align: left; min-height: 3.8rem; font-size: 1.1rem; }
.choices .btn .no { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.choices .btn.right { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.choices .btn.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.meets { display: flex; gap: .35rem; justify-content: center; margin-top: .8rem; align-items: center; }
.meets i { width: .85rem; height: .85rem; border-radius: 50%; background: var(--line); display: inline-block; }
.meets i.on { background: var(--good); }
.meets span { font-size: .8rem; color: var(--muted); margin-left: .3rem; }
.feedback { text-align: center; font-weight: 800; font-size: 1.2rem; margin: .2rem 0 .8rem; }
.feedback.ok { color: var(--good); }
.feedback.ng { color: var(--bad); }

/* 결과 */
.result-emoji { font-size: 3.5rem; text-align: center; margin-top: .5rem; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .8rem .9rem; }
.tile .n { font-size: 1.8rem; font-weight: 800; line-height: 1.15; }
.tile .l { color: var(--muted); font-size: .85rem; font-weight: 700; }
@media (min-width: 600px) { .tiles.four { grid-template-columns: repeat(4, 1fr); } }
.wlist { list-style: none; margin: 0; padding: 0; }
.wlist li { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.wlist li:first-child { border-top: 0; }
.wlist .wx { flex: 1; min-width: 0; }
.wlist .we { font-weight: 800; font-size: 1.1rem; }
.wlist .wp { color: var(--muted); font-size: .88rem; margin-left: .3rem; font-weight: 600; white-space: nowrap; display: inline-block; }
.wlist .wbtns { display: flex; flex-direction: column; gap: .4rem; flex: none; }
.wlist li { align-items: flex-start; }
.wlist .wm { font-size: .98rem; }
.wlist .wj { font-size: .9rem; color: var(--muted); }
.icon-btn {
  flex: none; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn.on { border-color: var(--mid); background: var(--mid-soft); }
.minidots { display: inline-flex; gap: 3px; vertical-align: middle; margin-top: .2rem; }
.minidots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line); }
.minidots i.on { background: var(--good); }

/* 단어장 */
.daynav { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) 3.4rem; gap: .5rem; align-items: center; }
.daynav .btn { padding: 0; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin: .7rem 0 .2rem; scrollbar-width: none; }
.chips button { flex: none; min-height: 2.7rem; padding: .2rem 1rem; border-radius: 2rem; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .9rem; }
.chips button.on { border-color: var(--primary); background: var(--primary-soft); }

/* 기록 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; max-width: 30rem; }
.cal .h { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; }
.cal .c { aspect-ratio: 1; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); }
.cal .c.l1 { background: #BFE5CB; color: #0b3b1c; }
.cal .c.l2 { background: #6CC58A; color: #06240f; }
.cal .c.l3 { background: var(--good); color: #fff; }
html[data-theme="dark"] .cal .c.l1 { background: #1E4D2F; color: #d9f5e2; }
html[data-theme="dark"] .cal .c.l2 { background: #2E7A49; color: #fff; }
.cal .c.today { outline: 3px solid var(--primary); }
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; align-items: end; height: 8rem; margin-top: .5rem; }
.ladder .b { background: var(--primary); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.ladder .b.m { background: var(--good); }
.ladder-lab { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; text-align: center; font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.ladder-cnt { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; text-align: center; font-size: .8rem; font-weight: 800; }
.steps-explain { counter-reset: s; padding-left: 0; list-style: none; margin: .4rem 0 0; }
.steps-explain li { padding: .35rem 0 .35rem 2.4rem; position: relative; }
.steps-explain li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: .3rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.forecast { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; text-align: center; }
.forecast .n { font-weight: 800; font-size: 1.1rem; }
.forecast .d { font-size: .72rem; color: var(--muted); }

/* 프로필 선택 */
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .8rem; }
.who button { min-height: 8rem; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; font-weight: 800; font-size: 1.15rem; box-shadow: var(--shadow); }
.who .em { font-size: 2.6rem; line-height: 1; }
.who button.add { border-style: dashed; color: var(--muted); }
.emojis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; }
.emojis button { min-height: 3.2rem; font-size: 1.6rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); }
.emojis button.on { border-color: var(--primary); background: var(--primary-soft); }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(5.3rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #222; color: #fff; padding: .7rem 1.2rem; border-radius: 1rem; font-weight: 700; z-index: 50;
  max-width: 90vw; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.save-state { font-size: .8rem; color: var(--muted); text-align: center; min-height: 1.2rem; margin-top: .5rem; }
.slot-row { padding: .6rem 0; border-top: 1px solid var(--line); }
.slot-row:first-child { border-top: 0; }
.slot-row .k { font-weight: 700; }
.slot-row .tsel { display: grid; grid-template-columns: 3fr 2fr; gap: .5rem; align-items: center; margin-top: .3rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }

/* ───────── v1.1 짬단어: 짬 공부 화면 ───────── */
.brand { display: flex; align-items: center; gap: .7rem; margin: 1rem 0 1.2rem; }
.brand b { display: block; font-size: 1.35rem; }
.brand span { color: var(--muted); font-size: .85rem; }
.boot img { border-radius: 20px; margin-bottom: .5rem; }
.h-name { font-weight: 800; font-size: 1.15rem; }

/* 오늘 목표 링 */
.goal { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ring-wrap { position: relative; width: 7.2rem; height: 7.2rem; flex: none; }
.ring { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--surface2); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring-fg.full { stroke: var(--good); }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ring-txt b { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-txt span { font-size: .8rem; color: var(--muted); }
.goal-t { font-weight: 800; font-size: 1.15rem; margin-bottom: .2rem; }
.week .dot.full { box-shadow: 0 0 0 3px var(--good-soft); }

/* 집중 화면(학습·듣기): 버튼을 엄지가 닿는 아래쪽에 */
#app.focus { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: max(.6rem, env(safe-area-inset-top)); }
#app.focus .flash { flex: 1; }
.thumb { position: sticky; bottom: 0; padding: .6rem 0 max(.6rem, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
.btn.huge { min-height: 4.6rem; font-size: 1.25rem; border-radius: 20px; }
.study-top { display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.st-mid { display: flex; flex-direction: column; gap: .25rem; text-align: center; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-mid .bar { margin: 0; }
.icon-btn.plain { border-color: transparent; background: var(--surface2); }
.tags { margin-bottom: .4rem; }
.tag { margin: 0 .15rem .3rem; }
.flash { justify-content: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.flash.compact { min-height: 9rem; flex: none !important; }
.tap-hint { margin-top: 1.2rem; color: var(--muted); font-size: .85rem; }
.grades2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.grades2 .btn { min-height: 4.6rem; font-size: 1.2rem; border-width: 3px; border-radius: 20px; }
.btn.g0.huge { width: 100%; }
.strength { margin: .9rem auto 0; max-width: 16rem; font-size: .78rem; color: var(--muted); }
.sbar { height: .45rem; background: var(--surface2); border-radius: 1rem; overflow: hidden; margin-top: .25rem; }
.sbar > i { display: block; height: 100%; background: var(--good); border-radius: 1rem; }
.sbar.small-bar { max-width: 8rem; margin-top: .35rem; }
.choices { margin-bottom: .6rem; }

/* 듣기 모드 */
.flash.listen { min-height: 14rem; }
.flash.listen.reveal { border-color: var(--good); }
.l-think { margin-top: 1rem; font-weight: 700; color: var(--mid); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .l-think { animation: none; } .ring-fg { transition: none; } }

/* 기억 단계 막대 */
.buckets { display: grid; gap: .45rem; }
.bk { display: grid; grid-template-columns: 5.2rem 1fr 3rem; align-items: center; gap: .5rem; font-size: .9rem; }
.bk .bl { color: var(--muted); font-weight: 700; }
.bk b { text-align: right; font-variant-numeric: tabular-nums; }
.bb { height: .9rem; background: var(--surface2); border-radius: 1rem; overflow: hidden; }
.bb > i { display: block; height: 100%; background: var(--primary); border-radius: 1rem; min-width: 2px; }
.bb > i.m { background: var(--good); }

/* PIN · 네트워크 · 안내 */
.lock { text-align: center; max-width: min(22rem, 100%); margin: 3rem auto 0; }
.lock img { border-radius: 22px; }
.lock input { text-align: center; font-size: 1.6rem; letter-spacing: .3em; margin: 1rem 0; }
.lock .btn { margin-bottom: 1rem; }
.net { position: fixed; top: calc(max(.6rem, env(safe-area-inset-top)) + 3.4rem); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--mid-soft); color: var(--mid); border: 1px solid var(--mid); font-size: .75rem; font-weight: 800; padding: .25rem .7rem; border-radius: 2rem; }
.card.tip { border-color: var(--primary); background: var(--primary-soft); }
.card.tip p { margin-top: .3rem; }

/* ───────── v1.3 ───────── */
.intro-btns { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; }
.intro-btns .btn { min-height: 4.6rem; border-radius: 20px; }
.code-box { display: flex; align-items: center; gap: .6rem; }
.code-box code { flex: 1; font-size: 1.35rem; font-weight: 800; letter-spacing: .12em; background: var(--surface2); border-radius: 12px; padding: .55rem .8rem; text-align: center; user-select: all; -webkit-user-select: all; }
.done-card { text-align: center; border-color: var(--good); background: var(--good-soft); }
.done-card .row { justify-content: center; }
.big-emoji { font-size: 2.6rem; line-height: 1.2; }
.who button .small { font-weight: 600; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.intro-btns { grid-template-columns: 1fr 1.7fr; }
.intro-btns .btn.line { white-space: nowrap; font-size: .95rem; padding: .3rem .5rem; }
#app.focus ~ #toast { bottom: auto; top: calc(max(.6rem, env(safe-area-inset-top)) + 3.6rem); }

/* ───────── v1.4 ───────── */
.streak-hint { margin: .5rem 0 .2rem; font-size: .92rem; color: var(--mid); font-weight: 700; }
.streak-hint.ok { color: var(--good); }
.guide-card { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; border-color: var(--primary); }
.guide-card .big-emoji { font-size: 2.2rem; }
.guide-card p { margin: .1rem 0 0; }
a.btn { text-decoration: none; color: var(--primary); }
.hello a.btn { flex: none; }
