:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  --night: #091629;
  --paper: #f2fbff;
  --ink: #102b42;
  --text: #f2f9fd;
  --muted: #bfd4e1;
  --faint: #a8c4d2;
  --mint: #9ff2dc;
  --focus: #a3edff;
  --border: rgb(213 242 255 / 20%);
  --surface: rgb(26 57 78 / 72%);
  --curve: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #a3eadd; color: #0d2940; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
h1, h2, h3, p, dl, dd { margin: 0; }
p { line-height: 1.7; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.atmosphere {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 68% -10%, #337d92 0%, transparent 88%),
    radial-gradient(ellipse 58% 68% at 98% 39%, #165364 0%, transparent 98%),
    radial-gradient(ellipse 69% 60% at 20% 35%, #1b3c63 0%, transparent 95%),
    linear-gradient(150deg, #09152a 18%, #102f42 72%, #08162a 98%);
}

.shell {
  width: min(1184px, 100% - 96px);
  margin-inline: auto;
  padding: max(23px, env(safe-area-inset-top)) 0 64px;
}
.glass {
  border: 1px solid var(--border);
  background: linear-gradient(151deg, rgb(163 219 245 / 14%), transparent 58%), var(--surface);
  box-shadow: inset 0 1px 1px rgb(240 252 255 / 14%), 0 24px 72px rgb(3 12 25 / 20%);
  -webkit-backdrop-filter: blur(23px) saturate(135%);
  backdrop-filter: blur(23px) saturate(135%);
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 54px;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: #f4fbff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand-accent { color: #aee6ec; }
.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(229 249 255 / 65%);
  border-radius: 12px;
  background: linear-gradient(151deg, #e4fcff 6%, #abdeef 58%, #63afc3);
  box-shadow: inset 0 1px 1px #fff, 0 6px 18px rgb(4 13 36 / 30%);
}
.brand-mark::before, .brand-mark::after, .brand-mark i {
  position: absolute;
  content: "";
  width: 13px;
  height: 16px;
  border: 1.5px solid #174a65;
  border-radius: 3px;
}
.brand-mark::before { transform: translate(-3px, 1px) rotate(-15deg); }
.brand-mark::after { background: #ccf1f9; transform: translate(2px, -1px) rotate(11deg); }
.brand-mark i { z-index: 1; width: 5px; height: 1.5px; border: 0; background: #174a65; transform: translate(2px, -2px) rotate(11deg); }
.navigation {
  grid-column: 2;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 22px;
}
.navigation a {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 17px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: #c6dae6;
  font-size: .875rem;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
  transition: background 180ms var(--curve), color 180ms var(--curve), border-color 180ms var(--curve);
}
.navigation a:hover { background: rgb(214 246 255 / 11%); color: var(--text); }
.navigation a[aria-current] {
  color: #f6fcff;
  border-color: rgb(221 248 255 / 32%);
  background: linear-gradient(160deg, rgb(208 247 255 / 27%), rgb(167 219 244 / 10%));
  box-shadow: inset 0 1px 1px rgb(243 253 255 / 18%), 0 3px 8px rgb(5 20 33 / 16%);
}
.top-actions { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.header-button, .text-button {
  min-height: 43px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #d6edf5;
  background: transparent;
  font-size: .875rem;
  font-weight: 550;
  white-space: nowrap;
  transition: background 180ms var(--curve), border-color 180ms var(--curve);
}
.header-button:hover, .text-button:hover {
  background: rgb(215 247 255 / 10%);
  border-color: rgb(215 247 255 / 21%);
}
.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 54px 0 27px;
}
.page-header h1, .login-content h1 {
  font-size: 3.4rem;
  font-weight: 690;
  line-height: 1.11;
  letter-spacing: -.038em;
}
.page-header h1:focus, .study-face h2:focus, .empty-content h2:focus { outline: none; }
.page-header p { margin-top: 11px; color: var(--muted); font-size: 1rem; }
.date-stamp {
  color: #d5eaf3;
  font-size: .875rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.6;
}
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 21px; }
.review-workspace { min-width: 0; }
.ice-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgb(243 254 255 / 90%);
  border-radius: 33px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 5% 0%, #fff 1%, transparent 68%),
    radial-gradient(ellipse 76% 84% at 99% 77%, #8fcbd8 2%, transparent 92%),
    linear-gradient(134deg, #edf9fe, #c1e0ee);
  box-shadow: inset 0 1px 3px #fff, inset 0 -1px 3px rgb(200 241 253 / 75%), 0 22px 55px rgb(4 22 41 / 27%);
}
.study-empty {
  min-height: 418px;
  display: grid;
  align-items: center;
  padding: 49px clamp(30px, 4vw, 56px);
}
.empty-content { position: relative; z-index: 1; width: min(100%, 385px); }
.empty-content h2 {
  font-size: 2.125rem;
  line-height: 1.16;
  font-weight: 710;
  letter-spacing: -.039em;
  text-wrap: balance;
}
.empty-content p { max-width: 25em; margin-top: 13px; color: #34546a; }
.empty-actions, .photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 15px;
  font-size: .925rem;
  font-weight: 660;
  text-decoration: none;
  text-align: center;
  transition: background 180ms var(--curve), border-color 180ms var(--curve), box-shadow 180ms var(--curve), transform 160ms var(--curve);
}
.button:active:not(:disabled) { transform: scale(.98); }
.button-primary {
  color: #103548;
  border-color: #cefaff;
  background: linear-gradient(155deg, #e8fbff, #a5ebdc);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 73%), 0 5px 18px rgb(4 19 28 / 20%);
}
.button-primary:hover:not(:disabled) { background: linear-gradient(155deg, #f2feff, #baf6e9); }
.button-ocean {
  color: #f4fcff;
  border-color: #1d4e68;
  background: linear-gradient(152deg, #22566f, #122d48);
  box-shadow: inset 0 1px 1px rgb(235 251 255 / 20%), 0 7px 17px rgb(27 78 113 / 21%);
}
.button-ocean:hover { background: linear-gradient(152deg, #2a6680, #163951); }
.button-ice {
  color: #173a54;
  border-color: #8cb3c5;
  background: rgb(245 253 255 / 52%);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 63%);
}
.button-ice:hover { background: rgb(255 255 255 / 77%); }
.button-glass {
  color: #eefaff;
  border-color: rgb(208 241 255 / 27%);
  background: rgb(200 241 255 / 10%);
}
.button-glass:hover:not(:disabled) { background: rgb(200 241 255 / 17%); }
.ice-surface :focus-visible { outline-color: #195b73; }

.glass-art {
  position: absolute;
  pointer-events: none;
  width: 50%;
  aspect-ratio: 1;
  isolation: isolate;
  container-type: inline-size;
}
.review-art { top: 50%; right: -1%; width: min(47%, 410px); transform: translateY(-50%) rotate(-7deg); }
.glass-art::before {
  content: "";
  position: absolute;
  inset: 14% -4% 7%;
  background: radial-gradient(ellipse at center, rgb(27 104 151 / 30%), transparent 67%);
  filter: blur(13px);
  transform: rotate(-18deg) translateY(12%);
}
.glass-art i {
  position: absolute;
  display: block;
  border: 1px solid rgb(247 255 255 / 80%);
  box-shadow: inset 1px 1px 3px rgb(255 255 255 / 92%), inset -12px -9px 24px rgb(35 139 182 / 21%), 6px 18px 33px rgb(13 89 134 / 18%);
}
.glass-art i:nth-child(1) {
  inset: 13% 26% 20% 26%;
  border-radius: 10cqi;
  background: linear-gradient(146deg, rgb(255 255 255 / 82%), rgb(197 235 254 / 32%) 42%, rgb(59 148 193 / 52%));
  transform: translate(-20%, -2%) rotate(-20deg);
}
.glass-art i:nth-child(2) {
  inset: 14% 23% 19% 27%;
  border-radius: 10cqi;
  background: linear-gradient(150deg, #e5f9ff 2%, rgb(189 232 247 / 68%) 39%, rgb(49 152 184 / 61%) 95%);
  transform: translate(18%, 0%) rotate(15deg);
}
.glass-art i:nth-child(3) {
  inset: 36% 38% 37% 35%;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 23%, #f6fffe 0%, #99e2e7 19%, rgb(74 174 192 / 59%) 53%, rgb(31 127 170 / 86%) 77%, #81e5ee 95%);
  transform: translate(62%, 15%);
  box-shadow: inset 1px 1px 3px rgb(255 255 255 / 90%), 8px 11px 23px rgb(8 99 137 / 29%);
}
.glass-art i:nth-child(4) {
  inset: 68% 55% 19% 32%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 22%, #fff 0%, #d7fbff 20%, #5bb7d0 73%, #d0f8fa 91%);
}

.day-summary { min-height: 418px; padding: 26px; border-radius: 27px; }
.summary-heading { display: flex; align-items: center; gap: 12px; }
.summary-heading h2, .photo-panel h2, .manual-panel h2 { font-size: 1.22rem; font-weight: 660; letter-spacing: -.02em; }
.summary-icon {
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: none;
  place-items: center;
  color: #c1f5f4;
  border: 1px solid rgb(216 250 255 / 27%);
  border-radius: 13px;
  background: linear-gradient(152deg, rgb(206 248 254 / 21%), rgb(152 243 242 / 8%));
  box-shadow: inset 0 1px 1px rgb(245 255 255 / 17%);
}
.progress-meter {
  height: 6px;
  overflow: hidden;
  margin: 23px 0 17px;
  border-radius: 12px;
  background: rgb(216 247 255 / 17%);
}
.progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #88cbeb, #a3f8dc);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--curve);
}
.summary-metrics { display: grid; gap: 5px; }
.summary-metrics div { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 10px; }
.summary-metrics dt { color: #d2e5ee; font-size: .9rem; }
.summary-metrics dd { font-size: 1.45rem; font-weight: 660; font-variant-numeric: tabular-nums; }
.summary-legend { margin-top: 21px; padding-top: 19px; border-top: 1px solid rgb(226 248 255 / 16%); }
.summary-legend h3 { margin-bottom: 11px; color: #f0faff; font-size: .9rem; font-weight: 650; }
.summary-legend p { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 7px; color: #c3dce8; font-size: .82rem; }
.summary-legend strong { color: #deeff7; font-weight: 540; }
.legend-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: #96d8fc; }
.legend-dot.mint { background: #9ef2dc; }

.study-meta {
  display: flex;
  min-height: 32px;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-inline: 3px;
  margin-bottom: 9px;
  color: #d5ecf8;
  font-size: .86rem;
  font-weight: 580;
  font-variant-numeric: tabular-nums;
}
.study-meta .text-button { min-height: 44px; padding-inline: 9px; }
.study-card {
  display: grid;
  min-height: 265px;
  padding: 32px 24px;
  place-items: center;
  text-align: center;
  background: radial-gradient(ellipse 78% 111% at 8% -8%, #fff, transparent 92%), linear-gradient(145deg, #e5f6fb 19%, #c9ebf1 68%, #a0d3df 100%);
}
.study-card::after {
  position: absolute;
  z-index: -1;
  inset: 2px;
  content: "";
  border-radius: inherit;
  background: linear-gradient(129deg, transparent 51%, rgb(255 255 255 / 22%) 64%, transparent 81%);
  pointer-events: none;
}
.study-card.is-new .study-face { animation: study-arrival 260ms var(--curve) both; }
.study-face h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(2.65rem, 5.6vw, 4.8rem);
  letter-spacing: -.039em;
  line-height: 1.08;
  font-weight: 600;
}
.study-definition { margin-top: 17px; padding-top: 15px; animation: meaning-arrival 240ms var(--curve) both; }
.study-definition::before { display: block; width: 50px; height: 1px; margin: -13px auto 10px; background: #65a0b0; content: ""; }
.study-definition p { color: #2d5064; font-size: 1.16rem; font-weight: 540; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-actions { display: flex; gap: 10px; margin-top: 13px; }
.study-actions .button { min-height: 53px; flex: 1 1 0; }
.answer-button {
  border-color: rgb(218 245 255 / 24%);
  color: #e8f6fd;
  background: linear-gradient(156deg, rgb(199 237 255 / 16%), rgb(186 233 252 / 8%));
  box-shadow: inset 0 1px 1px rgb(241 253 255 / 16%);
}
.answer-button[aria-pressed="false"]:hover:not(:disabled) { background: rgb(192 235 251 / 22%); }
.answer-button[aria-pressed="true"] {
  border-color: #b7def3;
  color: #14334c;
  background: #bfe7f7;
}
.answer-yes[aria-pressed="true"] { border-color: #a9f4e1; background: #abeddd; }
.shortcut {
  min-width: 20px;
  margin-left: 4px;
  padding: 1px 3px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: .67rem;
  line-height: 1.3;
  opacity: .72;
}
.review-note { margin-top: 10px; padding-inline: 3px; color: #c3dbe8; font-size: .81rem; }
.study-session .form-message { margin-inline: 3px; }
@keyframes study-arrival { from { opacity: .55; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes meaning-arrival { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.capture-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; gap: 21px; }
.photo-panel, .manual-panel, .library { border-radius: 27px; }
.photo-panel, .manual-panel { padding: 25px; }
.photo-area {
  min-height: 238px;
  display: grid;
  place-items: center;
  margin-top: 16px;
  overflow: hidden;
  padding: 16px;
  text-align: center;
  border: 1px dashed #76a7b7;
  border-radius: 18px;
  background: rgb(6 25 43 / 28%);
  transition: border-color 180ms var(--curve), background 180ms var(--curve);
}
.photo-area.is-dragging { border-color: #b9fff0; background: rgb(107 226 208 / 17%); }
.photo-instructions p { margin-top: 12px; color: #e9f9ff; font-weight: 570; }
.photo-instructions small { display: block; margin-top: 4px; color: #c2dce8; font-size: .83rem; }
.photo-touch-instruction { display: none; }
.photo-mark {
  display: inline-grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgb(221 252 255 / 38%);
  border-radius: 22px;
  color: #d1f4f7;
  background: linear-gradient(150deg, rgb(180 238 248 / 22%), rgb(139 198 228 / 7%));
  box-shadow: inset 0 1px 2px rgb(229 255 255 / 24%);
}
.photo-mark .icon { transform: scale(1.43); }
.photo-preview { width: 100%; }
.photo-preview img { display: block; width: 100%; height: 219px; object-fit: contain; }
.photo-actions { margin-top: 15px; }
.manual-panel h2 { margin-top: 16px; }
.manual-panel > p { margin-top: 5px; color: var(--muted); font-size: .92rem; }
.manual-panel form { margin-top: 21px; }
.manual-panel .button { width: 100%; }
.configuration-note {
  margin: -6px 0 16px;
  color: #dbedf5;
  font-size: .9rem;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgb(194 234 255 / 24%);
  background: rgb(140 201 226 / 13%);
}
form label { display: block; margin: 0 0 7px; color: #e6f3fa; font-size: .9rem; font-weight: 570; }
form input, .library input, .library select {
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid #7296ab;
  border-radius: 13px;
  color: #f4fbff;
  background: rgb(5 24 43 / 46%);
  caret-color: #b3f5ec;
  font-size: 1rem;
  transition: border-color 180ms var(--curve), background 180ms var(--curve);
}
form input::placeholder, .library input::placeholder { color: #a9c5d5; opacity: 1; }
form input:hover, .library input:hover, .library select:hover { border-color: #afcfdd; }
form input:focus, .library input:focus, .library select:focus { border-color: #a3edff; background-color: rgb(4 23 41 / 64%); }
form input:read-only { opacity: .8; }
form > .button { margin-top: 14px; }
.form-message { margin-top: 10px; color: #d6eaf4; overflow-wrap: anywhere; font-size: .87rem; }
.form-message[data-tone="error"] { color: #ffc2c1; }
.form-message[data-tone="success"] { color: #b7f4dc; }

.library { overflow: hidden; }
.library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(165px, 190px) minmax(165px, 190px);
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  border-bottom: 1px solid rgb(221 247 255 / 16%);
}
.kind-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgb(218 249 255 / 21%);
  border-radius: 13px;
  background: rgb(9 29 48 / 31%);
}
.kind-filter button {
  min-height: 39px;
  padding: 0 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d0e8f4;
  background: transparent;
  font-size: .85rem;
  font-weight: 590;
  white-space: nowrap;
}
.kind-filter button:hover { background: rgb(217 247 255 / 10%); }
.kind-filter button[aria-pressed="true"] { color: #f3fcff; border-color: rgb(222 249 255 / 25%); background: rgb(191 240 251 / 20%); }
.search-field { display: grid; position: relative; align-items: center; }
.search-field > .icon { position: absolute; left: 12px; color: #b6d9e8; pointer-events: none; }
.library input { padding-left: 39px; }
.filter-select { display: flex; align-items: center; gap: 7px; }
.filter-select label { white-space: nowrap; color: #d0e8f4; font-size: .83rem; font-weight: 560; }
.library select { padding: 8px 6px; font-size: .9rem; }
.word-group + .word-group { border-top: 1px solid rgb(209 243 255 / 18%); }
.word-group > h2 { padding: 12px 21px; color: #d5edf8; font-size: .9rem; font-weight: 660; background: rgb(194 238 253 / 9%); }
.word-list { padding: 0; margin: 0; list-style: none; }
.word-item {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr) minmax(141px, auto);
  align-items: center;
  gap: 15px;
  padding: 17px 21px;
  min-height: 71px;
}
.word-item + .word-item { border-top: 1px solid rgb(209 243 255 / 13%); }
.word-english { font-size: 1.1rem; font-weight: 680; overflow-wrap: anywhere; }
.word-kind { display: block; margin-top: 2px; color: #b0ccda; font-size: .78rem; }
.word-meaning { color: #d3e9f4; overflow-wrap: anywhere; white-space: pre-line; font-size: .91rem; }
.word-status { display: grid; justify-items: end; gap: 5px; }
.word-stage { color: #d8edf8; font-size: .88rem; font-weight: 600; }
.word-stage[data-stage="checking"], .word-stage[data-stage="known"] { color: #aaf0df; }
.word-due { color: #bdd5e1; font-size: .76rem; text-align: right; }
.library-empty { padding: 59px 23px; text-align: center; }
.library-empty h2 { margin-top: 14px; font-size: 1.5rem; letter-spacing: -.025em; }
.library-empty p { margin: 7px auto 15px; color: var(--muted); }

.system-section, .login-section { display: grid; justify-items: center; margin-top: 67px; }
.system-card { width: min(100%, 570px); padding: 39px; border-radius: 27px; }
.system-marker { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 13px; color: #b8f6f4; background: rgb(173 242 250 / 17%); }
.system-card h1 { font-size: 1.65rem; letter-spacing: -.025em; }
.system-card p { margin: 6px 0 18px; color: var(--muted); }
.skeleton { width: 100%; height: 9px; overflow: hidden; border-radius: 12px; background: rgb(188 234 242 / 15%); }
.skeleton::after { display: block; content: ""; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, rgb(205 239 247 / 54%), transparent); animation: skeleton-scan 1.55s ease-in-out infinite; }
@keyframes skeleton-scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.login-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 900px);
  min-height: 440px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 52px;
  border-radius: 34px;
  background: radial-gradient(ellipse 72% 110% at 100% 94%, rgb(51 128 142 / 62%), transparent 91%), linear-gradient(155deg, #254861, #112940 75%);
}
.login-content { z-index: 1; width: min(100%, 352px); }
.login-content h1 { font-size: 2.75rem; }
.login-content > p { margin-top: 11px; color: var(--muted); }
.login-content form { margin-top: 26px; }
.login-content .button { width: 100%; }
.login-art { width: min(48%, 430px); top: 50%; right: 0; opacity: .8; transform: translateY(-50%) rotate(8deg); }

.settings-dialog {
  width: min(450px, calc(100% - 34px));
  max-height: calc(100% - 36px);
  margin: auto;
  padding: 22px;
  color: var(--text);
  border-radius: 23px;
  background-color: #17394e;
}
.settings-dialog::backdrop { background: rgb(4 13 24 / 72%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-top h2 { font-size: 1.45rem; letter-spacing: -.025em; }
.settings-dialog > p { margin: 5px 0 19px; color: var(--muted); font-size: .91rem; }
.settings-dialog form label { display: flex; justify-content: space-between; gap: 8px; }
.settings-dialog input + label { margin-top: 13px; }
.key-status { color: #b1cad7; font-size: .79rem; font-weight: 500; }
.key-status[data-ready="true"] { color: #a3f3d8; }
.icon-button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid rgb(221 246 255 / 21%);
  border-radius: 13px;
  color: var(--text);
  background: rgb(210 243 255 / 9%);
}
.icon-button:hover { background: rgb(210 243 255 / 17%); }
.toast {
  position: fixed;
  z-index: 3;
  right: 24px;
  bottom: 25px;
  width: min(340px, calc(100% - 48px));
  padding: 13px 16px;
  border-radius: 15px;
  color: var(--text);
  background-color: #193c52;
  font-size: .88rem;
  line-height: 1.5;
}
.toast[data-tone="error"] { color: #ffcdcd; }

.icon { position: relative; flex: none; display: inline-block; width: 17px; height: 17px; }
.icon::before, .icon::after { position: absolute; content: ""; }
.icon-review::before, .icon-books::before { inset: 1px 2px 3px 3px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-review::after { inset: 4px 1px 1px 6px; border: 1.5px solid currentColor; border-top-color: transparent; border-left-color: transparent; border-radius: 3px; }
.icon-books::after { inset: 1px 0 1px 7px; border: 1.5px solid currentColor; border-top-color: transparent; border-left-color: transparent; border-radius: 3px; }
.icon-camera::before { inset: 4px 0 2px; border: 1.5px solid currentColor; border-radius: 4px; }
.icon-camera::after { inset: 7px 6px 5px 5px; border: 1.3px solid currentColor; border-radius: 50%; }
.icon-image::before { inset: 2px 0; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-image::after { width: 8px; height: 6px; left: 5px; top: 7px; border: 1.4px solid currentColor; border-right: 0; border-bottom: 0; border-radius: 2px 0 0; transform: rotate(39deg); }
.icon-arrow::before { width: 11px; height: 1.5px; background: currentColor; top: 8px; left: 3px; }
.icon-arrow::after { width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; top: 5.8px; left: 8px; transform: rotate(45deg); }
.icon-check::before { width: 10px; height: 6px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); top: 4px; left: 4px; }
.icon-close::before, .icon-close::after { width: 12px; height: 1.5px; left: 3px; top: 8px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.icon-pencil::before { width: 5px; height: 13px; top: 1px; left: 7px; border: 1.5px solid currentColor; border-radius: 2px 2px 1px 1px; transform: rotate(39deg); }
.icon-search::before { width: 11px; height: 11px; inset: 1px auto auto 2px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-search::after { width: 6px; height: 1.5px; top: 12px; left: 10px; background: currentColor; border-radius: 1px; transform: rotate(47deg); }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 68px); }
  .review-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 17px; }
  .day-summary { padding: 20px; }
  .empty-content { width: min(100%, 310px); }
  .review-art { width: min(43%, 338px); right: -3%; }
}
@media (max-width: 800px) {
  .shell { width: calc(100% - 44px); }
  .topbar { gap: 7px; }
  .navigation a { padding-inline: 11px; gap: 5px; }
  .page-header { margin-top: 41px; }
  .page-header h1 { font-size: 2.8rem; }
  .review-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .day-summary { min-height: 0; }
  .study-empty { min-height: 357px; }
  .review-art { width: min(48%, 335px); right: 0; }
  .capture-layout { grid-template-columns: minmax(0, 1fr); }
  .library-controls { grid-template-columns: minmax(0, 1fr) minmax(120px, 145px) minmax(120px, 158px); padding-inline: 15px; gap: 9px; }
  .word-item { padding-inline: 16px; }
}
@media (max-width: 620px) {
  .shell {
    width: calc(100% - 36px);
    padding-top: max(13px, env(safe-area-inset-top));
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }
  .topbar { display: flex; min-height: 44px; justify-content: space-between; }
  .brand { gap: 9px; font-size: 1.06rem; }
  .brand-mark { width: 34px; border-radius: 11px; }
  .top-actions { gap: 2px; }
  .header-button { min-height: 44px; padding-inline: 8px; }
  .navigation {
    position: fixed;
    z-index: 2;
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(9px + env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
    gap: 4px;
    padding: 5px;
    border-radius: 24px;
    background-color: rgb(17 42 60 / 92%);
    box-shadow: inset 0 1px 1px rgb(240 252 255 / 14%), 0 9px 34px rgb(1 11 24 / 64%);
  }
  .navigation a { flex: 1 1 0; display: grid; place-items: center; gap: 3px; min-height: 52px; padding: 5px 4px; font-size: .76rem; }
  .page-header { align-items: start; gap: 7px; margin: 29px 0 20px; }
  .page-header h1 { font-size: 2.48rem; }
  .page-header p { margin-top: 8px; font-size: .9rem; }
  .date-stamp { margin-top: 4px; font-size: .78rem; }
  .study-empty {
    min-height: 373px;
    align-items: end;
    padding: 22px;
    border-radius: 27px;
    background:
      radial-gradient(ellipse 94% 62% at 100% 0%, #8bc5d8, transparent 99%),
      radial-gradient(ellipse 86% 76% at 1% 100%, #f6fcff 12%, transparent 100%),
      linear-gradient(140deg, #effaff, #bbddeb);
  }
  .empty-content { width: min(100%, 345px); }
  .empty-content h2 { font-size: 1.83rem; text-wrap: initial; }
  .empty-content p { margin-top: 9px; font-size: .92rem; }
  .empty-actions { margin-top: 17px; }
  .review-art { top: 4px; right: calc(50% - 117px); width: 228px; transform: translate(12%, -7%) rotate(-7deg); }
  .day-summary { border-radius: 24px; }
  .day-summary .progress-meter { margin: 17px 0 10px; }
  .day-summary .summary-metrics { grid-template-columns: 1fr 1fr; gap: 16px; }
  .day-summary .summary-metrics div { gap: 5px; }
  .day-summary .summary-legend { margin-top: 12px; padding-top: 12px; }
  .study-card { min-height: 229px; border-radius: 27px; padding-inline: 17px; }
  .study-face h2 { font-size: 2.9rem; }
  .study-definition p { font-size: 1.05rem; }
  .study-actions { gap: 6px; }
  .study-actions .button { min-height: 49px; padding-inline: 6px; font-size: .875rem; gap: 4px; }
  .study-actions .icon { width: 15px; }
  .shortcut { display: none; }
  .photo-panel, .manual-panel { padding: 18px; }
  .photo-area { min-height: 211px; }
  .photo-preview img { height: 177px; }
  .library-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 13px; }
  .search-field { grid-column: 1 / -1; }
  .kind-filter button { min-height: 42px; }
  .word-group > h2 { padding-inline: 13px; }
  .word-item { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; min-height: 82px; padding: 13px; }
  .word-status { grid-column: 2; grid-row: 1 / span 2; align-self: start; max-width: 126px; }
  .word-meaning { grid-column: 1; }
  .system-section, .login-section { margin-top: 33px; }
  .system-card { padding: 26px; }
  .login-card { padding: 179px 23px 27px; min-height: auto; border-radius: 27px; }
  .login-content { width: 100%; }
  .login-art { width: 208px; top: -11px; right: calc(50% - 105px); transform: rotate(8deg); }
  .login-content h1 { font-size: 2.05rem; }
  .toast { right: 18px; bottom: calc(81px + env(safe-area-inset-bottom)); width: calc(100% - 36px); }
}
@media (max-width: 365px) {
  .shell { width: calc(100% - 28px); }
  .study-empty { padding: 17px; }
  .empty-actions .button { padding-inline: 12px; }
  .date-stamp { white-space: normal; text-align: right; flex: none; max-width: 95px; }
  .study-face h2 { font-size: 2.42rem; }
}
@media (pointer: coarse) {
  .shortcut, .photo-desktop-instruction { display: none; }
  .photo-touch-instruction { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
