@font-face {
  font-family:"HanGraph KR";
  src:url("/fonts/NotoSansKR-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:"HanGraph KR";
  src:url("/fonts/NotoSansKR-SemiBold.woff2") format("woff2");
  font-weight:600;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans";
  src:url("/fonts/NotoSans-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans";
  src:url("/fonts/NotoSans-Bold.woff2") format("woff2");
  font-weight:700;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans JP";
  src:url("/fonts/NotoSansJP-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans JP";
  src:url("/fonts/NotoSansJP-Bold.woff2") format("woff2");
  font-weight:700;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans SC";
  src:url("/fonts/NotoSansSC-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:"Noto Sans SC";
  src:url("/fonts/NotoSansSC-Bold.woff2") format("woff2");
  font-weight:700;
  font-display:swap;
}

@font-face {
  font-family:"HanGraph Devanagari";
  src:local("Noto Sans Devanagari"),url("/fonts/NotoSansDevanagari-Regular.ttf") format("truetype");
  font-style:normal;
  font-weight:400;
  font-display:swap;
  unicode-range:U+0900-097F, U+1CD0-1CFF, U+A8E0-A8FF;
}

@font-face {
  font-family:"HanGraph Thai";
  src:local("Noto Sans Thai"),url("/fonts/NotoSansThai-Regular.ttf") format("truetype");
  font-style:normal;
  font-weight:400;
  font-display:swap;
  unicode-range:U+0E00-0E7F;
}

:root {
  --paper:#f7f6f1;
  --white:#fffefa;
  --ink:#243b31;
  --muted:#606e63;
  --line:#e3e5dc;
  --sage:#edf1e8;
  --green:#315e48;
  --accent:#ac533c;
  --accent-light:#f5e8df;
  --header-height:4rem;
  --page-gutter:44px;
  --site-width:104rem;
  --reading-width:52rem;
  --auth-width:510px;
  --panel-radius:12px;
  --ui-font:Inter,"Segoe UI","Apple SD Gothic Neo","Malgun Gothic","Noto Sans","HanGraph Devanagari","HanGraph Thai","HanGraph KR",sans-serif;
  --ui-serif:"Noto Serif CJK KR","Batang",Georgia,"HanGraph Devanagari","HanGraph Thai","Noto Sans","HanGraph KR",serif;
  --print-base:"Noto Sans","HanGraph Devanagari","HanGraph Thai","HanGraph Print",sans-serif;
}
:where([lang]) {
  --font:var(--ui-font);
  --serif:var(--ui-serif);
  --print-font:var(--print-base);
  font-family:var(--font);
}
:where([lang]:lang(ko)) {
  --font:"Apple SD Gothic Neo","Malgun Gothic","HanGraph KR",var(--ui-font);
  --print-font:"HanGraph Print",var(--print-base);
}
:where([lang]:lang(zh)) {
  --font:"PingFang SC","Microsoft YaHei","Noto Sans SC",var(--ui-font);
  --serif:"Noto Serif CJK SC","Songti SC","Noto Sans SC",var(--ui-serif);
  --print-font:"Noto Sans SC",var(--print-base);
}
:where([lang]:lang(ja)) {
  --font:"Hiragino Sans","Yu Gothic","Noto Sans JP","HanGraph KR","Noto Sans SC",var(--ui-font);
  --serif:"Noto Serif CJK JP","Yu Mincho","Noto Sans JP",var(--ui-serif);
  --print-font:"Noto Sans JP","HanGraph Print","Noto Sans SC",var(--print-base);
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font-family:var(--font);
  font-size:14px;
  line-height:1.65
}
button,input,select {
  font:inherit
}
button,a,input {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
a {
  color:inherit;
  text-decoration:none
}
button {
  color:inherit
}
button:disabled {
  cursor:default;
  opacity:.55
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #c58646;
  outline-offset:4px
}
button svg,.nav-link svg {
  width:20px;
  height:20px;
  stroke:currentColor;
  stroke-width:1.6;
  fill:none;
  flex-shrink:0
}
button {
  border:0
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:34px;
  letter-spacing:-1.3px;
  line-height:1.4;
  font-weight:650
}
h2 {
  font-size:18px;
  letter-spacing:-.4px
}
h3 {
  font-size:15px
}
small {
  font-size:12px
}
.muted {
  color:var(--muted)
}
.skip-link {
  position:fixed;
  top:-100px;
  left:20px;
  padding:12px;
  background:white;
  z-index:100
}
.skip-link:focus {
  top:10px
}
html { scroll-padding-top:calc(var(--header-height) + 8px) }
.site-header {
  position:sticky;
  top:0;
  z-index:20;
  background:#233b31;
  color:#edf1e9
}
.site-bar {
  max-width:var(--site-width);
  margin:auto;
  padding:8px var(--page-gutter);
  display:flex;
  align-items:center;
  gap:clamp(12px,2vw,30px)
}
.brand {
  display:flex;
  flex-shrink:0;
  gap:12px;
  align-items:center;
  font-size:15px;
  font-weight:650;
  letter-spacing:1px;
  white-space:nowrap
}
.brand-mark {
  width:44px;
  height:47px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  border:1px solid #8d9c83;
  border-radius:4px;
  font-family:var(--serif);
  font-size:30px;
  font-weight:400;
  line-height:1;
  letter-spacing:0;
  color:#e5ddbe
}
.brand-glyph {
  transform:translateY(-2px)
}
.brand-light {
  color:#bdc6ac
}
#menu-toggle { display:none }
#site-menu {
  flex:1;
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0
}
.nav-link {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  min-height:44px;
  padding:8px 12px;
  border-radius:6px;
  color:#d2ddd3;
  font-size:.875rem;
  line-height:1.35;
  overflow-wrap:anywhere
}
.nav-link:hover,#menu-toggle:hover { background:#2b4539;color:#fff }
.nav-link[aria-current=page],#menu-toggle[aria-expanded=true] { background:#3a5141;color:#f4edd6 }
.nav-tools {
  display:flex;
  align-items:center;
  gap:8px;
  margin-inline-start:auto;
  padding-inline-start:12px;
  border-inline-start:1px solid #516457
}
.nav-tools .nav-link > span { min-width:0 }
#account-id {
  display:block;
  max-width:15ch;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#c6d3c4;
  font-size:.8rem
}
#account-id:empty,.back-to-results { display:none }
.nav-count:empty { display:none }
.nav-count {
  margin-left:auto;
  font-size:11px;
  color:#c9d4be;
  background:#284033;
  min-width:23px;
  text-align:center;
  border-radius:4px
}
.workspace {
  display:flex;
  flex-direction:column;
  min-height:calc(100svh - var(--header-height))
}
.workspace > main { flex:1;width:100% }
.language-button {
  min-width:0;
  max-width:100%;
  min-height:44px;
  padding:6px 10px;
  border:1px solid #687d70;
  border-radius:6px;
  color:#f4f5ef;
  background:#314a3e;
  font:inherit;
  font-size:.875rem;
  cursor:pointer
}
.language-button option { background:var(--white);color:var(--ink) }
main {
  padding:37px var(--page-gutter) 30px;
  max-width:var(--site-width);
  margin:auto
}
main:focus {
  outline:none
}
.page-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:.5rem 1rem;
  margin-bottom:clamp(1rem,2vw,1.5rem)
}
.page-heading h1 {
  min-width:0;
  font-size:clamp(1.55rem,2.5vw,2.125rem);
  line-height:1.3;
  letter-spacing:-.025em;
  overflow-wrap:anywhere
}
.page-count { flex:none;color:var(--muted);font-size:.9rem;font-variant-numeric:tabular-nums }
.explore-controls {
  padding:16px 18px 0;
  margin-bottom:22px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--white)
}
.explore-filters summary {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  padding:8px 0;
  color:var(--green);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  list-style:none
}
.explore-filters summary::-webkit-details-marker { display:none }
.explore-filters summary::after {
  content:"";
  flex:none;
  width:7px;
  height:7px;
  margin:0 4px 3px auto;
  border:solid currentColor;
  border-width:0 1.5px 1.5px 0;
  transform:rotate(45deg)
}
.explore-filters[open] summary::after { transform:rotate(225deg) }
.explore-filters[open] summary { margin-bottom:10px;border-bottom:1px solid var(--line) }
.filter-summary { color:var(--muted);font-size:12px;font-weight:400;overflow-wrap:anywhere }
.explore-tools {
  display:flex;
  gap:12px;
  margin-bottom:3px
}
.random-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 20px;
  border:1px solid #ccd7c4;
  border-radius:7px;
  background:var(--sage);
  color:var(--green);
  font-size:12px;
  font-weight:600;
  white-space:nowrap
}
.random-button:hover:enabled {
  background:#e3ebda;
  border-color:#95aa87
}
.search-filters {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px 16px;
  margin-bottom:12px
}
.search-modes {
  display:flex;
  flex-shrink:0;
  gap:4px;
  padding:4px;
  border:1px solid #dce0d4;
  border-radius:7px;
  background:var(--white)
}
.search-modes button {
  min-height:36px;
  padding:7px 14px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--ink);
  font-size:12px
}
.search-modes button:hover {
  background:var(--sage)
}
.search-modes button.active {
  background:var(--green);
  color:var(--white)
}
.search-filters p {
  flex:1;
  min-width:220px;
  margin:0;
  color:#677362;
  font-size:12px;
  line-height:1.7
}
.search-form {
  position:relative;
  flex:1;
  min-width:0;
  margin:0;
  display:flex;
  align-items:center;
  background:var(--white);
  border:1px solid #dce0d4;
  border-radius:7px;
  box-shadow:0 3px 5px #243b3103
}
.search-form>svg {
  width:19px;
  height:19px;
  stroke:#7f8d78;
  fill:none;
  stroke-width:1.7;
  margin:0 16px 0 20px;
  flex-shrink:0
}
.search-form input {
  width:100%;
  height:56px;
  padding:0 18px 0 0;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:13px;
  min-width:0;
  outline:0
}
.search-form:focus-within {
  outline:2px solid #6d8961;
  outline-offset:2px
}
.search-form input:focus-visible {
  outline:0
}
.search-form input::placeholder {
  color:#8b9286
}
.search-form input::-webkit-search-decoration {
  -webkit-appearance:none;
  appearance:none
}
.section-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  font-size:11px;
  color:var(--muted)
}
.section-bar span:first-child {
  letter-spacing:.5px
}
.explorer {
  display:grid;
  grid-template-columns:245px minmax(0,1fr);
  gap:23px;
  align-items:start
}
.catalog {
  position:relative;
  align-self:stretch;
  min-height:560px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden
}
#catalog {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column
}
.catalog-tabs,.list-footnote {
  flex-shrink:0
}
.catalog-tabs {
  display:flex;
  border-bottom:1px solid var(--line);
  padding:0 15px;
  gap:22px
}
.catalog-tabs button {
  position:relative;
  background:transparent;
  font-size:12px;
  color:var(--muted);
  padding:16px 0 14px
}
.catalog-tabs button.active {
  color:var(--ink);
  font-weight:600
}
.catalog-tabs button.active:after {
  content:"";
  position:absolute;
  height:2px;
  background:var(--green);
  bottom:-1px;
  left:0;
  right:0
}
.tab-count {
  margin-left:5px;
  font-size:10px;
  color:#8a937e
}
.catalog-list {
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:8px;
  scrollbar-width:thin;
  scrollbar-color:#ccd4c3 transparent
}
.catalog-item {
  display:flex;
  align-items:center;
  width:100%;
  text-align:left;
  border:1px solid transparent;
  background:transparent;
  padding:13px 12px;
  border-radius:5px;
  gap:10px
}
.catalog-item:hover {
  background:#f3f5ee
}
.catalog-item.selected {
  background:#edf1e7;
  border-color:#e3e9d9
}
.catalog-item .item-main {
  min-width:0;
  flex:1
}
.item-title {
  display:block;
  font-size:14px;
  font-weight:600
}
.item-sub {
  display:block;
  font-size:11px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  margin-top:1px
}
.item-hanja {
  font-family:var(--serif);
  font-size:19px;
  color:#869375;
  letter-spacing:2px;
  flex-shrink:0
}
.item-arrow {
  color:#4d7058;
  margin-left:3px
}
.list-footnote {
  font-size:10px;
  color:var(--muted);
  padding:10px 16px;
  border-top:1px solid var(--line)
}
.detail-panel {
  align-self:stretch;
  min-width:0
}
.homonym-comparison {
  margin:0 0 16px;
  padding:clamp(14px,2vw,22px);
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--white);
  overflow-wrap:anywhere;
}
#detail-homonyms:not(:empty) { margin:0 clamp(16px,3vw,28px) 20px }
.homonym-comparison h3 { margin:0 0 10px;font-size:16px }
.homonym-comparison ul {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));
  gap:12px;
  padding:0;
  margin:0;
  list-style:none;
}
.homonym-comparison li { min-width:0;padding:4px 14px 12px;border-radius:6px;background:var(--paper) }
.homonym-comparison .text-button { min-height:44px;font-size:18px }
.homonym-comparison p { margin:2px 0;font-size:14px;line-height:1.6 }
.homonym-comparison .homonym-example { margin-top:8px;padding-inline-start:10px;border-inline-start:2px solid var(--green);font-size:13px }
.detail-panel>.word-card {
  height:100%
}
.network-panel {
  grid-column:1 / -1;
  min-width:0
}
.network-panel:empty {
  display:none
}
.word-card {
  border:1px solid var(--line);
  background:var(--white);
  border-radius:8px;
  overflow:hidden
}
.word-heading {
  padding:25px 28px 20px;
  position:relative
}
.word-heading-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px
}
.tag {
  font-size:9px;
  font-weight:600;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:#66765b;
  background:#edf0e5;
  padding:4px 8px;
  border-radius:3px
}
.save-button {
  display:flex;
  align-items:center;
  gap:6px;
  background:transparent;
  color:#727e68;
  font-size:11px;
  padding:6px 8px;
  border-radius:4px
}
.save-button:hover,.save-button.saved {
  color:var(--accent);
  background:var(--accent-light)
}
.save-button svg {
  width:15px;
  height:15px
}
.word-title-row {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:20px;
  align-items:center
}
.word-title-row>div { flex:1 1 11rem;min-width:0;overflow-wrap:anywhere }
.word-title-row>.word-hanja,.saved-card .word-hanja { max-width:100%;white-space:normal;overflow-wrap:anywhere }
.word-title {
  font-size:34px;
  font-weight:650;
  line-height:1.3;
  letter-spacing:-1px
}
.word-hanja {
  font-family:var(--serif);
  font-size:50px;
  line-height:1.3;
  letter-spacing:9px;
  font-weight:400;
  color:#758765;
  padding-left:10px;
  white-space:nowrap
}
.word-meaning {
  word-break: keep-all;
  font-size:14px;
  margin-top:10px;
  color:#566450
}
.word-meaning-en {
  font-size:12px;
  color:var(--muted);
  margin-top:3px
}
.components-section {
  padding:22px 28px 25px;
  border-top:1px solid var(--line)
}
.subheading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:15px;
  gap:10px
}
.subheading h2 {
  font-size:12px;
  font-weight:600
}
.subheading span {
  font-size:10px;
  color:var(--muted)
}
.component-grid {
  display:flex;
  gap:12px;
  align-items:stretch
}
.component-grid:has(button:nth-of-type(3)) {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(7.5rem,100%),1fr))
}
.component-grid:has(button:nth-of-type(3)) .component-plus { display:none }
.component-card {
  overflow-wrap:anywhere;
  position:relative;
  min-width:0;
  flex:1;
  border:1px solid #e0e4d8;
  border-radius:5px;
  padding:14px 8px 12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  background:#fcfcf7;
  transition:background .15s,border-color .15s
}
.component-card:hover {
  border-color:#8ca07a;
  background:#f2f5ec
}
.component-card.active {
  border-color:#789367;
  background:#eff3e8;
  box-shadow:inset 0 -2px #789367
}
.component-card .glyph {
  font-family:var(--serif);
  font-size:39px;
  line-height:1.3
}
.component-card .sound {
  color:#7c856f;
  font-size:10px;
  margin:4px 0
}
.component-card .meaning {
  font-size:11px;
  word-break:keep-all;
  text-align:center
}
.component-plus {
  align-self:center;
  color:#a0a98f;
  font-size:15px
}
.learning-tip {
  display:flex;
  gap:9px;
  align-items:flex-start;
  margin-top:17px;
  color:#7a806e;
  font-size:10px
}
.learning-tip>span {
  color:#a47c46
}
.semantic-hint {
  border-left:2px solid #ad8158;
  padding-left:12px;
  margin-top:15px;
  font-size:12px;
  color:#7c6148
}
.network-section {
  margin-top:0
}
.network-section>.subheading {
  margin-bottom:12px
}
.network-section>.subheading h2 {
  font-size:14px
}
.network-card {
  border:1px solid var(--line);
  border-radius:7px;
  background-color:#f0f2e9;
  background-image:radial-gradient(#c4ceba 1px,transparent 1px);
  background-size:17px 17px;
  overflow:hidden
}
.network-scope {
  color:var(--muted);
  font-size:11px;
  margin:-5px 0 12px
}
.network-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 13px;
  background:#f8faf3;
  border-bottom:1px solid var(--line)
}
.network-key {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  color:var(--muted)
}
.network-key i {
  width:12px;
  height:12px;
  background:#e5edda;
  border:2px solid #54754a;
  border-radius:50%
}
.network-controls {
  display:flex;
  align-items:center;
  gap:5px
}
.network-controls button {
  min-width:34px;
  min-height:34px;
  padding:4px 9px;
  border:1px solid #d5dec9;
  border-radius:5px;
  background:#fffef9;
  color:var(--green);
  font-size:12px
}
.network-controls button:hover {
  background:#e9f0e0
}
#network-scale {
  min-width:36px;
  font-size:10px;
  color:var(--muted);
  text-align:center
}
.network-viewport {
  position:relative;
  max-width:100%;
  overflow:clip;
  cursor:grab;
  user-select:none;
  touch-action:pan-y pinch-zoom
}
.network-viewport.is-dragging,.network-viewport.is-dragging * {
  cursor:grabbing
}
.network-canvas {
  position:absolute;
  left:0;
  top:0
}
.network-canvas svg {
  display:block;
  width:100%;
  height:100%;
  overflow:visible
}
.network-hit {
  stroke:transparent;
  stroke-width:18;
  fill:none;
  pointer-events:stroke;
  vector-effect:non-scaling-stroke;
  cursor:pointer
}
.network-path {
  stroke:#9dad91;
  stroke-width:1.7;
  fill:none;
  pointer-events:none;
  vector-effect:non-scaling-stroke;
  stroke-linejoin:round;
  stroke-linecap:round
}
.network-path-halo {
  stroke:#f0f2e9;
  stroke-width:6;
  fill:none;
  pointer-events:none;
  vector-effect:non-scaling-stroke;
  stroke-linejoin:round
}
.has-focus .network-line-link:not(.connection-focus) {
  opacity:.16
}
.has-focus .network-edge:not(.connection-focus),
.has-focus .network-character:not(.connection-focus) {
  opacity:.32
}
.network-line-link.connection-focus .network-path {
  stroke:#a97642;
  stroke-width:3
}
.network-edge.connection-focus rect,
.network-character.connection-focus circle {
  stroke:#a97642;
  stroke-width:2.5
}
.network-line-link.current .network-path {
  stroke:#385e43;
  stroke-width:3
}
.network-line-link:hover .network-path {
  stroke:#a97642;
  stroke-width:3
}
.network-character,.network-edge {
  cursor:pointer;
  text-decoration:none
}
.network-canvas text {
  text-anchor:middle;
  pointer-events:none;
  user-select:none
}
.network-character circle {
  fill:#fffef8;
  stroke:#a8b79a;
  stroke-width:1.7
}
.network-character.root circle {
  fill:#e5edda;
  stroke:#54754a;
  stroke-width:2.5
}
.network-character.highlighted circle {
  stroke:#aa784b;
  stroke-width:3
}
.node-hanja {
  font-family:var(--serif);
  font-size:29px;
  fill:#2d4a36
}
.node-sound {
  font-size:13px;
  fill:#657357
}
.network-edge rect {
  fill:#fafbf4;
  stroke:#d4ddc9;
  stroke-width:1
}
.edge-word {
  font-size:14px;
  font-weight:600;
  fill:#334d39
}
.edge-hanja {
  font-family:var(--serif);
  font-size:13px;
  fill:#78866a
}
.word-hanja .form-hangul {
  font-family:var(--font);
  font-size:.72em;
  font-weight:400;
  color:var(--muted)
}
.word-hanja .form-hanja,.edge-hanja .form-hanja {
  font-weight:700
}
.edge-hanja .form-hangul {
  font-family:var(--font);
  font-weight:400;
  opacity:.85
}
.network-edge.current rect {
  fill:#385e43;
  stroke:#385e43
}
.network-line-link.easy,.network-edge.easy {
  --category-line:#4a7b9b;
  --category-fill:#edf5fa;
  --category-ink:#24536f;
}
.network-line-link.hard,.network-edge.hard {
  --category-line:#8a67a6;
  --category-fill:#f4eef9;
  --category-ink:#67418a;
}
.network-line-link:is(.easy,.hard) .network-path {
  stroke:var(--category-line);
}
.network-edge:is(.easy,.hard) rect {
  fill:var(--category-fill);
  stroke:var(--category-line);
}
.network-edge:is(.easy,.hard) text {
  fill:var(--category-ink);
}
.network-edge:is(.easy,.hard).current rect {
  fill:var(--category-ink);
  stroke:var(--category-ink);
  stroke-width:3;
}
.network-line-link:is(.easy,.hard).current .network-path {
  stroke:var(--category-ink);
  stroke-width:3;
}
.network-edge:is(.easy,.hard):is(:focus-visible,:hover,.connection-focus) rect {
  stroke:var(--category-ink);
  stroke-width:3;
}
.network-edge.current text {
  fill:#fffef1
}
.network-character:hover circle,.network-character:focus-visible circle,
.network-edge:hover rect,.network-edge:focus-visible rect {
  stroke:#aa784b;
  stroke-width:3
}
.network-caption {
  display:flex;
  align-items:flex-start;
  gap:7px;
  border-top:1px solid #dfe5d5;
  padding:11px 15px;
  font-size:10px;
  line-height:1.8;
  color:#647257;
  background:#f6f8f0
}
.legend-dot {
  flex-shrink:0;
  margin-top:6px;
  height:6px;
  width:6px;
  background:#83996b;
  border-radius:50%
}
.empty-state {
  padding:38px 20px;
  text-align:center;
  color:var(--muted);
  font-size:12px
}
.empty-state .empty-glyph {
  font-family:var(--serif);
  font-size:48px;
  color:#a4b093;
  display:block;
  margin-bottom:14px
}
.empty-state h2 {
  font-size:17px;
  color:var(--ink);
  margin-bottom:10px
}
.empty-state button {
  margin-top:20px
}
.loading-panel {
  padding:70px 24px;
  text-align:center;
  color:var(--muted)
}
.primary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:var(--green);
  color:#fffef4;
  padding:12px 21px;
  border-radius:5px;
  font-size:12px;
  font-weight:550
}
.primary-button:hover {
  background:#244936
}
.secondary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  background:var(--white);
  border:1px solid #d6ddcd;
  padding:11px 17px;
  border-radius:5px;
  font-size:12px
}
.secondary-button:hover {
  background:#edf2e6
}
.text-button {
  background:none;
  font-size:12px;
  color:var(--green);
  padding:6px 0;
  text-decoration:underline;
  text-underline-offset:4px
}
.page-footer {
  border-top:1px solid var(--line);
  padding:17px 44px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  color:#909781;
  font-size:10px
}
.footer-identity {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px 14px
}
.footer-brand {
  font-family:Georgia,serif;
  font-size:13px;
  color:#667759
}
.footer-repository {
  color:#667759;
  white-space:nowrap
}
.footer-repository:hover {
  text-decoration:underline;
  text-underline-offset:4px
}
.footer-links { display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px }
.footer-links a { color:var(--ink);padding:8px 0;font-size:12px;text-decoration:underline;text-underline-offset:3px }
.privacy-document h1 { font-size:clamp(1.55rem,4vw,2.3rem);line-height:1.25 }
#feedback-form { display:grid;gap:12px }
#feedback-form textarea { width:100%;resize:vertical;min-height:8rem;padding:12px;border:1px solid var(--line);border-radius:8px;font:inherit }
#feedback-form button { justify-self:start }
#feedback-status { overflow-wrap:anywhere }
#account-form .privacy-accept { display:flex;align-items:baseline;gap:8px;font-weight:400 }
#account-form .privacy-accept input { width:auto;flex:none }
.privacy-document { display:block }
.privacy-document main { max-width:48rem;margin:0 auto;padding:clamp(20px,5vw,52px);line-height:1.75 }
.privacy-document main > * + * { margin-top:1.1rem }
.privacy-document nav { display:flex;flex-wrap:wrap;gap:.4rem 1rem;border-top:1px solid var(--line);padding-top:1rem }
.privacy-document nav a,.account-form-card > a { text-decoration:underline;text-underline-offset:3px }
.notice-byline { color:var(--muted) }
.saved-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px
}
.wordbook-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  padding:18px 20px;
  margin-bottom:12px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:7px;
  font-size:12px;
  line-height:1.8
}
.wordbook-tools .storage-note {
  margin:4px 0 0
}
.wordbook-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  max-width:100%;
  flex-shrink:1
}
.wordbook-actions button {
  padding:10px 18px
}
.wordbook-actions button:disabled {
  opacity:.5;
  cursor:default
}
.wordbook-status {
  color:var(--green);
  font-size:12px;
  line-height:1.8;
  margin:0 0 20px
}
.wordbook-status:empty {
  margin-bottom:16px
}
.wordbook-status.error {
  color:#a34436
}
.saved-card {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:7px;
  padding:21px
}
.saved-card .saved-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px
}
.saved-card .word-hanja {
  font-size:33px;
  letter-spacing:4px;
  padding:0
}
.saved-card h2 {
  font-size:23px
}
.saved-card p {
  font-size:12px;
  color:var(--muted);
  margin:5px 0 20px
}
.saved-card .save-button {
  padding:5px
}
.storage-note {
  font-size:11px;
  color:var(--muted);
  margin-bottom:24px
}
.practice-wrap {
  max-width:var(--reading-width)
}
.practice-intro {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  padding:45px;
  text-align:center
}
.practice-intro h2 {
  font-size:24px;
  margin-bottom:13px
}
.practice-intro>p {
  color:var(--muted);
  font-size:13px;
  max-width:450px;
  margin:0 auto 26px
}
.practice-steps {
  display:flex;
  justify-content:center;
  gap:25px;
  font-size:11px;
  color:#788269;
  margin:28px 0
}
.practice-steps b {
  font-size:10px;
  font-weight:600;
  border:1px solid #cfd9bf;
  border-radius:50%;
  width:22px;
  height:22px;
  display:inline-grid;
  place-items:center;
  margin-right:6px
}
.practice-meta {
  font-size:10px;
  color:#8f957f;
  margin-top:23px
}
.practice-progress {
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:var(--muted);
  margin-bottom:11px
}
.progress-track {
  height:4px;
  background:#e3e8d8;
  border-radius:4px;
  margin-bottom:25px;
  overflow:hidden
}
.progress-fill {
  height:100%;
  background:#6b8951;
  transition:width .3s
}
.question-card {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  padding:34px
}
.question-prompt {
  overflow-wrap:anywhere;
  font-size:22px;
  font-weight:500;
  line-height:1.9;
  letter-spacing:-.5px;
  word-break:keep-all
}
.question-help {
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  margin:20px 0
}
.question-help>span {
  font-size:11px;
  color:var(--muted)
}
.question-translation {
  font-size:13px;
  padding:14px 18px;
  background:var(--sage);
  color:#5c6b50;
  border-radius:4px;
  margin-bottom:20px
}
.options {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.option {
  background:#fafbf6;
  border:1px solid #dce3d1;
  border-radius:5px;
  padding:20px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px
}
.option:hover:enabled {
  border-color:#7a9369;
  background:#f0f4e8
}
.option strong {
  font-size:19px;
  font-weight:600
}
.option small {
  font-size:10px;
  color:var(--muted)
}
.option:disabled {
  opacity:1
}
.option.correct {
  background:#e8f0df;
  border-color:#75925a
}
.option.incorrect {
  background:#faece4;
  border-color:#b56c4f
}
.answer-feedback {
  margin-top:25px;
  padding:22px;
  background:#eff4e7;
  border-radius:5px
}
.answer-feedback.incorrect {
  background:#faf0e7
}
.answer-feedback h3 {
  font-size:14px;
  margin-bottom:9px
}
.answer-feedback p {
  font-size:12px;
  color:#616e55;
  line-height:1.9
}
.question-actions {
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  margin-top:25px
}
.result-number {
  font-family:Georgia,serif;
  color:#536d3c;
  font-size:65px;
  line-height:1.3;
  margin-bottom:15px
}
.result-number small {
  font-size:28px;
  color:#a0ad8c
}
.result-actions {
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap
}
.question-actions > .primary-button:only-child { margin-inline-start:auto }
.exam-answers { margin:24px 0 0;padding-inline-start:1.9rem;text-align:start }
.exam-answers > li { padding:.6rem 0;border-top:1px solid var(--line) }
.exam-answers summary { cursor:pointer;font-weight:600;overflow-wrap:anywhere }
.exam-answers details p { margin:.5rem 0 }
.review-list {
  display:grid;
  gap:10px;
  margin-top:25px;
  text-align:left
}
.review-item {
  padding:15px;
  background:#f5f6ef;
  border-radius:5px;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:12px
}
.review-item>span {
  color:var(--accent)
}
.review-item>button {
  margin-left:auto
}
.session-note {
  padding:12px 0;
  color:var(--muted);
  font-size:10px;
  text-align:center
}
#toast {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%) translateY(100px);
  background:#263f33;
  color:#f9f7ee;
  font-size:12px;
  padding:12px 23px;
  border-radius:6px;
  box-shadow:0 5px 30px #233b3120;
  opacity:0;
  transition:transform .2s,opacity .2s;
  z-index:30;
  max-width:90vw;
  pointer-events:none
}
#toast.show {
  transform:translateX(-50%) translateY(0);
  opacity:1
}
@media(min-width:1500px) {
  .explorer {
    grid-template-columns:280px minmax(0,1fr)
  }
  .word-heading {
    padding:30px 35px
  }
  .components-section {
    padding:25px 35px
  }
  .word-hanja {
    font-size:60px
  }
  .component-card {
    padding:18px 10px
  }
}
@media(max-width:1150px) {
  :root { --page-gutter:28px }
  main {
    padding:30px var(--page-gutter)
  }
  .explorer {
    grid-template-columns:205px minmax(0,1fr);
    gap:17px
  }
  h1 {
    font-size:29px
  }
  .word-heading,.components-section {
    padding:22px
  }
  .word-hanja {
    font-size:40px;
    letter-spacing:5px
  }
  .word-title {
    font-size:30px
  }
  .component-card .glyph {
    font-size:33px
  }
  .component-grid {
    gap:8px
  }
  .saved-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .page-footer {
    padding:17px 28px
  }
}
/* The same navigation becomes a disclosure when the full row no longer fits. */
@media screen and (max-width:1100px) {
  .site-bar { justify-content:space-between;padding:6px max(var(--page-gutter),env(safe-area-inset-right)) 6px max(var(--page-gutter),env(safe-area-inset-left)) }
  .brand { gap:10px;font-size:14px }
  .brand-mark { width:36px;height:40px;font-size:27px }
  #menu-toggle {
    display:grid;place-items:center;width:44px;height:44px;
    padding:0;background:transparent;border:1px solid #687d70;border-radius:6px
  }
  #menu-toggle[aria-expanded=false] + #site-menu { display:none }
  #site-menu {
    position:absolute;inset:100% 0 auto;
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;
    max-height:calc(100dvh - var(--header-height));overflow:auto;overscroll-behavior:contain;
    padding:10px max(var(--page-gutter),env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(var(--page-gutter),env(safe-area-inset-left));
    background:#233b31;box-shadow:0 8px 16px #243b3120
  }
  .nav-tools {
    grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));
    margin:2px 0 0;padding:8px 0 0;border:0;border-top:1px solid #516457
  }
  #account-id { max-width:none }
}
@media(max-width:850px) {
  .explorer {
    grid-template-columns:220px minmax(0,1fr)
  }
  .word-title-row {
    align-items:flex-start;
    gap:10px
  }
  .word-hanja {
    font-size:36px
  }
}
@media(max-width:640px) {
  :root { --page-gutter:16px }
  main {
    padding:20px var(--page-gutter)
  }
  .explore-controls { padding:10px 10px 0;margin-bottom:16px }
  .explore-tools { gap:6px }
  .search-form input { height:46px;font-size:16px;padding-right:4px }
  .random-button { min-height:46px;max-width:35%;white-space:normal;overflow-wrap:anywhere;padding:6px 10px;gap:5px }
  .explore-filters summary { gap:8px }
  .search-filters p { min-width:min(100%,220px) }
  .search-modes { flex-shrink:1 }
  .search-modes button,.vocabulary-filters button { min-height:44px }
  .search-form>svg {
    margin-left:15px;
    margin-right:10px
  }
  .explorer {
    display:block
  }
  .catalog {
    min-height:0;
    margin-bottom:21px
  }
  #catalog {
    position:static
  }
  .catalog-tabs {
    padding:0 17px
  }
  .catalog-tabs button {
    padding:12px 0
  }
  .catalog-list {
    flex:auto;
    max-height:clamp(11rem,27svh,16rem);
    padding:4px
  }
  .network-panel {
    margin-top:24px
  }
  .catalog-item {
    padding:10px;
    gap:6px;
    min-width:0
  }
  .catalog-item .item-main { display:flex;flex-wrap:wrap;align-items:center;column-gap:7px }
  .item-title { font-size:15px;overflow-wrap:anywhere }
  .catalog-item .item-sub { flex:0 0 100%;font-size:12px }
  .back-to-results {
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:44px;
    margin-bottom:4px;
    padding:0 8px;
    background:transparent;
    color:var(--green);
    font-size:13px;
    font-weight:600;
  }
  .detail-panel>.word-card { height:auto }
  .item-sub {
    font-size:10px
  }
  .item-hanja {
    font-size:17px;
    letter-spacing:0;
    max-width:35%;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden
  }
  .item-arrow {
    display:none
  }
  .list-footnote {
    font-size:9px;
    padding:8px 15px
  }
  .word-heading,.components-section {
    padding:21px
  }
  .word-title {
    font-size:30px
  }
  .word-hanja {
    font-size:40px;
    letter-spacing:5px
  }
  .word-meaning {
    font-size:13px
  }
  .word-meaning-en {
    font-size:11px
  }
  .subheading span {
    font-size:9px
  }
  .component-card .glyph {
    font-size:33px
  }
  .component-plus {
    font-size:12px
  }
  .component-card .meaning {
    font-size:10px
  }
  .page-footer {
    padding:15px 20px;
    gap:10px;
    font-size:9px
  }
  .saved-grid {
    grid-template-columns:1fr
  }
  .saved-card {
    padding:20px
  }
  .question-card {
    padding:23px 18px
  }
  .question-prompt {
    font-size:18px;
    line-height:1.9
  }
  .options { grid-template-columns:1fr;gap:8px }
  .option {
    flex-direction:row;
    justify-content:space-between;
    min-height:48px;
    padding:10px 16px;
    text-align:start;
    overflow-wrap:anywhere
  }
  .option strong {
    font-size:16px
  }
  .option small {
    font-size:12px
  }
  .practice-intro {
    padding:30px 20px
  }
  .practice-intro h2 {
    font-size:21px
  }
  .practice-intro>p {
    font-size:12px
  }
  .practice-steps {
    gap:10px;
    font-size:10px
  }
  .practice-steps b {
    margin-right:3px;
    width:19px;
    height:19px
  }
  .question-actions {
    flex-wrap:wrap
  }
  .question-actions>* {
    flex:1
  }
  .question-help {
    gap:8px
  }
  .question-help>span {
    font-size:10px
  }
  .question-help button {
    font-size:10px
  }
  .section-bar {
    font-size:10px
  }
  .review-item {
    flex-wrap:wrap
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }
}

.empty-state > a {
  margin-top: 20px;
}

.vocabulary-filter-bar {
  margin:0 0 16px;
}
.vocabulary-filters {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  font-size:12px;
}
.vocabulary-filters>span {
  margin-right:5px;
  font-weight:600;
}
.vocabulary-filters button {
  background:var(--white);
  border:1px solid #d5dece;
  border-radius:20px;
  padding:7px 13px;
  min-height:36px;
}
.vocabulary-filters button.active {
  background:var(--green);
  border-color:var(--green);
  color:white;
}
.filter-help {
  color:var(--muted);
  font-size:11px;
  margin-top:8px;
}
.level-badge,.idiom-badge {
  display:inline-flex;
  align-items:center;
  font-size:10px;
  line-height:1.6;
  font-weight:600;
  padding:2px 7px;
  border-radius:4px;
  white-space:nowrap;
  color:#315e48;
  background:#edf3e8;
  border:1px solid #c6d6be;
}
.level-badge.easy {
  color:#24536f;
  background:#edf5fa;
  border-color:#adc7d8;
}
.idiom-badge {
  color:#604819;
  background:#faf4dc;
  border-color:#d9c998;
  white-space:normal;
  overflow-wrap:anywhere;
  max-width:100%;
  margin-inline-start:3px;
}
.vocabulary-filters + .vocabulary-filters { margin-top:8px }
.level-badge.hard {
  color:#67418a;
  background:#f4eef9;
  border-color:#c8b2dc;
}
.level-badge.classical {
  color:#824c22;
  background:#fff0de;
  border:1px dashed #a46b36;
}
.catalog-item .level-badge {
  margin:3px 0;
}
.word-tags,.category-legend {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
.category-legend {
  gap:16px;
  margin:10px 0;
  font-size:11px;
}
.filter-notice {
  padding:12px 22px;
  background:var(--sage);
  font-size:12px;
}
.network-line-link.classical .network-path {
  stroke:#a46b36;
  stroke-dasharray:5 3;
}
.network-edge.classical rect {
  fill:#fff2e2;
  stroke:#a46b36;
  stroke-dasharray:4 2;
}
.network-edge .edge-category {
  font-size:10px;
  fill:#526b45;
}
.network-edge.classical text {
  fill:#824c22;
}
.network-edge.classical.current rect {
  fill:#7b4b25;
  stroke:#7b4b25;
  stroke-width:3;
}
.network-edge.current text {
  fill:#fffef1;
}
.network-line-link.classical.current .network-path {
  stroke:#7b4b25;
  stroke-width:3;
}
.network-edge.classical:focus-visible rect,.network-edge.classical:hover rect,
.network-edge.classical.connection-focus rect {
  stroke:#724019;
  stroke-width:3;
}
.practice-intro.practice-setup { text-align:start;padding:clamp(18px,3vw,32px) }
.practice-resume {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px clamp(18px,3vw,32px);
  margin-bottom:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--sage);
}
.practice-resume p { margin:4px 0 0;font-size:14px }
@media(max-width:640px) {
  .practice-resume .primary-button { width:100%;min-height:44px }
}
.practice-setup .practice-settings,.practice-setup fieldset { margin:0 }
.practice-setup legend { font-size:17px }
.practice-start {
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;
  margin-top:18px;padding-top:16px;border-top:1px solid var(--line)
}
.practice-start .practice-pool { flex:1 0 100%;margin:0;font-size:13px }
.practice-settings {
  text-align:left;
  margin:24px 0;
}
.practice-settings fieldset {
  padding:0;
  border:0;
  margin:0 0 22px;
  min-width:0;
}
.practice-settings legend {
  font-size:13px;
  font-weight:600;
  margin-bottom:10px;
}
.practice-levels {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.practice-level-card {
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fafbf6;
  cursor:pointer;
}
.practice-level-card:has(input:checked) {
  background:#edf3e7;
  border-color:#55794b;
  box-shadow:inset 0 0 0 1px #55794b;
}
.practice-level-card:focus-within {
  outline:3px solid #c58646;
  outline-offset:3px;
}
.practice-level-card input {
  accent-color:var(--green);
  margin:3px 0 0;
}
.practice-level-card small {
  display:block;
  color:#687361;
  font-size:11px;
  margin-top:7px;
}
.practice-start .practice-pool { color:var(--green) }
.question-tags {
  margin:12px 0;
}
@media(max-width:640px) {
  .vocabulary-filters button { padding:6px 10px; }
  .word-tags { gap:6px; }
}

/* Accounts, dictionary examples, and private word notes. */
.account-card { max-width:var(--reading-width);background:var(--white);border:1px solid var(--line);border-radius:var(--panel-radius);padding:32px;display:grid;gap:22px }
.account-form-card { max-width:var(--auth-width) }
.account-heading,.account-actions,.account-tabs,.note-actions { display:flex;align-items:center;gap:14px;flex-wrap:wrap }
.account-sections { max-width:var(--reading-width);margin:0 0 20px;gap:4px;align-items:stretch }
.account-sections a {
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:0;
  padding:8px 12px;border-radius:6px;color:var(--muted);font-weight:600
}
.account-sections a:hover,.account-sections a[aria-current=page] { background:var(--sage);color:var(--green) }
.account-sections a[aria-current=page] { box-shadow:inset 0 -2px var(--green) }
.account-heading { justify-content:space-between }
.account-card h2 { font-size:26px;overflow-wrap:anywhere }
:is(#account-form,#email-settings-form,#delete-account-form,.credential-form) { display:grid;gap:12px }
:is(#account-form,#email-settings-form,#delete-account-form,.credential-form) label,.note-editor label { font-weight:600 }
:is(#account-form,#email-settings-form,#delete-account-form,.credential-form) input,.note-editor textarea { width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:inherit }
.credential-settings summary,.history-round summary { cursor:pointer;font-weight:600 }
.credential-settings details { padding:14px 0;border-top:1px solid var(--line) }
.delete-account > summary { color:#9b352b }
#delete-account-form .delete-confirm { display:flex;align-items:baseline;gap:8px }
#delete-account-form input[type=checkbox] { flex:none;width:auto }
#delete-account-form .primary-button { background:#9b352b;color:white }
.credential-settings details > p { margin-top:12px }
.credential-settings form { margin-top:16px;max-width:480px }
.history-round { padding:16px 0;border-bottom:1px solid var(--line) }
.history-round ol { padding-inline-start:1.6em }
.history-round li { margin-top:12px }
.note-editor textarea { resize:vertical;min-height:110px;line-height:1.7 }
textarea:focus-visible { outline:3px solid #c58646;outline-offset:3px }
.field-help { color:var(--muted);font-size:12px }
.form-status { min-height:22px;font-size:13px;color:var(--accent) }
.guest-import { padding-top:20px;border-top:1px solid var(--line);display:grid;gap:12px;justify-items:start }
.account-notes { max-width:var(--reading-width);display:grid;gap:16px }
.account-note { padding:20px;background:var(--white);border:1px solid var(--line);border-radius:12px }
.account-note>div { display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap }
.account-note time { font-size:12px;color:var(--muted) }
.account-note p { white-space:pre-wrap;overflow-wrap:anywhere;margin-top:10px }
.word-example { margin:0 28px 22px;padding:16px 20px;background:var(--sage);border-left:3px solid var(--green);border-radius:0 8px 8px 0 }
.word-example h3 { color:var(--green);font-size:12px;margin-bottom:6px }
.word-example p { font-size:16px;line-height:1.9;word-break:keep-all;overflow-wrap:anywhere }
.word-example .example-translation { margin-top:5px;color:var(--muted);font-size:13px;line-height:1.65;word-break:normal }
.note-editor { border-top:1px solid var(--line);padding:24px 28px;display:grid;gap:12px }
@media(max-width:640px) { .account-card { padding:22px }.word-example { margin:0 20px 20px }.note-editor { padding:20px } }

/* Personal entries share the explorer and retain an explicit ownership label. */
.personal-badge { display:inline-block;color:#805821;background:#fbefda;border:1px solid #ead4ab;border-radius:5px;padding:2px 7px;font-size:10px;line-height:1.5;vertical-align:middle;margin-left:6px }
#personal-word-form,#dictionary-import-form { display:grid;gap:14px;min-width:0 }
#personal-word-form label,#dictionary-import-form label { font-weight:600;font-size:14px }
#personal-word-form input,#personal-word-form select,#dictionary-import-form input { width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);padding:12px;font:inherit }
#personal-word-form input[lang] { font-family:var(--font) }
.idiom-options { display:flex;flex-wrap:wrap;gap:8px 18px;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px }
.idiom-options label { display:inline-flex;align-items:center;gap:6px }
#personal-word-form .idiom-options input { width:auto;accent-color:var(--green) }
.practice-selectors { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:0 16px }
.practice-review-entry:not(:empty) { margin-bottom:18px }
.practice-tag-picker { display:grid;gap:6px;margin-bottom:16px;font-weight:600;text-align:start }
.practice-tag-picker select { width:100%;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--white);font:inherit }
.word-form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px }
.word-field { display:grid;gap:7px;min-width:0 }
.new-character { min-width:0;display:grid;gap:14px;margin-top:18px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--sage) }
.new-character legend { padding:0 8px;font-size:28px }
#new-characters { margin-top:10px }
#dictionary-import-form { margin-top:16px }
@media(max-width:640px) { .word-form-grid { grid-template-columns:1fr }.new-character { padding:16px } }
.dictionary-extra { border-top:1px solid var(--line);padding-top:16px }
.dictionary-extra summary { cursor:pointer;color:var(--green);font-size:13px;font-weight:600 }
.dictionary-extra>div { display:grid;gap:12px;margin-top:18px }
.dictionary-list-heading { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px }
#personal-word-form > h2,.dictionary-list-heading h2 { font-size:16px }
.dictionary-list { max-height:350px;overflow:auto;overscroll-behavior:contain }
.dictionary-entry { display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line) }
.dictionary-entry>div { min-width:0;overflow-wrap:anywhere }
.entry-tag-editor { margin-top:6px;font-size:13px }
.entry-tag-editor summary { cursor:pointer;color:var(--green) }
.entry-tag-editor .idiom-options { margin-top:6px }

@media screen and (max-width:640px) {
  .account-sections { display:grid;grid-template-columns:1fr 1fr;gap:6px }
  .account-sections a { text-align:center;overflow-wrap:anywhere }
  #main :is(input:not([type=radio],[type=checkbox],[type=file]),textarea,select) { font-size:16px }
  .practice-start .primary-button { width:100%;min-height:44px }
  .word-heading-meta .save-button,.question-help button { min-height:44px }
}

.dictionary-entry p { color:var(--muted);font-size:12px;line-height:1.7;margin-top:5px }
.dictionary-delete { color:var(--accent);flex-shrink:0;font-size:11px }
@media(max-width:640px) { .dictionary-entry { gap:10px }.dictionary-list-heading { align-items:flex-start }.personal-dictionary { padding:20px } }

#account-form[hidden] { display:none }
.account-card { --google-button-width:400px }
.account-form-card.google-enabled { grid-template-columns:minmax(0,var(--google-button-width));justify-content:center }
.google-auth { margin:12px 0;min-width:0 }
/* Reserve the large GIS button's space before its iframe loads. */
#google-button { width:100%;max-width:var(--google-button-width);min-height:40px;contain:inline-size }
.translation-picker,.dictionary-file-picker { display:flex;align-items:center;gap:10px;flex-wrap:wrap }
.translation-picker select { max-width:100% }
.dictionary-file-picker {
  border:1px dashed var(--line);
  border-radius:10px;
  background:var(--paper);
  padding:12px 14px;
}
#dictionary-filename { font-size:14px;color:var(--muted) }
#dictionary-filename,.account-heading p { overflow-wrap:anywhere }

.study-stats { margin-bottom:1rem }
.stats-heading { display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px }
.study-period { padding:0;margin:0;border:0;min-width:0 }
.study-period legend { margin-bottom:4px;font-size:.85rem }
.study-period select { max-width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);font:inherit }
.stats-cards { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px }
.stats-cards div { padding:14px;background:var(--sage);border-radius:10px }
.stats-cards dt { font-size:.85rem }
.stats-cards dd { margin:6px 0 0;color:var(--green);font-size:1.35rem;font-weight:650 }
.study-table { width:100%;border-collapse:collapse;margin-top:20px;font-variant-numeric:tabular-nums }
.study-table caption { text-align:start;font-weight:650;padding-bottom:8px }
.study-table th,.study-table td { padding:10px 6px;text-align:start;border-bottom:1px solid var(--line);overflow-wrap:anywhere }
.study-table th { font-size:.85rem }
.study-table small,.stats-cards small { font-size:.8em;font-weight:normal;white-space:nowrap }
.study-table meter { width:100%;max-width:6em;display:block;height:5px }
@media (max-width:640px) {
  .study-stats { padding:16px }
  .study-table { font-size:.82rem }
  .study-table th,.study-table td { padding:8px 3px }
  .study-table small { display:block }
}

.word-pronunciation { display:flex; align-items:center; gap:.4rem .75rem; flex-wrap:wrap }
.listen-button { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; min-height:44px; padding:.35rem .7rem; border:1px solid var(--green); border-radius:999px; background:transparent; color:var(--green); font:inherit; font-size:.8rem; cursor:pointer }
.listen-button[aria-pressed="true"] { color:white; background:var(--green) }
.listen-button svg { width:1.1rem; height:1.1rem; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linejoin:round; stroke-linecap:round; flex:none }
.word-example .listen-button { margin-top:.5rem }
.word-example .audio-transcript { color:var(--muted); font-size:.95rem; margin-top:.4rem }

.inference-card,.inference-stats {
  max-width:var(--reading-width);margin:0 0 1rem;padding:clamp(1rem,3vw,2rem);
  background:var(--white);border:1px solid var(--line);border-radius:var(--panel-radius);overflow-wrap:anywhere
}
.inference-end > p { margin-bottom:.75rem }
.inference-actions {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.inference-card > p,.inference-instruction p { margin-top:.45rem;color:var(--muted) }
.inference-root span,.inference-clue small {color:var(--muted)}
.inference-card h2,.inference-stats h2 {font-size:1.18rem}
.inference-card p {line-height:1.65}
.inference-map {padding:1.25rem .5rem;margin:1.2rem 0;background:var(--sage);border-radius:12px}
.inference-root {display:grid;justify-items:center;text-align:center;color:var(--green)}
.inference-root strong {font-size:clamp(2rem,6vw,3rem);line-height:1.2}
.inference-root span {font-size:1.1rem;letter-spacing:.12em}
.inference-root::after,.inference-branch::before {content:"";width:1px;height:1.2rem;background:var(--green);display:block;margin:auto}
.inference-branches {display:flex;max-width:40rem;margin:auto}
.inference-branch {flex:1;min-width:0;text-align:center;position:relative}
.inference-branch::after {content:"";position:absolute;top:0;left:0;right:0;border-top:1px solid var(--green);pointer-events:none}
.inference-branch:first-child::after {left:50%}
.inference-branch:last-child::after {right:50%}
.inference-branch button {font:inherit;background:var(--white);border:1px solid var(--green);color:var(--green);border-radius:9px;min-height:44px;padding:.4rem .7rem}
.inference-branch button[aria-expanded=true] {background:var(--green);color:white}
.inference-leaves {margin:.4rem .25rem 0}
.inference-clue {background:var(--white);border:1px solid var(--line);border-radius:6px;margin:.3rem 0;text-align:start}
.inference-clue summary {padding:.65rem .3rem;cursor:pointer;min-height:44px}
.inference-clue p {padding:0 .6rem;margin:.2rem 0 .7rem;font-size:.9rem}
.inference-clue mark {background:#f5dfaf;color:#42331a;font-weight:700}
.inference-choices {display:grid;gap:.5rem;margin:.7rem 0 1rem}
.inference-choices button {display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:start;font:inherit;min-height:46px;border-radius:8px;border:1px solid var(--line);background:var(--white);color:var(--ink);padding:.65rem 1rem}
.inference-choices button:enabled:hover,.inference-choices .chosen {border-color:var(--green);background:var(--sage)}
.inference-choices small {font-weight:700}
.inference-result {border-inline-start:3px solid var(--green);padding-inline-start:1rem;margin:1rem 0}
.inference-result ul {padding-inline-start:1.2rem}
.inference-stats dl {display:flex;flex-wrap:wrap;gap:1rem 2.5rem;margin-bottom:0}
.inference-stats dt,.inference-stats small {font-size:.9rem}
.inference-stats dd {margin:.25rem 0 0;color:var(--green);font-size:1.3rem;font-weight:700}

/* Center each page at the width its content can use, including its heading. */
@media screen {
  #main:is([data-page=practice],[data-page=inference],[data-page=account],[data-page=feedback]) {
    --reading-width:64rem;
    max-width:calc(var(--reading-width) + var(--page-gutter) + var(--page-gutter))
  }
  #main[data-page=inference] { --reading-width:72rem }
  #main[data-page=feedback] { --reading-width:46rem }
  #main[data-page=account]:has(> .account-form-card) { --reading-width:var(--auth-width) }
}

@media screen and (min-width:960px) {
  .inference-overview,.inference-exercise {
    display:grid;
    grid-template-columns:minmax(0,3fr) minmax(0,2fr);
    gap:clamp(20px,2vw,32px)
  }
  .inference-overview > section { margin:0 }
  .inference-overview .inference-actions { margin-top:1.5rem }
  .inference-exercise {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"map instruction" "map answers";
    grid-template-rows:auto 1fr;
    row-gap:1rem
  }
  .inference-instruction { grid-area:instruction }
  .inference-exercise .inference-map { grid-area:map;align-self:start;margin:0;padding-block:2rem }
  .inference-answer { grid-area:answers;min-width:0 }
  .credential-settings,.account-notes:has(> .account-note:nth-child(2)) {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
    column-gap:24px
  }
  .practice-levels,.stats-cards { grid-template-columns:repeat(4,minmax(0,1fr)) }
}

@media screen and (min-width:1101px) {
  #site-menu > .nav-link:first-child { margin-inline-start:auto }
  .page-footer {
    padding-inline:max(var(--page-gutter),calc((100% - var(--site-width)) / 2 + var(--page-gutter)))
  }
  .saved-grid {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr))
  }
  .saved-grid:has(> :last-child:nth-child(-n+2)) {
    grid-template-columns:repeat(auto-fit,minmax(0,24rem));
    justify-content:center
  }
}

/* A wide detail panel can show the example beside the headword. */
@media screen and (min-width:1200px) {
  :root { --page-gutter:clamp(32px,4vw,72px) }
  .word-card:has(> .word-example) {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start
  }
  .word-card > .word-example {
    align-self:center;
    margin:1.5rem 1.75rem 1.5rem 0
  }
  .word-card > .word-example ~ * { grid-column:1 / -1 }
}
