:root {
  --rice-paper: #fffaf3;
  --steamed-paper: #f7efe3;
  --peach: #f2a7a0;
  --peach-pale: #ffe2dc;
  --peach-dark: #a95751;
  --tea-ink: #413936;
  --tea-muted: #766b65;
  --bamboo: #9baa96;
  --bamboo-dark: #5f705b;
  --steamer-gold: #e4b45f;
  --line: rgba(65, 57, 54, 0.14);
  --shadow: 0 24px 70px rgba(91, 65, 54, 0.1);
  --display: "YuMincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --body: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color: var(--tea-ink);
  background: var(--rice-paper);
  font-family: var(--body);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255, 250, 243, 0.88), rgba(255, 250, 243, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(65, 57, 54, 0.028) 31px 32px);
  color: var(--tea-ink);
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(169, 87, 81, 0.35);
  outline-offset: 4px;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.93);
}

.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--tea-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.bun-mark {
  position: relative;
  width: 42px;
  height: 36px;
  display: inline-block;
  border: 2px solid var(--tea-ink);
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: var(--peach-pale);
  transform: rotate(-2deg);
}

.bun-mark::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--tea-ink);
  border-bottom: 2px solid var(--tea-ink);
  background: var(--peach-pale);
  transform: rotate(27deg) skew(9deg);
}

.bun-mark i {
  position: absolute;
  top: 6px;
  width: 2px;
  height: 9px;
  border-radius: 99px;
  background: var(--peach-dark);
  transform-origin: bottom;
}

.bun-mark i:nth-child(1) { left: 13px; transform: rotate(-22deg); }
.bun-mark i:nth-child(2) { left: 19px; height: 11px; }
.bun-mark i:nth-child(3) { left: 25px; transform: rotate(22deg); }

.site-header nav {
  display: flex;
  gap: 30px;
  color: var(--tea-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-header nav a {
  position: relative;
  padding-block: 8px;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 1px;
  height: 2px;
  background: var(--peach-dark);
  transition: right 180ms ease;
}

.site-header nav a:hover::after { right: 0; }

.daily-section {
  position: relative;
  padding-block: 72px 92px;
}

.date-rail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px 28px;
  color: var(--tea-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.date-rail span {
  color: var(--peach-dark);
}

.date-rail::before {
  content: "";
  width: 37px;
  height: 1px;
  background: var(--peach-dark);
}

.date-rail time {
  font-variant-numeric: tabular-nums;
}

.daily-card {
  position: relative;
  isolation: isolate;
  padding: 34px 50px 52px;
  border: 1px solid rgba(65, 57, 54, 0.09);
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.daily-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14px;
  right: -12px;
  top: 14px;
  bottom: -14px;
  border: 1px solid rgba(65, 57, 54, 0.08);
  background: var(--steamed-paper);
}

.daily-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -7px;
  height: 14px;
  background: radial-gradient(circle at 7px 7px, var(--rice-paper) 0 5px, transparent 5.5px) 0 0 / 18px 14px repeat-x;
}

.daily-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tea-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.daily-kicker span:first-child {
  color: var(--peach-dark);
}

.issue-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--steamer-gold);
}

.daily-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1.15fr);
  gap: 76px;
  align-items: center;
  min-height: 430px;
}

.word-face {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 330px;
}

.word-face::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(300px, 90%);
  aspect-ratio: 1;
  border-radius: 48% 52% 55% 45% / 53% 43% 57% 47%;
  background: var(--peach-pale);
  transform: rotate(-7deg);
}

.pinyin {
  margin: 0;
  color: var(--peach-dark);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.word-face h1,
.entry-title h1 {
  margin: 14px 0 0;
  font-family: "Songti SC", "STSong", var(--display);
  font-size: clamp(5.8rem, 11vw, 9.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.08em;
}

.traditional {
  margin: 20px 0 0;
  color: var(--tea-muted);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.word-note {
  max-width: 520px;
  padding-block: 36px;
}

.meaning-label,
.eyebrow {
  margin: 0 0 12px;
  color: var(--bamboo-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.word-note h2,
.entry-title-note h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.summary {
  margin: 22px 0 0;
  color: var(--tea-muted);
  font-size: 0.98rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.tag {
  padding: 4px 11px;
  border: 1px solid rgba(95, 112, 91, 0.25);
  border-radius: 999px;
  background: rgba(155, 170, 150, 0.1);
  color: var(--bamboo-dark);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--tea-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.read-more span {
  transition: transform 160ms ease;
}

.read-more:hover span { transform: translateX(5px); }

.paper-fold {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 44px;
  height: 44px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  background: linear-gradient(135deg, transparent 48%, rgba(228, 180, 95, 0.55) 49% 100%);
}

.concept-strip {
  overflow: hidden;
  border-block: 1px solid rgba(65, 57, 54, 0.08);
  background: var(--peach-pale);
}

.concept-inner {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 660px) 1fr;
  gap: 34px;
  align-items: center;
  min-height: 300px;
}

.concept-mark {
  align-self: start;
  margin: 38px 0 0;
  color: var(--peach-dark);
  font-family: Georgia, serif;
  font-size: 8rem;
  line-height: 1;
}

.concept-inner h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.45;
}

.concept-inner div > p {
  max-width: 580px;
  margin: 20px 0 0;
  color: var(--tea-muted);
}

.steam-line,
.steam-line::before,
.steam-line::after {
  position: absolute;
  width: 80px;
  height: 190px;
  border: 1px solid rgba(169, 87, 81, 0.32);
  border-width: 0 0 0 1px;
  border-radius: 50%;
  content: "";
}

.steam-line {
  right: 90px;
  bottom: -45px;
  transform: rotate(19deg);
}

.steam-line::before { left: 42px; top: -34px; }
.steam-line::after { left: 84px; top: 9px; }

.recent-section,
.archive-list {
  padding-block: 96px 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.section-heading > a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--tea-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.entry-list {
  border-top: 1px solid var(--tea-ink);
}

.entry-card {
  border-bottom: 1px solid var(--line);
}

.entry-card > a {
  display: grid;
  grid-template-columns: 200px 1fr 36px;
  gap: 40px;
  align-items: center;
  min-height: 176px;
  padding: 24px 20px;
  transition: background-color 160ms ease, padding-left 160ms ease;
}

.entry-card > a:hover {
  padding-left: 28px;
  background: rgba(255, 226, 220, 0.36);
}

.entry-card-word {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.entry-card-word > span {
  font-family: "Songti SC", "STSong", var(--display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.entry-card-word small {
  color: var(--peach-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.entry-card-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.entry-card-copy > .summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--tea-muted);
  font-size: 0.82rem;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.entry-card-copy .tags {
  margin-top: 13px;
}

.card-arrow {
  color: var(--peach-dark);
  font-size: 1.3rem;
  transition: transform 160ms ease;
}

.entry-card > a:hover .card-arrow { transform: translateX(6px); }

.archive-hero {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.8fr);
  gap: 80px;
  align-items: end;
  padding-block: 90px 80px;
}

.archive-hero > h1 {
  grid-column: 1;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.archive-hero > .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -58px;
}

.search-form {
  grid-column: 2;
  padding: 28px;
  border: 1px solid var(--line);
  background: #fffdf9;
}

.search-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--tea-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-form > div {
  display: flex;
  border-bottom: 1px solid var(--tea-ink);
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--tea-ink);
  font: inherit;
  font-size: 0.88rem;
}

.search-form input:focus { outline: 0; }

.search-form button {
  flex: 0 0 auto;
  margin: 5px 0;
  padding: 6px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--tea-ink);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.archive-list {
  padding-top: 24px;
}

.result-line {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
  color: var(--tea-muted);
  font-size: 0.78rem;
}

.result-line p { margin: 0; }
.result-line span { margin-left: 9px; color: var(--peach-dark); }

.entry-detail {
  padding-block: 72px 130px;
}

.back-link {
  display: inline-block;
  margin-bottom: 54px;
  color: var(--tea-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.entry-title {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
  gap: 80px;
  align-items: center;
  padding: 54px 64px;
  border: 1px solid var(--line);
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.entry-title > div:first-child {
  position: relative;
  z-index: 0;
  display: grid;
  justify-items: center;
  min-width: 0;
}

.entry-title > div:first-child::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 240px;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  border-radius: 48% 52% 55% 45% / 53% 43% 57% 47%;
  background: var(--peach-pale);
  transform: translate(-50%, -50%) rotate(-7deg);
}

.entry-title h1 {
  font-size: clamp(5rem, 10vw, 8rem);
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.word-face h1.word-medium,
.entry-title h1.word-medium { font-size: clamp(3.8rem, 5.8vw, 5rem); }
.word-face h1.word-long,
.entry-title h1.word-long { font-size: clamp(2.7rem, 4.5vw, 3.8rem); line-height: 1.12; letter-spacing: -0.04em; }
.word-face h1.word-very-long,
.entry-title h1.word-very-long { font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1.28; letter-spacing: 0; }
.entry-card-word span { max-width: 100%; overflow-wrap: anywhere; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 90px;
  padding: 85px 45px;
  border-bottom: 1px solid var(--line);
}

.detail-copy {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  line-height: 1.9;
}

.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p { margin: 0 0 1em; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 1.5em 0 0.55em;
  font-family: var(--display);
  line-height: 1.45;
}
.markdown-body h1 { font-size: 1.65em; }
.markdown-body h2 { font-size: 1.35em; }
.markdown-body h3 { font-size: 1.1em; }
.markdown-body ul,
.markdown-body ol { padding-left: 1.45em; }
.markdown-body blockquote {
  margin: 1.4em 0;
  padding: 0.4em 0 0.4em 1.2em;
  border-left: 3px solid var(--peach);
  color: var(--tea-muted);
}
.markdown-body a {
  color: var(--peach-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.markdown-body img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 680px;
  margin: 1.5em auto;
  border: 1px solid var(--line);
  object-fit: contain;
}
.markdown-body code {
  padding: 0.12em 0.35em;
  background: var(--steamed-paper);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.82em;
}
.markdown-body pre {
  overflow-x: auto;
  padding: 18px;
  background: var(--tea-ink);
  color: var(--rice-paper);
  font-size: 0.78em;
  line-height: 1.65;
}
.markdown-body pre code { padding: 0; background: transparent; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 0.82em; }
.markdown-body th,
.markdown-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.markdown-preview img { display: none; }
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview p { margin: 0; font: inherit; }
.category-tag {
  border-color: rgba(169, 87, 81, 0.26);
  background: var(--peach-pale);
  color: var(--peach-dark);
}

.detail-grid aside {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.detail-grid aside p:last-child {
  margin: 0;
  color: var(--tea-muted);
  font-size: 0.9rem;
}

.examples-section {
  padding: 90px 45px 0;
}

.example {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.example > span {
  color: var(--steamer-gold);
  font-family: Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
}

.example p { margin: 0; }

.example-zh {
  font-family: "Songti SC", "STSong", var(--display);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.5;
}

.example-pinyin {
  margin-top: 7px !important;
  color: var(--peach-dark);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.example-ja {
  margin-top: 13px !important;
  color: var(--tea-muted);
  font-size: 0.9rem;
}

.empty-card,
.error-page {
  padding: 64px;
  border: 1px dashed rgba(65, 57, 54, 0.25);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.empty-card h1,
.empty-card h2,
.error-page h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
}

.empty-card p,
.error-page > p {
  color: var(--tea-muted);
}

.error-page {
  margin-block: 80px 120px;
}

.error-code {
  margin: 0 !important;
  color: var(--peach) !important;
  font-family: Georgia, serif;
  font-size: 5rem;
  font-style: italic;
  line-height: 1;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  padding-block: 82px 62px;
}

.admin-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.admin-hero div > p:last-child {
  margin: 22px 0 0;
  color: var(--tea-muted);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--tea-ink);
  border-radius: 0;
  background: var(--tea-ink);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.primary-button span {
  color: var(--peach);
  font-size: 1.2rem;
}

.secondary-button {
  border-color: var(--peach-dark);
  background: transparent;
  color: var(--peach-dark);
}

.notice {
  margin-bottom: 24px;
  padding: 13px 18px;
  border-left: 3px solid var(--bamboo-dark);
  background: rgba(155, 170, 150, 0.13);
  color: var(--bamboo-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-list-section {
  padding-bottom: 120px;
}

.admin-search {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.72);
}

.admin-search label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.admin-search > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.admin-search input {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  font: inherit;
}

.admin-search button,
.pagination a {
  padding: 11px 18px;
  border: 1px solid var(--tea-ink);
  background: var(--tea-ink);
  color: var(--rice-paper);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  margin-top: 30px;
}

.pagination a:last-child { margin-left: auto; }

.admin-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-block: 1px solid var(--tea-ink);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-list-head p { margin: 0; }
.admin-list-head span { color: var(--peach-dark); }

.admin-row {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) 90px 110px;
  gap: 28px;
  align-items: center;
  min-height: 124px;
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-word {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.admin-word strong {
  font-family: "Songti SC", "STSong", var(--display);
  font-size: 2.35rem;
  line-height: 1;
}

.admin-word span,
.admin-row-copy p {
  color: var(--tea-muted);
  font-size: 0.68rem;
}

.admin-row-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
}

.admin-row-copy p {
  margin: 4px 0 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.status-stamp {
  display: inline-grid;
  place-items: center;
  width: 74px;
  min-height: 32px;
  border: 1px solid currentColor;
  color: var(--tea-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.status-published { color: var(--bamboo-dark); }
.status-private { color: var(--peach-dark); }

.edit-link {
  color: var(--peach-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.editor-shell {
  padding-block: 52px 130px;
}

.editor-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.editor-topline .back-link { margin: 0; }

.editor-topline > p {
  margin: 0;
  color: var(--tea-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.entry-form {
  border: 1px solid var(--line);
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.editor-heading {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 48px;
  align-items: center;
  padding: 42px 52px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 226, 220, 0.78) 0 190px, transparent 190px);
}

.editor-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 600;
}

.editor-heading div > p:last-child {
  margin: 10px 0 0;
  color: var(--tea-muted);
  font-size: 0.82rem;
}

.editor-word-preview {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  min-height: 142px;
}

.editor-word-preview > span {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--peach-dark);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.editor-word-preview strong {
  font-family: "Songti SC", "STSong", var(--display);
  font-size: 4.5rem;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 34px;
  padding: 48px 52px;
}

.field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.field-wide { grid-column: 1 / -1; }

.field > span {
  color: var(--tea-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.field > span b {
  margin-left: 6px;
  color: var(--peach-dark);
  font-size: 0.57rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(65, 57, 54, 0.26);
  border-radius: 0;
  background: transparent;
  color: var(--tea-ink);
  font: inherit;
  font-size: 0.91rem;
  line-height: 1.75;
}

.field input,
.field select {
  min-height: 48px;
  padding: 8px 3px;
}

.field textarea {
  min-height: 108px;
  padding: 12px 3px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--peach-dark);
  outline: 0;
  box-shadow: 0 1px 0 var(--peach-dark);
}

.markdown-help {
  grid-column: 1 / -1;
  margin: -18px 0 0;
  color: var(--tea-muted);
  font-size: 0.7rem;
}

.markdown-help strong { color: var(--bamboo-dark); }
.markdown-help code {
  padding: 2px 5px;
  background: var(--steamed-paper);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.tag-picker {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

.tag-picker legend {
  margin-bottom: 12px;
  color: var(--tea-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tag-picker > div { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-picker label { cursor: pointer; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker label span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--tea-muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.tag-picker input:checked + span {
  border-color: var(--bamboo-dark);
  background: rgba(155, 170, 150, 0.16);
  color: var(--bamboo-dark);
}
.tag-picker input:focus-visible + span { outline: 3px solid rgba(169, 87, 81, 0.35); }
.tag-picker > a {
  display: inline-block;
  margin-top: 12px;
  color: var(--peach-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

.admin-bar { overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--tea-ink); color: var(--rice-paper); }
.admin-bar-inner { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-bar-inner > div { display: flex; align-items: center; gap: 24px; }
.admin-bar span { color: var(--peach); font-family: var(--display); font-weight: 700; }
.admin-bar a,
.admin-bar button { color: inherit; font: inherit; font-size: 0.7rem; font-weight: 700; }
.admin-bar button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.mobile-admin-nav { display: none; }

.login-shell {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.72fr);
  gap: 90px;
  align-items: center;
  min-height: 650px;
  padding-block: 80px;
}
.login-note h1,
.taxonomy-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 500;
}
.login-note > p:last-child,
.taxonomy-heading > div > p:last-child { color: var(--tea-muted); }
.login-form { display: grid; gap: 24px; padding: 38px; border: 1px solid var(--line); background: #fffdf9; box-shadow: var(--shadow); }
.login-form h2 { margin: 0; font-family: var(--display); font-size: 1.25rem; }
.form-error { margin: 0; color: var(--peach-dark); font-size: 0.74rem; font-weight: 700; }

.taxonomy-shell { padding-block: 70px 130px; }
.taxonomy-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 56px; }
.taxonomy-heading .back-link { margin: 0; white-space: nowrap; }
.taxonomy-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 54px; align-items: start; }
.taxonomy-title { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--tea-ink); }
.taxonomy-title h2 { margin: 0; font-family: var(--display); font-size: 1.7rem; }
.taxonomy-title span { color: var(--tea-muted); font-size: 0.66rem; }
.taxonomy-row { position: relative; padding: 20px 0; border-bottom: 1px solid var(--line); }
.taxonomy-row > form:first-child,
.taxonomy-new { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.category-row > form:first-child,
.taxonomy-new:has(.wide) { grid-template-columns: 1fr 1fr; }
.taxonomy-row label,
.taxonomy-new label { color: var(--tea-muted); font-size: 0.62rem; font-weight: 700; }
.taxonomy-row input,
.taxonomy-new input { width: 100%; min-height: 38px; padding: 5px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--tea-ink); font: inherit; }
.taxonomy-row .wide,
.taxonomy-new .wide { grid-column: 1 / -1; }
.taxonomy-row > form:first-child > button { justify-self: end; }
.category-row > form:first-child > button { grid-column: 2; }
.taxonomy-delete { position: absolute; right: 0; top: 20px; }
.taxonomy-new { margin-top: 28px; padding: 24px; border: 1px dashed rgba(65,57,54,0.24); }
.taxonomy-new h3 { grid-column: 1 / -1; margin: 0; color: var(--bamboo-dark); font-size: 0.76rem; }
.taxonomy-new .secondary-button { min-height: 42px; padding: 7px 14px; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 24px 52px 34px;
  border-top: 1px solid var(--line);
}

.form-actions > a {
  color: var(--tea-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.example-editor {
  margin-top: 74px;
}

.example-editor .section-heading > span {
  color: var(--tea-muted);
  font-size: 0.75rem;
}

.example-admin-list {
  border-top: 1px solid var(--tea-ink);
}

.example-admin-row {
  display: grid;
  grid-template-columns: 40px 1fr 60px;
  gap: 22px;
  align-items: start;
  padding: 28px 10px;
  border-bottom: 1px solid var(--line);
}

.example-admin-row > span {
  color: var(--steamer-gold);
  font-family: Georgia, serif;
  font-size: 0.76rem;
  font-style: italic;
}

.example-admin-row strong {
  display: block;
  font-family: "Songti SC", "STSong", var(--display);
  font-size: 1.3rem;
  font-weight: 600;
}

.example-admin-row small {
  color: var(--peach-dark);
  font-size: 0.68rem;
}

.example-admin-row p {
  margin: 8px 0 0;
  color: var(--tea-muted);
  font-size: 0.82rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tea-muted);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.danger { color: var(--peach-dark); }

.example-add-form {
  margin-top: 36px;
  border: 1px solid var(--line);
  background: #fffdf9;
}

.example-add-form > p {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--bamboo-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.example-add-form .form-grid {
  padding-block: 34px;
}

.example-add-form > button {
  margin: 0 52px 34px;
}

.delete-zone {
  margin-top: 82px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--tea-muted);
  font-size: 0.74rem;
}

.delete-zone summary {
  width: fit-content;
  color: var(--peach-dark);
  font-weight: 700;
  cursor: pointer;
}

.delete-zone p { margin: 14px 0; }

.danger-button {
  padding: 9px 14px;
  border: 1px solid var(--peach-dark);
  background: transparent;
  color: var(--peach-dark);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--steamed-paper);
}

.footer-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 220px;
  padding-block: 54px;
}

.footer-inner p { margin: 0; }
.footer-inner strong { font-family: var(--display); letter-spacing: 0.08em; }
.footer-inner span,
.footer-note { color: var(--tea-muted); font-size: 0.76rem; }

@media (max-width: 820px) {
  .shell { width: min(100% - 32px, 680px); }
  .header-inner { min-height: 76px; }
  .site-header nav { gap: 16px; font-size: 0.72rem; }
  .brand small { display: none; }
  .daily-section { padding-block: 54px 70px; }
  .date-rail { margin-left: 12px; }
  .daily-card { padding: 32px 26px 46px; }
  .daily-grid { grid-template-columns: 1fr; gap: 0; }
  .word-face { min-height: 310px; }
  .word-note { padding: 24px 10px; }
  .concept-inner { grid-template-columns: 60px 1fr; min-height: 330px; }
  .steam-line { display: none; }
  .entry-card > a { grid-template-columns: 150px 1fr 24px; gap: 22px; }
  .archive-hero { grid-template-columns: 1fr; gap: 44px; }
  .archive-hero > .eyebrow { margin-bottom: -28px; }
  .archive-hero > h1,
  .search-form { grid-column: 1; }
  .entry-title { grid-template-columns: 1fr; gap: 48px; padding: 45px 32px; }
  .entry-title-note { text-align: center; }
  .entry-title-note .tags { justify-content: center; }
  .detail-grid { grid-template-columns: 1fr; gap: 44px; padding: 65px 20px; }
  .detail-grid aside { padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .examples-section { padding: 65px 20px 0; }
  .admin-row { grid-template-columns: 130px 1fr 80px; }
  .admin-row .edit-link { grid-column: 3; }
  .admin-row .status-stamp { grid-column: 3; grid-row: 1; }
  .editor-heading { grid-template-columns: 150px 1fr; padding: 36px 32px; }
  .form-grid { padding-inline: 32px; }
  .form-actions { padding-inline: 32px; }
  .example-add-form > button { margin-inline: 32px; }
  .login-shell { grid-template-columns: 1fr; gap: 38px; min-height: 0; }
  .taxonomy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 520px); }
  .brand strong { font-size: 0.92rem; }
  .bun-mark { width: 36px; height: 31px; }
  .site-header nav a:first-child { display: none; }
  .daily-section { padding-top: 38px; }
  .date-rail { gap: 9px; margin-left: 4px; font-size: 0.61rem; }
  .date-rail::before { width: 19px; }
  .daily-card { padding-inline: 18px; }
  .daily-grid { min-height: 0; }
  .word-face { min-height: 270px; }
  .word-face h1 { font-size: 5.7rem; }
  .word-note h2 { font-size: 1.55rem; }
  .concept-inner { grid-template-columns: 35px 1fr; gap: 14px; min-height: 310px; }
  .concept-mark { margin-top: 50px; font-size: 5rem; }
  .recent-section { padding-block: 74px 90px; }
  .section-heading { align-items: start; }
  .section-heading > a { margin-top: 9px; white-space: nowrap; }
  .entry-card > a { grid-template-columns: 1fr 22px; gap: 8px 14px; padding: 24px 8px; }
  .entry-card > a:hover { padding-left: 12px; }
  .entry-card-word { grid-column: 1; }
  .entry-card-copy { grid-column: 1; }
  .card-arrow { grid-column: 2; grid-row: 1 / 3; }
  .archive-hero { padding-block: 64px 54px; }
  .archive-hero > h1 { font-size: 2.65rem; }
  .search-form { padding: 20px; }
  .entry-detail { padding-block: 48px 90px; }
  .back-link { margin-bottom: 30px; }
  .entry-title { padding-inline: 18px; }
  .entry-title h1 { font-size: 5.4rem; }
  .example { grid-template-columns: 28px 1fr; gap: 12px; }
  .footer-inner { align-items: start; flex-direction: column; justify-content: center; gap: 28px; }
  .admin-hero { align-items: stretch; flex-direction: column; padding-block: 58px 44px; }
  .admin-hero .primary-button { align-self: flex-start; }
  .admin-search { grid-template-columns: 1fr; gap: 10px; padding-inline: 14px; }
  .admin-search > div { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr 72px; gap: 12px; padding-inline: 7px; }
  .admin-word,
  .admin-row-copy { grid-column: 1; }
  .admin-row .status-stamp { grid-column: 2; grid-row: 1; }
  .admin-row .edit-link { grid-column: 2; grid-row: 2; }
  .editor-shell { padding-block: 36px 90px; }
  .editor-heading { grid-template-columns: 1fr; background: rgba(255, 226, 220, 0.62); }
  .editor-word-preview { min-height: 110px; }
  .editor-word-preview strong { font-size: 4rem; }
  .form-grid { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px; }
  .field-wide { grid-column: 1; }
  .form-actions { padding: 22px 20px 28px; }
  .example-editor .section-heading { display: block; }
  .example-admin-row { grid-template-columns: 27px 1fr; gap: 12px; }
  .example-admin-row form { grid-column: 2; }
  .example-add-form > button { margin: 0 20px 28px; }
  .admin-bar-inner > div { gap: 13px; }
  .admin-bar span { display: none; }
  .login-shell { padding-block: 58px 80px; }
  .login-form { padding: 28px 22px; }
  .taxonomy-heading { display: block; }
  .taxonomy-heading .back-link { margin-top: 24px; }
  .taxonomy-row > form:first-child,
  .taxonomy-new,
  .category-row > form:first-child,
  .taxonomy-new:has(.wide) { grid-template-columns: 1fr; padding-right: 48px; }
  .taxonomy-row .wide,
  .taxonomy-new .wide,
  .category-row > form:first-child > button { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* 編集室 v2 — 既存の紙面感を保った管理機能の拡張 */
.browse-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 26px;
}
.browse-links span { margin-right: 4px; color: var(--tea-muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; }
.browse-links a { padding: 5px 10px; border: 1px solid var(--line); color: var(--tea-muted); font-size: .68rem; }
.browse-links a:hover { border-color: var(--peach-dark); color: var(--peach-dark); }
.tags a:focus-visible,
.browse-links a:focus-visible,
button:focus-visible,
a:focus-visible { outline: 3px solid rgba(169, 87, 81, .35); outline-offset: 3px; }
.aliases { margin: 15px 0 0; color: var(--tea-muted); font-size: .72rem; }
.usage-note { margin-top: 12px !important; padding-left: 12px; border-left: 2px solid var(--peach); color: var(--tea-muted); font-size: .76rem; }
.source-link { display: inline-block; margin-top: 10px; color: var(--peach-dark); font-size: .7rem; font-weight: 700; }
.sources-section { margin: 80px 45px 0; padding-top: 30px; border-top: 1px solid var(--tea-ink); }
.sources-section ol { padding-left: 22px; }
.sources-section li { padding: 10px 0; color: var(--tea-muted); font-size: .83rem; }
.sources-section li a { color: var(--peach-dark); font-weight: 700; }
.sources-section li small { color: var(--tea-muted); }
.sources-section li p { margin: 6px 0 0; }
.preview-banner { padding: 12px 24px; background: var(--tea-ink); color: var(--rice-paper); text-align: center; font-size: .74rem; }
.preview-banner a { margin-left: 10px; color: var(--peach); font-weight: 800; }

.pagination span { align-self: center; color: var(--tea-muted); font-size: .7rem; }
.form-help { margin-top: 20px !important; font-size: .72rem; }
.form-help a { color: var(--peach-dark); font-weight: 800; }
.bulk-form { display: grid; gap: 20px; }
.bulk-form .admin-row { grid-template-columns: 54px 180px minmax(240px, 1fr) 90px 110px; }
.bulk-check { display: grid; place-items: center; gap: 4px; color: var(--tea-muted); font-size: .58rem; }
.bulk-check input { width: 18px; height: 18px; accent-color: var(--peach-dark); }
.bulk-controls { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; padding: 22px; border: 1px dashed var(--line); background: rgba(255,255,255,.36); }
.bulk-controls label { display: grid; gap: 7px; color: var(--tea-muted); font-size: .66rem; font-weight: 700; }
.bulk-controls select { min-width: 190px; min-height: 42px; padding: 8px; border: 1px solid var(--line); background: #fffdf9; color: var(--tea-ink); }
.quality-page { padding-block: 70px 130px; }
.quality-grid,
.learning-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 38px 0 58px; }
.quality-grid a,
.learning-stats a { display: grid; gap: 4px; padding: 24px 18px; border: 1px solid var(--line); background: #fffdf9; }
.quality-grid strong,
.learning-stats strong { color: var(--peach-dark); font-family: var(--display); font-size: 2rem; font-weight: 500; }
.quality-grid span,
.learning-stats span { color: var(--tea-muted); font-size: .68rem; font-weight: 700; }

.user-bar { border-bottom: 1px solid var(--line); background: var(--steamed-paper); }
.user-bar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 48px; gap: 18px; }
.user-bar-inner > div { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.user-bar strong { color: var(--peach-dark); font-size: .72rem; }
.user-bar a,
.user-bar button { border: 0; background: transparent; color: var(--tea-muted); font: inherit; font-size: .66rem; cursor: pointer; }
.mobile-learning-nav,
.mobile-user-menu { display: none; }
.learn-shell { padding-block: 70px 120px; }
.learn-hero { max-width: 720px; }
.learn-hero h1 { margin: 6px 0 14px; font-family: var(--display); font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 500; }
.learn-hero > p:last-child { color: var(--tea-muted); line-height: 1.9; }
.learning-stats { grid-template-columns: repeat(6, 1fr); }
.personal-panel { margin: 80px 20px 0; padding: 38px; border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.personal-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.personal-actions form { display: flex; flex-wrap: wrap; gap: 8px; }
.personal-actions button { min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); background: #fffdf9; color: var(--tea-muted); cursor: pointer; }
.personal-state { color: var(--tea-muted); font-size: .72rem; }
.note-form { display: grid; gap: 10px; margin-top: 30px; }
.note-form label { color: var(--tea-muted); font-size: .7rem; font-weight: 800; }
.note-form textarea { min-height: 150px; padding: 15px; border: 1px solid var(--line); background: #fffdf9; font: .8rem/1.7 ui-monospace, "SFMono-Regular", Menlo, monospace; }
.note-form .primary-button { justify-self: start; }
.note-preview { margin-top: 26px; padding: 22px; border-top: 1px solid var(--line); background: var(--steamed-paper); }
.note-preview > :last-child { margin-bottom: 0; }
.personal-login-hint { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 75px 20px 0; padding: 24px 30px; border: 1px dashed var(--line); color: var(--tea-muted); font-size: .76rem; }
.personal-login-hint a { color: var(--peach-dark); font-weight: 800; }
.review-shell { max-width: 820px; padding-block: 70px 130px; }
.review-shell > h1 { font-family: var(--display); font-size: 4rem; font-weight: 500; }
.review-remaining { color: var(--tea-muted); font-size: .7rem; }
.review-card { padding: 55px; border: 1px solid var(--line); background: #fffdf9; box-shadow: var(--shadow); text-align: center; }
.review-card > h2 { margin: 10px 0 34px; font-family: var(--zh); font-size: clamp(4rem, 12vw, 7rem); font-weight: 500; }
.review-card details { padding-top: 24px; border-top: 1px solid var(--line); text-align: left; }
.review-card summary { color: var(--peach-dark); font-weight: 800; cursor: pointer; text-align: center; }
.review-card details h3 { margin-top: 32px; text-align: center; }
.review-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 38px; }
.review-actions button { display: grid; gap: 4px; padding: 14px 8px; border: 1px solid var(--line); background: var(--steamed-paper); color: var(--tea-ink); font: inherit; cursor: pointer; }
.review-actions small { color: var(--tea-muted); font-size: .6rem; }

.inline-error { margin: 0 0 24px; padding: 14px 18px; border-left: 3px solid var(--peach-dark); background: rgba(255, 226, 220, .42); color: var(--peach-dark); font-size: .78rem; }
.login-card { width: min(100%, 480px); margin: auto; padding: 44px; border: 1px solid var(--line); background: #fffdf9; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-family: var(--display); font-size: 3.2rem; font-weight: 500; }
.login-card > p:not(.eyebrow) { color: var(--tea-muted); }
.login-card form { display: grid; gap: 22px; margin-top: 34px; }
.login-card label { display: grid; gap: 8px; color: var(--tea-muted); font-size: .7rem; font-weight: 700; }
.login-card input { min-height: 46px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; }
.login-card .primary-button { justify-self: start; }
.editor-heading { grid-template-columns: 1fr auto; margin-bottom: 24px; padding: 0 0 24px; background: transparent; }
.editor-heading-actions { display: flex; gap: 12px; align-items: center; }
.editor-heading-actions .back-link { margin: 0; }
.editor-heading-actions .secondary-button { min-height: 42px; padding: 8px 15px; }
.entry-form fieldset { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); }
.entry-form legend { width: 100%; padding: 16px 52px; background: var(--steamed-paper); color: var(--bamboo-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.markdown-editor textarea { min-height: 360px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8rem; }
.excerpt-field textarea { min-height: 82px; }
.workflow-note { margin: -28px 52px 38px; color: var(--tea-muted); font-size: .7rem; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-checks label { cursor: pointer; }
.tag-checks input { position: absolute; opacity: 0; }
.tag-checks span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--tea-muted); font-size: .7rem; font-weight: 700; }
.tag-checks input:checked + span { border-color: var(--bamboo-dark); background: rgba(155, 170, 150, .16); color: var(--bamboo-dark); }
.tag-checks input:focus-visible + span { outline: 3px solid rgba(169, 87, 81, .35); }
.media-picker { padding: 18px; border: 1px dashed var(--line); }
.media-picker p { margin: 0 0 12px; color: var(--tea-muted); font-size: .7rem; font-weight: 700; }
.media-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.media-insert { padding: 6px 10px; border: 1px solid var(--line); background: transparent; color: var(--peach-dark); font: inherit; font-size: .66rem; cursor: pointer; }
.status-draft { color: var(--steamer-gold); }
.status-archived { color: var(--tea-muted); }
.status-stamp { width: auto; padding-inline: 8px; text-align: center; }

.example-edit-row { grid-template-columns: 36px 1fr 72px; }
.example-edit-row > form:first-of-type { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.example-edit-row .field { min-width: 0; }
.example-edit-row textarea { min-height: 72px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.row-actions button { border: 0; background: transparent; color: var(--peach-dark); cursor: pointer; }
.source-editor { margin-top: 82px; }
.source-admin-list { display: grid; gap: 20px; }
.source-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; padding: 28px; border: 1px solid var(--line); background: #fffdf9; }
.source-form .field-wide { grid-column: 1 / -1; }
.source-new { margin-top: 28px; border-style: dashed; }
.taxonomy-usage { display: flex; gap: 14px; justify-content: flex-end; align-items: center; margin-top: 10px; color: var(--tea-muted); font-size: .62rem; }
.taxonomy-usage details { position: relative; }
.taxonomy-usage summary { color: var(--peach-dark); cursor: pointer; }
.taxonomy-usage form { margin-top: 8px; }

.media-shell { padding-block: 70px 130px; }
.media-upload { display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; align-items: end; margin-bottom: 54px; padding: 28px; border: 1px dashed var(--line); background: rgba(255,255,255,.35); }
.media-upload label { display: grid; gap: 8px; color: var(--tea-muted); font-size: .68rem; font-weight: 700; }
.media-upload input { min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; }
.media-search { margin-bottom: 12px; }
.media-count { margin-bottom: 26px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.media-card { border: 1px solid var(--line); background: #fffdf9; }
.media-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--steamed-paper); }
.media-card > div { display: grid; gap: 8px; padding: 18px; }
.media-card strong { overflow-wrap: anywhere; font-size: .8rem; }
.media-card small { color: var(--tea-muted); font-size: .64rem; }
.media-card code { overflow-wrap: anywhere; padding: 8px; background: var(--steamed-paper); font-size: .6rem; }
.media-card summary { color: var(--peach-dark); font-size: .66rem; cursor: pointer; }

@media (max-width: 820px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-upload { grid-template-columns: 1fr; }
  .example-edit-row > form:first-of-type,
  .source-form { grid-template-columns: 1fr; }
  .source-form .field-wide { grid-column: 1; }
  .quality-grid { grid-template-columns: repeat(3, 1fr); }
  .learning-stats { grid-template-columns: repeat(3, 1fr); }
  .bulk-form .admin-row { grid-template-columns: 46px 130px 1fr 80px; }
  .bulk-form .admin-row .edit-link { grid-column: 4; }
  .bulk-form .admin-row .status-stamp { grid-column: 4; grid-row: 1; }
}

@media (max-width: 560px) {
  .browse-links span { flex-basis: 100%; margin-top: 6px; }
  .sources-section { margin-inline: 0; }
  .editor-heading { grid-template-columns: 1fr; }
  .editor-heading-actions { align-items: flex-start; flex-direction: column; }
  .entry-form legend { padding-inline: 20px; }
  .workflow-note { margin-inline: 20px; }
  .example-edit-row { grid-template-columns: 26px 1fr; }
  .example-edit-row .row-actions { grid-column: 2; }
  .media-grid { grid-template-columns: 1fr; }
  .login-card { padding: 30px 22px; }
  .quality-grid,
  .learning-stats { grid-template-columns: repeat(2, 1fr); }
  .bulk-controls { align-items: stretch; flex-direction: column; }
  .bulk-controls select { width: 100%; }
  .personal-panel { margin-inline: 0; padding: 26px 18px; }
  .personal-login-hint { align-items: flex-start; flex-direction: column; margin-inline: 0; }
  .user-bar-inner { align-items: flex-start; padding-block: 12px; }
  .review-card { padding: 34px 20px; }
  .review-actions { grid-template-columns: 1fr; }
  .bulk-form .admin-row { grid-template-columns: 40px 1fr 72px; }
  .bulk-form .admin-word,
  .bulk-form .admin-row-copy { grid-column: 2; }
  .bulk-form .admin-row .status-stamp { grid-column: 3; grid-row: 1; }
  .bulk-form .admin-row .edit-link { grid-column: 3; grid-row: 2; }
}

/* 学習の一頁・場面特集 */
.home-topic { padding-block: 90px 20px; }
.home-topic-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); overflow: hidden; border: 1px solid var(--line); background: #fffdf9; box-shadow: var(--shadow); }
.home-topic-card img { display: block; width: 100%; height: 100%; min-height: 370px; object-fit: cover; }
.home-topic-card > div { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.home-topic-card h3 { margin: 12px 0; font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; line-height: 1.35; }
.home-topic-card > div > p:not(.eyebrow) { color: var(--tea-muted); }
.home-topic-card span { margin-top: 28px; color: var(--peach-dark); font-size: .72rem; font-weight: 800; }
.topic-index-hero,
.topic-hero,
.today-shell,
.stats-shell,
.settings-shell,
.collections-shell,
.quiz-shell { padding-block: 72px 120px; }

.topic-index-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 48px; }
.topic-index-hero > .eyebrow,
.topic-index-hero > h1,
.topic-index-hero > p { grid-column: 1; margin-block: 0; }
.topic-index-hero > .primary-button { grid-column: 2; grid-row: 1 / 4; align-self: end; }
.topic-index-hero h1,
.topic-hero h1,
.today-hero h1,
.stats-shell h1,
.settings-shell h1,
.collections-shell h1,
.quiz-card h1 { margin: 6px 0 16px; font-family: var(--display); font-weight: 500; line-height: 1.18; }
.topic-index-hero h1,
.topic-hero h1 { font-size: clamp(3.5rem, 8vw, 6.8rem); }
.topic-index-hero > p,
.topic-subtitle,
.today-hero p,
.settings-shell > p { max-width: 680px; color: var(--tea-muted); }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding-bottom: 130px; }
.topic-tile { position: relative; min-height: 470px; overflow: hidden; border: 1px solid var(--line); background: #fffdf9; }
.topic-tile:nth-child(4n + 2),
.topic-tile:nth-child(4n + 3) { background: rgba(255, 226, 220, .36); }
.topic-tile > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }
.topic-tile > div { position: relative; min-height: 190px; padding: 26px 32px 58px; }
.topic-tile > div > span { position: absolute; right: 18px; top: -28px; color: rgba(169, 87, 81, .1); font-family: var(--display); font-size: 7rem; line-height: 1; }
.topic-tile h2 { position: relative; max-width: 360px; margin: 12px 0 6px; font-family: var(--display); font-size: 1.65rem; font-weight: 500; }
.topic-tile > div > p:not(.eyebrow) { position: relative; margin: 0; color: var(--tea-muted); }
.topic-tile a { position: absolute; left: 32px; bottom: 22px; color: var(--peach-dark); font-size: .72rem; font-weight: 800; }
.topic-hero { max-width: 920px; text-align: center; }
.topic-hero .back-link { display: block; text-align: left; }
.topic-subtitle { margin-inline: auto; font-family: var(--display); font-size: 1.25rem; }
.topic-cover { width: min(100%, 960px); margin: 42px auto 28px; overflow: hidden; border: 1px solid var(--line); background: var(--steamed-paper); box-shadow: var(--shadow); }
.topic-cover img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.topic-intro { max-width: 700px; margin: 35px auto 22px; padding: 28px; border-block: 1px solid var(--line); }
.topic-hero > span { color: var(--peach-dark); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }

.today-hero { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 45px; }
.today-hero h1 { font-size: clamp(3.4rem, 8vw, 6rem); }
.learn-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.settings-accent { display: inline-flex; align-items: center; min-height: 46px; padding: 9px 18px; border: 1px solid rgba(169,87,81,.28); background: rgba(255,226,220,.72); color: var(--peach-dark); font-size: .68rem; font-weight: 800; box-shadow: inset 4px 0 0 var(--peach); }
.settings-accent:hover { border-color: rgba(169,87,81,.46); background: var(--peach-pale); }
.today-hero .settings-accent { margin-top: 18px; }
.streak-seal { display: grid; place-items: center; align-content: center; width: 126px; height: 126px; border: 1px solid var(--peach-dark); border-radius: 50%; color: var(--peach-dark); transform: rotate(3deg); }
.streak-seal strong { font-family: var(--display); font-size: 2.8rem; font-weight: 500; line-height: 1; }
.streak-seal span { font-size: .65rem; font-weight: 800; }
.study-progress { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin: 45px 0 22px; }
.study-progress > div { height: 7px; overflow: hidden; border-radius: 99px; background: var(--steamed-paper); }
.study-progress > div span { display: block; height: 100%; border-radius: inherit; background: var(--peach-dark); }
.study-progress p { margin: 0; color: var(--tea-muted); font-size: .68rem; font-weight: 800; }
.daily-plan { display: grid; gap: 12px; }
.daily-task { display: grid; grid-template-columns: 58px minmax(220px, 1fr) minmax(300px, auto); gap: 25px; align-items: center; padding: 26px 30px; border: 1px solid var(--line); background: #fffdf9; }
.daily-task.is-complete { opacity: .58; background: var(--steamed-paper); }
.task-order { color: var(--peach); font-family: var(--display); font-size: 1.8rem; }
.task-word > span { color: var(--bamboo-dark); font-size: .6rem; font-weight: 800; letter-spacing: .1em; }
.task-word h2 { display: inline; margin: 0 14px 0 0; font-family: var(--display); font-size: 2rem; font-weight: 500; }
.task-word > p { display: inline; color: var(--tea-muted); font-size: .72rem; }
.task-word small { display: block; color: var(--tea-muted); font-size: .62rem; }
.task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.task-actions a:not(.primary-button):not(.secondary-button),
.today-settings-link a { color: var(--peach-dark); font-size: .66rem; font-weight: 800; }
.task-actions form { margin: 0; }
.task-actions button { min-height: 38px; padding: 7px 12px; }
.today-settings-link { margin-top: 28px; text-align: right; }
.quiz-feedback { margin: 32px 0 -14px; padding: 18px 22px; border-left: 3px solid var(--bamboo-dark); background: rgba(155,170,150,.13); }
.quiz-feedback.again { border-color: var(--peach-dark); background: rgba(255,226,220,.38); }

.settings-shell { max-width: 820px; }
.settings-shell h1 { font-size: clamp(3rem, 7vw, 5rem); }
.settings-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 45px; }
.settings-form label { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--line); background: #fffdf9; color: var(--tea-muted); font-size: .68rem; font-weight: 800; }
.settings-form input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--peach-dark); font-family: var(--display); font-size: 2.5rem; }
.settings-form label span { font-size: .58rem; font-weight: 500; }
.settings-form button { grid-column: 1 / -1; justify-self: start; }
.settings-form.is-colorful { gap: 14px; }
.settings-form.is-colorful label { min-height: 220px; align-content: space-between; border-width: 1px 1px 5px; color: var(--tea-ink); box-shadow: 0 16px 34px rgba(91,65,54,.08); }
.settings-form.is-colorful label > strong { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.settings-form.is-colorful input { min-height: 82px; padding-inline: 10px; border: 1px solid rgba(65,57,54,.16); background: rgba(255,255,255,.58); text-align: center; }
.settings-form .setting-new { border-bottom-color: var(--peach-dark); background: #ffd7d1; }
.settings-form .setting-review { border-bottom-color: var(--bamboo-dark); background: #d9e6d5; }
.settings-form .setting-weak { border-bottom-color: #b0781d; background: #ffe2a2; }

.stats-wide { grid-template-columns: repeat(5, 1fr); }
.learning-stats > div { display: grid; gap: 4px; padding: 24px 18px; border: 1px solid var(--line); background: #fffdf9; }
.learning-map-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.learning-map-links a { display: grid; gap: 12px; min-height: 150px; padding: 28px; border-top: 2px solid var(--tea-ink); background: rgba(255,255,255,.32); }
.learning-map-links strong { font-family: var(--display); font-size: 1.25rem; font-weight: 500; }
.learning-map-links span { align-self: end; color: var(--peach-dark); font-size: .68rem; font-weight: 800; }
.learning-map-links.compact { margin: -28px 0 60px; }

.collections-shell .taxonomy-heading { align-items: end; }
.collections-shell .taxonomy-heading form { display: flex; align-items: end; gap: 12px; }
.collections-shell .taxonomy-heading label { display: grid; gap: 7px; color: var(--tea-muted); font-size: .68rem; font-weight: 800; }
.collections-shell .taxonomy-heading input { min-width: 280px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; }
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.collection-grid article { min-height: 210px; padding: 28px; border: 1px solid var(--line); background: #fffdf9; }
.collection-grid h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 500; }
.collection-grid article > p:not(.eyebrow) { color: var(--tea-muted); font-size: .68rem; }
.collection-grid article > div { display: flex; justify-content: space-between; margin-top: 38px; }
.collection-grid a { color: var(--peach-dark); font-size: .7rem; font-weight: 800; }
.collection-entry,
.history-item { position: relative; }
.collection-entry > form,
.history-item > label { position: absolute; z-index: 2; right: 18px; top: 14px; }
.history-item > label { color: var(--tea-muted); font-size: .62rem; }
.history-item input { accent-color: var(--peach-dark); }
.history-delete { margin-top: 22px; }
.history-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.history-filter input,
.history-filter select { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); background: #fffdf9; color: var(--tea-ink); font: inherit; }
.history-filter input { flex: 1 1 260px; }
.history-filter button { min-height: 42px; padding: 8px 18px; border: 0; background: var(--tea-ink); color: var(--rice-paper); font: inherit; cursor: pointer; }
.collection-add-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.collection-add-form label { display: grid; gap: 5px; color: var(--tea-muted); font-size: .68rem; font-weight: 800; }
.collection-add-form select { min-width: 240px; min-height: 40px; border: 1px solid var(--line); background: #fffdf9; }
.related-entries { margin-top: 90px; padding-top: 40px; border-top: 1px solid var(--line); }

.quiz-shell { max-width: 880px; }
.quiz-mode-tabs { display: flex; justify-content: center; gap: 8px; margin: 22px 0; }
.quiz-mode-tabs a { padding: 6px 14px; border: 1px solid var(--line); color: var(--tea-muted); font-size: .65rem; font-weight: 800; }
.quiz-card { padding: 55px; border: 1px solid var(--line); background: #fffdf9; box-shadow: var(--shadow); text-align: center; }
.quiz-card h1 { font-size: clamp(4rem, 11vw, 7rem); }
.quiz-prompt { color: var(--tea-muted); font-family: var(--display); font-size: 1.2rem; }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 38px; }
.quiz-options button { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; min-height: 74px; padding: 12px 18px; border: 1px solid var(--line); background: var(--steamed-paper); color: var(--tea-ink); font: inherit; text-align: left; cursor: pointer; }
.quiz-options button:hover { border-color: var(--peach-dark); background: var(--peach-pale); }
.quiz-options button span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--peach); border-radius: 50%; color: var(--peach-dark); font-size: .65rem; font-weight: 800; }
.truth-meaning { margin: 38px 0; padding: 26px; border-block: 1px solid var(--line); font-family: var(--display); font-size: 1.45rem; }
.truth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.truth-actions button { padding: 18px; border: 1px solid var(--line); background: var(--steamed-paper); color: var(--tea-ink); font: inherit; cursor: pointer; }
.cloze-sentence { margin: 40px 0; font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.7rem); }
.cloze-sentence mark { padding: 0 .2em; background: var(--peach-pale); color: var(--peach-dark); }

.topics-admin { padding-block: 70px 130px; }
.new-topic-panel,
.admin-topic-item { margin-top: 18px; border: 1px solid var(--line); background: #fffdf9; }
.new-topic-panel > summary,
.admin-topic-item > summary { display: flex; gap: 18px; align-items: center; padding: 20px 24px; cursor: pointer; }
.admin-topic-item > summary span { color: var(--peach-dark); font-family: var(--display); font-size: 1.4rem; }
.admin-topic-item > summary small { margin-left: auto; color: var(--tea-muted); }
.topic-admin-form { border-top: 1px solid var(--line); }
.topic-admin-form textarea { min-height: 120px; }
.topic-admin-form .form-actions { display: flex; gap: 10px; }

/* 利用者台帳 */
.member-directory-hero,
.member-record-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .56fr);
  gap: 58px;
  align-items: end;
  padding-block: 68px 50px;
}

.member-directory-hero h1,
.member-record-hero h1 {
  margin: 7px 0 12px;
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  font-weight: 500;
  line-height: 1.08;
}

.member-directory-hero > div > p:last-child,
.member-record-hero > div > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--tea-muted);
}

.member-create {
  border: 1px solid var(--line);
  background: #fffdf9;
}

.member-create summary {
  padding: 18px 22px;
  color: var(--peach-dark);
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.member-create form {
  display: grid;
  gap: 14px;
  padding: 4px 22px 24px;
  border-top: 1px solid var(--line);
}

.member-create label,
.member-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--tea-muted);
  font-size: .65rem;
  font-weight: 800;
}

.member-create input,
.member-create select,
.member-edit-form input,
.member-edit-form select {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--rice-paper);
  color: var(--tea-ink);
  font: inherit;
}

.member-directory { padding-bottom: 130px; }
.member-directory-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr 250px 110px;
  gap: 24px;
  padding: 12px 18px;
  border-block: 1px solid var(--tea-ink);
  color: var(--tea-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .09em;
}
.member-directory-head span:nth-child(2) { grid-column: 2; }
.member-directory-head span:nth-child(3) { grid-column: 3; }

.member-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 250px 110px;
  gap: 24px;
  align-items: center;
  min-height: 136px;
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
}

.member-identity { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.member-number { color: var(--peach-dark); font-family: var(--display); font-size: .73rem; }
.member-identity h2 { margin: -5px 0 2px; font-family: var(--display); font-size: 1.55rem; font-weight: 500; overflow-wrap: anywhere; }
.member-identity h2 small,
.member-record-hero h1 small { display: inline-block; color: var(--bamboo-dark); font-family: var(--body); font-size: .55rem; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.member-identity p { margin: 0; color: var(--tea-muted); font-size: .61rem; }
.member-identity code,
.password-display code { color: var(--peach-dark); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; overflow-wrap: anywhere; }

.member-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.member-mini-stats span { color: var(--tea-muted); font-size: .61rem; white-space: nowrap; }
.member-mini-stats strong { color: var(--tea-ink); font-family: var(--display); font-size: 1rem; font-weight: 500; }
.member-last-seen { display: grid; gap: 2px; }
.member-last-seen strong { font-size: .68rem; font-weight: 700; }
.member-last-seen span { color: var(--tea-muted); font-size: .58rem; }

.member-record-hero { align-items: center; }
.member-record-hero .back-link { display: inline-block; margin-bottom: 22px; }
.member-today-seal {
  justify-self: end;
  display: grid;
  place-items: center;
  align-content: center;
  width: 176px;
  height: 176px;
  border: 1px solid var(--peach-dark);
  border-radius: 50%;
  color: var(--peach-dark);
  transform: rotate(2deg);
}
.member-today-seal span,
.member-today-seal small { font-size: .62rem; font-weight: 800; }
.member-today-seal strong { margin-block: 4px; font-family: var(--display); font-size: 2.5rem; font-weight: 500; line-height: 1; }

.member-record { padding-bottom: 130px; }
.member-stat-index {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  border-block: 1px solid var(--tea-ink);
}
.member-stat-index > * {
  display: grid;
  gap: 1px;
  padding: 17px 12px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 249, .45);
}
.member-stat-index > *:last-child { border-right: 0; }
.member-stat-index strong { color: var(--peach-dark); font-family: var(--display); font-size: 1.75rem; font-weight: 500; line-height: 1; }
.member-stat-index span { color: var(--tea-muted); font-size: .57rem; font-weight: 800; }

.member-view-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 42px 0 24px; border-bottom: 1px solid var(--line); }
.member-view-tabs a { padding: 9px 14px; color: var(--tea-muted); font-size: .65rem; font-weight: 800; }
.member-view-tabs a.is-active { margin-bottom: -1px; border-bottom: 2px solid var(--peach-dark); color: var(--peach-dark); }
.member-view-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.member-view-heading p,
.member-view-heading h2 { margin: 0; }
.member-view-heading h2,
.collection-ledger h2,
.member-admin-panels h2 { font-family: var(--display); font-size: 1.55rem; font-weight: 500; }
.member-view-heading > span { color: var(--tea-muted); font-size: .62rem; font-weight: 800; }

.member-overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 50px; }
.activity-list { position: relative; padding-left: 28px; }
.activity-list::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 10px; width: 1px; background: var(--peach); }
.activity-list article { position: relative; display: grid; grid-template-columns: 138px 1fr; gap: 18px; min-height: 92px; padding: 12px 0 20px; border-bottom: 1px solid var(--line); }
.activity-dot { position: absolute; left: -27px; top: 19px; width: 11px; height: 11px; border: 2px solid var(--rice-paper); border-radius: 50%; background: var(--peach-dark); box-shadow: 0 0 0 1px var(--peach-dark); }
.activity-list time { color: var(--tea-muted); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .59rem; }
.activity-list small { color: var(--bamboo-dark); font-size: .58rem; font-weight: 800; letter-spacing: .08em; }
.activity-list h3 { margin: 1px 0; font-family: var(--display); font-size: 1.16rem; font-weight: 500; }
.activity-list p { margin: 0; color: var(--tea-muted); font-size: .65rem; }

.collection-ledger { padding: 24px 26px; border: 1px solid var(--line); background: rgba(255, 226, 220, .18); align-self: start; }
.collection-ledger h2 { margin: 5px 0 18px; }
.collection-ledger article { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.collection-ledger article > div { display: grid; }
.collection-ledger article strong { font-family: var(--display); font-weight: 500; }
.collection-ledger article span,
.muted-copy { color: var(--tea-muted); font-size: .61rem; }

.member-entry-list { border-top: 1px solid var(--tea-ink); }
.member-entry-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 190px; gap: 30px; align-items: center; min-height: 132px; padding: 22px 18px; border-bottom: 1px solid var(--line); }
.member-entry-word { display: flex; gap: 11px; align-items: baseline; }
.member-entry-word strong { font-family: "Songti SC", "STSong", var(--display); font-size: 2.15rem; font-weight: 500; }
.member-entry-word span,
.member-entry-row p { color: var(--tea-muted); font-size: .64rem; }
.member-entry-row h3 { margin: 0; font-family: var(--display); font-size: 1rem; font-weight: 500; }
.member-entry-row p { max-width: 620px; margin: 3px 0 0; white-space: pre-wrap; }
.member-entry-actions { display: grid; justify-items: end; gap: 3px; }
.member-entry-actions a,
.member-entry-actions button { color: var(--peach-dark); font-size: .61rem; font-weight: 800; }

.member-admin-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 70px; }
.member-admin-panels > section { padding: 28px; border: 1px solid var(--line); background: #fffdf9; }
.member-admin-panels h2 { margin: 4px 0 18px; }
.password-display { display: grid; gap: 4px; margin-bottom: 22px; padding: 13px 15px; border-left: 3px solid var(--peach); background: var(--steamed-paper); }
.password-display span { color: var(--tea-muted); font-size: .58rem; font-weight: 800; }
.member-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.member-edit-form .form-help,
.member-edit-form button { grid-column: 1 / -1; }
.compact-fields { grid-template-columns: repeat(3, 1fr); }
.compact-fields .form-help { grid-column: 1 / -1; }

.member-data-tools { margin-top: 22px; border: 1px solid var(--line); background: rgba(255, 253, 249, .56); }
.member-data-tools > summary { padding: 18px 22px; color: var(--tea-muted); font-size: .68rem; font-weight: 800; cursor: pointer; }
.member-data-tools > div { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.member-data-tools form,
.member-delete-account { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.member-data-tools form:nth-child(odd) { border-right: 1px solid var(--line); }
.member-data-tools form > div,
.member-delete-account > div { display: grid; }
.member-data-tools strong,
.member-delete-account strong { font-family: var(--display); font-size: .95rem; font-weight: 500; }
.member-data-tools span,
.member-delete-account span { color: var(--tea-muted); font-size: .58rem; }
.member-delete-account { margin-top: 22px; border: 1px solid rgba(169,87,81,.3); background: rgba(255,226,220,.18); }

.login-history-shell { padding-block: 70px 130px; }
.login-history-hero { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 38px; }
.login-history-hero h1 { margin: 6px 0 12px; font-family: var(--display); font-size: clamp(3rem, 7vw, 5rem); font-weight: 500; line-height: 1.1; }
.login-history-hero p { max-width: 700px; margin: 0; color: var(--tea-muted); }
.login-history-head { padding: 11px 16px; border-block: 1px solid var(--tea-ink); color: var(--tea-muted); font-size: .63rem; font-weight: 800; }
.login-history-head a { color: var(--peach-dark); }
.login-history-list article { display: grid; grid-template-columns: 170px minmax(180px, 1fr) 210px 70px 52px; gap: 22px; align-items: center; min-height: 84px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.login-history-list time,
.login-history-list code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .63rem; }
.login-history-list time { color: var(--tea-muted); }
.login-person { display: grid; }
.login-person strong { font-family: var(--display); font-size: 1rem; font-weight: 500; }
.login-person span { color: var(--tea-muted); font-size: .57rem; }
.login-result { display: inline-grid; place-items: center; min-height: 28px; border: 1px solid currentColor; font-size: .58rem; font-weight: 800; }
.login-result.is-success { color: var(--bamboo-dark); }
.login-result.is-failed { color: var(--peach-dark); }
.member-login-preview { margin-top: 64px; padding-top: 30px; border-top: 1px solid var(--tea-ink); }
.member-login-preview .member-view-heading > a { color: var(--peach-dark); font-size: .65rem; font-weight: 800; }

@media (max-width: 820px) {
  .home-topic-card { grid-template-columns: 1fr; }
  .home-topic-card img { min-height: 0; aspect-ratio: 3 / 2; }
  .topic-index-hero { grid-template-columns: 1fr; }
  .topic-index-hero > .primary-button { grid-column: 1; grid-row: auto; justify-self: start; }
  .daily-task { grid-template-columns: 42px 1fr; }
  .task-actions { grid-column: 2; justify-content: flex-start; }
  .settings-form,
  .collection-grid,
  .learning-map-links { grid-template-columns: 1fr; }
  .stats-wide { grid-template-columns: repeat(3, 1fr); }
  .collections-shell .taxonomy-heading form { margin-top: 26px; }
  .member-directory-hero,
  .member-record-hero,
  .member-overview { grid-template-columns: 1fr; }
  .member-today-seal { justify-self: start; width: 132px; height: 132px; }
  .member-directory-head { display: none; }
  .member-row { grid-template-columns: 1fr 1fr; }
  .member-row .edit-link { text-align: left; }
  .member-stat-index { grid-template-columns: repeat(5, 1fr); }
  .member-stat-index > *:nth-child(5) { border-right: 0; }
  .member-stat-index > *:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
  .member-entry-row { grid-template-columns: 150px 1fr; }
  .member-entry-actions { grid-column: 2; justify-items: start; }
  .member-admin-panels { grid-template-columns: 1fr; }
  .login-history-list article { grid-template-columns: 140px 1fr 180px 62px; }
  .login-history-list article form { grid-column: 4; }
}

@media (max-width: 560px) {
  .topic-grid,
  .quiz-options { grid-template-columns: 1fr; }
  .topic-tile { min-height: 430px; }
  .today-hero { grid-template-columns: 1fr; }
  .streak-seal { width: 100px; height: 100px; }
  .daily-task { grid-template-columns: 1fr; padding: 22px 18px; }
  .task-order { display: none; }
  .task-actions { grid-column: 1; }
  .quiz-card { padding: 34px 18px; }
  .truth-actions { grid-template-columns: 1fr; }
  .stats-wide { grid-template-columns: repeat(2, 1fr); }
  .collections-shell .taxonomy-heading form { align-items: stretch; flex-direction: column; }
  .collections-shell .taxonomy-heading input { min-width: 0; width: 100%; }
  .member-directory-hero,
  .member-record-hero { padding-block: 48px 36px; }
  .member-directory-hero h1,
  .member-record-hero h1 { font-size: 3rem; }
  .member-row { grid-template-columns: 1fr; gap: 14px; padding-inline: 6px; }
  .member-mini-stats { max-width: 300px; }
  .member-stat-index { grid-template-columns: repeat(2, 1fr); }
  .member-stat-index > *:nth-child(5) { border-right: 1px solid var(--line); }
  .member-stat-index > *:nth-child(2n) { border-right: 0; }
  .member-stat-index > *:nth-child(-n+8) { border-bottom: 1px solid var(--line); }
  .activity-list article { grid-template-columns: 1fr; gap: 2px; }
  .member-entry-row { grid-template-columns: 1fr; padding-inline: 6px; }
  .member-entry-actions { grid-column: 1; justify-items: start; }
  .member-edit-form,
  .compact-fields,
  .member-data-tools > div { grid-template-columns: 1fr; }
  .member-data-tools form:nth-child(odd) { border-right: 0; }
  .member-delete-account { align-items: flex-start; flex-direction: column; }
  .login-history-hero { align-items: flex-start; flex-direction: column; }
  .login-history-list article { grid-template-columns: 1fr auto; gap: 4px 16px; padding-inline: 6px; }
  .login-history-list article time,
  .login-history-list article .login-person,
  .login-history-list article code { grid-column: 1; }
  .login-history-list article .login-result,
  .login-history-list article form { grid-column: 2; }
  .login-history-list article .login-result { grid-row: 1 / 3; min-width: 58px; }
}

/* Mobile reading rhythm — compact, bounded and touch friendly */
@media (max-width: 700px) {
  html,
  body { max-width: 100%; }
  body { min-width: 0; }
  main,
  .shell,
  .header-inner > *,
  .user-bar-inner > *,
  .entry-card-copy,
  .task-word { min-width: 0; }
  img,
  video,
  svg { max-width: 100%; height: auto; }
  a,
  button { touch-action: manipulation; }
  .shell { width: min(100% - 32px, 560px); }

  .site-header { background: rgba(255,250,243,.98); }
  .header-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    padding-top: 24px;
  }
  .brand { justify-self: start; gap: 10px; }
  .brand strong { font-size: .96rem; }
  .brand small { display: none; }
  .bun-mark { width: 34px; height: 30px; }
  .site-header nav {
    display: flex;
    width: 100%;
    gap: 0;
    border-top: 1px solid var(--line);
    font-size: .69rem;
    letter-spacing: 0;
  }
  .site-header nav a,
  .site-header nav a:first-child {
    display: grid;
    place-items: center;
    min-width: 0;
    width: 25%;
    flex: 1 1 25%;
    min-height: 44px;
    padding: 7px 2px;
    white-space: nowrap;
  }
  .site-header nav a::after { bottom: 0; }

  .user-bar-inner {
    position: relative;
    display: block;
    min-height: 0;
    padding-block: 0;
  }
  .user-bar-inner > .user-bar-links,
  .user-bar-inner > .desktop-logout { display: none; }
  .mobile-learning-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .mobile-user-menu { display: block; position: static; }
  .mobile-learning-nav > a,
  .mobile-user-menu summary {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 46px;
    padding: 7px 2px;
    border-left: 1px solid rgba(65,57,54,.08);
    color: var(--tea-muted);
    font-size: .64rem;
    font-weight: 800;
    line-height: 1.2;
    list-style: none;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
  }
  .mobile-learning-nav > a:first-child { border-left: 0; }
  .mobile-user-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--peach-dark);
  }
  .mobile-user-menu summary::-webkit-details-marker { display: none; }
  .mobile-user-menu summary::after { content: "＋"; margin-left: 3px; font-size: .66rem; }
  .mobile-user-menu[open] summary::after { content: "−"; }
  .mobile-user-menu-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--rice-paper);
    box-shadow: 0 18px 38px rgba(91,65,54,.16);
  }
  .mobile-user-menu a {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 44px;
    padding: 7px;
    border: 1px solid rgba(65,57,54,.1);
    background: #fffdf9;
    font-size: .7rem;
    line-height: 1.3;
    text-align: center;
  }
  .mobile-user-account {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 3px 0;
    color: var(--tea-muted);
    font-size: .66rem;
  }
  .mobile-user-account span { min-width: 0; overflow-wrap: anywhere; }
  .mobile-user-account form { flex: 0 0 auto; }
  .mobile-user-account button { min-height: 36px; padding: 5px 7px; color: var(--peach-dark); font-size: .66rem; }

  .primary-button,
  .secondary-button {
    min-height: 46px;
    padding: 9px 16px;
    font-size: .74rem;
    letter-spacing: .035em;
  }
  .eyebrow,
  .meaning-label { margin-bottom: 8px; font-size: .64rem; letter-spacing: .12em; }
  .empty-card,
  .error-page { padding: 32px 18px; }

  .daily-section { padding-block: 34px 54px; }
  .date-rail { gap: 8px; margin: 0 0 14px; font-size: .62rem; letter-spacing: .08em; }
  .date-rail::before { width: 20px; }
  .daily-card { padding: 24px 16px 30px; }
  .daily-card::before { left: 7px; right: -6px; top: 8px; bottom: -8px; }
  .daily-kicker { flex-wrap: wrap; gap: 7px; font-size: .64rem; letter-spacing: .08em; }
  .daily-grid { gap: 0; min-height: 0; }
  .word-face { min-height: 218px; }
  .word-face::before { width: min(210px, 82%); }
  .word-face h1.word-short { font-size: clamp(4rem, 23vw, 4.8rem); }
  .word-face h1.word-medium { font-size: clamp(2.7rem, 15vw, 3.2rem); }
  .word-face h1.word-long { font-size: clamp(1.9rem, 10vw, 2.25rem); }
  .word-face h1.word-very-long { font-size: clamp(1.45rem, 7.5vw, 1.75rem); }
  .pinyin { font-size: .76rem; letter-spacing: .1em; text-align: center; overflow-wrap: anywhere; }
  .traditional { margin-top: 13px; }
  .word-note { max-width: none; padding: 12px 0 0; }
  .word-note h2 { font-size: 1.48rem; line-height: 1.5; text-wrap: pretty; }
  .summary { margin-top: 14px; font-size: .88rem; line-height: 1.75; }
  .tags { margin-top: 17px; }
  .tag { font-size: .65rem; }
  .read-more { gap: 14px; margin-top: 24px; font-size: .76rem; }
  .paper-fold { width: 34px; height: 34px; }

  .concept-inner {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding-block: 42px;
  }
  .concept-mark { align-self: start; margin: -4px 0 0; font-size: 3.5rem; }
  .concept-inner h2 { font-size: 1.72rem; line-height: 1.45; }
  .concept-inner div > p { margin-top: 14px; font-size: .88rem; line-height: 1.75; }

  .home-topic { padding-block: 54px 8px; }
  .home-topic-card img { aspect-ratio: 16 / 10; }
  .home-topic-card > div { padding: 22px 20px 24px; }
  .home-topic-card h3 { margin: 8px 0; font-size: 1.85rem; }
  .home-topic-card > div > p:not(.eyebrow) { margin-block: 5px; font-size: .86rem; }
  .home-topic-card span { margin-top: 18px; font-size: .7rem; }
  .recent-section { padding-block: 58px 72px; }
  .section-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-bottom: 22px; }
  .section-heading h2 { font-size: 1.65rem; line-height: 1.35; }
  .section-heading > a { align-self: end; margin: 0; font-size: .68rem; white-space: nowrap; }

  .entry-card > a {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 7px 10px;
    min-height: 0;
    padding: 20px 4px;
  }
  .entry-card > a:hover { padding-left: 4px; }
  .entry-card-word { grid-column: 1; flex-wrap: wrap; gap: 7px 11px; min-width: 0; }
  .entry-card-word > span { max-width: 100%; font-size: 2.25rem; overflow-wrap: anywhere; }
  .entry-card-word small { max-width: 100%; font-size: .68rem; overflow-wrap: anywhere; }
  .entry-card-copy { grid-column: 1; }
  .entry-card-copy h3 { font-size: 1.08rem; line-height: 1.5; overflow-wrap: anywhere; }
  .entry-card-copy > .summary { margin-top: 5px; font-size: .78rem; }
  .entry-card-copy .tags { margin-top: 10px; }
  .card-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 1rem; }

  .archive-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-block: 42px 34px;
  }
  .archive-hero > .eyebrow { margin: 0; }
  .archive-hero > h1 { font-size: 2.35rem; line-height: 1.3; overflow-wrap: anywhere; }
  .archive-hero > p { margin: 0; color: var(--tea-muted); font-size: .86rem; }
  .search-form { padding: 18px; }
  .archive-list { padding-block: 22px 72px; }
  .result-line { font-size: .72rem; }
  .pagination { gap: 8px; }
  .pagination a { min-height: 44px; padding: 9px 13px; }

  .entry-detail { padding-block: 40px 74px; }
  .back-link { margin-bottom: 26px; }
  .entry-title { gap: 34px; padding: 36px 16px 30px; }
  .entry-title > div:first-child::before { width: 180px; }
  .entry-title h1.word-short { font-size: 4.4rem; }
  .entry-title h1.word-medium { font-size: 3rem; }
  .entry-title h1.word-long { font-size: 2.15rem; }
  .entry-title h1.word-very-long { font-size: 1.6rem; }
  .entry-title-note h2 { font-size: 1.45rem; }
  .detail-grid { gap: 34px; padding: 48px 4px; }
  .detail-copy { font-size: 1.18rem; }
  .examples-section { padding: 52px 4px 0; }
  .example { gap: 9px; padding-block: 25px; }
  .example-zh { font-size: 1.3rem; }

  .learn-shell,
  .today-shell,
  .stats-shell,
  .settings-shell,
  .collections-shell,
  .quiz-shell,
  .review-shell { padding-block: 34px 62px; }
  .learn-hero h1,
  .stats-shell .learn-hero h1 { font-size: 2.35rem; line-height: 1.3; text-wrap: pretty; }
  .learn-hero > p { margin-block: 10px 0; font-size: .88rem; }
  .learn-hero-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 22px; }
  .learn-hero-actions > * { width: 100%; justify-content: center; }
  .settings-accent { min-height: 44px; justify-content: center; padding: 8px 14px; font-size: .72rem; }
  .learning-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 28px 0 38px;
  }
  .learning-stats > a,
  .learning-stats > div { min-height: 82px; padding: 14px 12px; }
  .learning-stats strong { font-size: 1.55rem; }
  .learning-stats span { font-size: .68rem; line-height: 1.4; }
  .learning-stats > *:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .learning-map-links,
  .learning-map-links.compact { gap: 8px; margin: 0 0 46px; }
  .learning-map-links a { min-height: 0; gap: 6px; padding: 17px 18px; }
  .learning-map-links strong { font-size: 1.08rem; }
  .learning-map-links span { font-size: .66rem; }

  .today-hero { grid-template-columns: 1fr; gap: 22px; }
  .today-hero h1 { font-size: 2.55rem; }
  .today-hero p { margin-bottom: 0; font-size: .88rem; }
  .today-hero .settings-accent { margin-top: 16px; }
  .streak-seal { width: 86px; height: 86px; }
  .streak-seal strong { font-size: 2.1rem; }
  .study-progress { gap: 10px; margin: 28px 0 18px; }
  .daily-plan { gap: 9px; }
  .daily-task { grid-template-columns: 1fr; gap: 14px; padding: 19px 16px; }
  .task-order { display: none; }
  .task-word h2 { display: block; margin: 2px 0 0; font-size: 1.75rem; overflow-wrap: anywhere; }
  .task-word > p { display: block; font-size: .72rem; overflow-wrap: anywhere; }
  .task-word small { margin-top: 4px; font-size: .67rem; }
  .task-actions { grid-column: 1; justify-content: flex-start; gap: 7px; }
  .task-actions > * { max-width: 100%; }
  .task-actions .primary-button,
  .task-actions .secondary-button { flex: 1 1 100%; }
  .task-actions button { min-height: 42px; }
  .today-settings-link { margin-top: 20px; text-align: left; }

  .settings-shell h1 { font-size: 2.35rem; }
  .settings-shell > p { margin-bottom: 0; font-size: .86rem; }
  .settings-form { gap: 10px; margin-top: 28px; }
  .settings-form.is-colorful label {
    grid-template-columns: minmax(0, 1fr) 76px;
    grid-template-rows: auto auto;
    gap: 3px 12px;
    min-height: 112px;
    align-content: center;
    align-items: center;
    padding: 17px 18px;
  }
  .settings-form.is-colorful label > strong { grid-column: 1; font-size: 1.05rem; }
  .settings-form.is-colorful label > span { grid-column: 1; }
  .settings-form.is-colorful input {
    grid-column: 2;
    grid-row: 1 / 3;
    min-height: 62px;
    padding: 4px;
    font-size: 2rem;
  }
  .settings-form button { width: 100%; justify-self: stretch; }

  .history-filter { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .history-filter input,
  .history-filter select,
  .history-filter button { width: 100%; min-width: 0; min-height: 44px; }
  .collection-grid { gap: 10px; margin-top: 30px; }
  .collection-grid article { min-height: 0; padding: 20px; }
  .collection-grid article > div { margin-top: 24px; }
  .collections-shell .taxonomy-heading form { align-items: stretch; flex-direction: column; }
  .collections-shell .taxonomy-heading input,
  .collection-add-form select { width: 100%; min-width: 0; min-height: 44px; }
  .collection-add-form { align-items: stretch; flex-direction: column; }

  .quiz-mode-tabs { justify-content: flex-start; overflow-x: auto; }
  .quiz-mode-tabs a { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; }
  .quiz-card { padding: 30px 16px; }
  .quiz-card h1 { font-size: 3.6rem; overflow-wrap: anywhere; }
  .quiz-prompt { font-size: 1.05rem; }
  .quiz-options { gap: 8px; margin-top: 26px; }
  .quiz-options button { min-height: 64px; padding: 10px 12px; }
  .truth-meaning { margin: 26px 0; padding: 20px 8px; font-size: 1.25rem; }
  .cloze-sentence { margin: 28px 0; font-size: 1.55rem; }
  .review-card { padding: 30px 16px; }
  .review-shell > h1 { font-size: 2.55rem; }

  .topic-index-hero,
  .topic-hero { padding-block: 44px 60px; }
  .topic-index-hero { gap: 16px; }
  .topic-index-hero h1,
  .topic-hero h1 { font-size: 2.65rem; }
  .topic-index-hero > .primary-button { width: 100%; }
  .topic-grid { gap: 12px; padding-bottom: 72px; }
  .topic-tile { min-height: 0; }
  .topic-tile > div { min-height: 178px; padding: 20px 20px 52px; }
  .topic-tile > div > span { font-size: 5rem; }
  .topic-tile h2 { font-size: 1.45rem; }
  .topic-tile a { left: 20px; bottom: 18px; }
  .topic-cover { margin-block: 28px 20px; }
  .topic-intro { margin-block: 25px 16px; padding: 20px 4px; }

  .footer-inner { min-height: 0; padding-block: 38px; gap: 18px; }
  .footer-note { margin: 0; }
}

/* Mobile editor's ledger — dense enough to work, calm enough to read */
@media (max-width: 700px) {
  .admin-bar {
    position: relative;
    z-index: 24;
    overflow: visible;
  }
  .admin-bar-inner {
    position: relative;
    display: block;
    min-height: 0;
  }
  .admin-bar-inner > .admin-desktop-links,
  .admin-bar-inner > .admin-desktop-logout { display: none; }
  .mobile-admin-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .mobile-admin-nav > a,
  .mobile-admin-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 8px 2px;
    border-left: 1px solid rgba(255,255,255,.1);
    color: var(--rice-paper);
    font-size: .64rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .mobile-admin-nav > a:first-child { border-left: 0; }
  .mobile-admin-menu { position: static; }
  .mobile-admin-menu > summary {
    color: var(--peach);
    font-weight: 800;
    list-style: none;
    cursor: pointer;
  }
  .mobile-admin-menu > summary::-webkit-details-marker { display: none; }
  .mobile-admin-menu > summary::after { content: "＋"; margin-left: 3px; font-size: .65rem; }
  .mobile-admin-menu[open] > summary::after { content: "−"; }
  .mobile-admin-menu > summary:focus-visible { outline: 3px solid var(--peach); outline-offset: -3px; }
  .mobile-admin-menu-panel {
    position: absolute;
    z-index: 35;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.14);
    background: var(--tea-ink);
    box-shadow: 0 18px 38px rgba(41,33,30,.24);
  }
  .mobile-admin-menu-panel > a,
  .mobile-admin-menu-panel > form {
    min-width: 0;
  }
  .mobile-admin-menu-panel > a,
  .mobile-admin-menu-panel button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 44px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.13);
    background: rgba(255,255,255,.05);
    color: var(--rice-paper);
    font-size: .68rem;
    line-height: 1.3;
    text-align: center;
  }
  .mobile-admin-menu-panel > form { grid-column: 1 / -1; }
  .mobile-admin-menu-panel button { color: var(--peach); cursor: pointer; }

  .admin-hero,
  .member-directory-hero,
  .member-record-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-block: 42px 34px;
  }
  .admin-hero h1,
  .member-directory-hero h1,
  .member-record-hero h1,
  .taxonomy-heading h1,
  .login-history-hero h1 {
    font-size: 2.45rem;
    line-height: 1.22;
    text-wrap: pretty;
  }
  .admin-hero div > p:last-child,
  .member-directory-hero > div > p:last-child,
  .member-record-hero > div > p:last-child,
  .taxonomy-heading > div > p:last-child,
  .login-history-hero p {
    margin-top: 12px;
    font-size: .82rem;
    line-height: 1.75;
  }
  .admin-hero .primary-button { width: 100%; }
  .admin-list-section,
  .taxonomy-shell,
  .media-shell,
  .quality-page,
  .topics-admin,
  .login-history-shell,
  .editor-shell { padding-block: 38px 72px; }

  .admin-search {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 18px;
    padding: 15px;
  }
  .admin-search > div { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .admin-search input,
  .admin-search button { min-height: 44px; }
  .admin-search input { width: 100%; padding: 9px 11px; }
  .admin-search button { padding: 8px 15px; }
  .admin-list-head { padding: 11px 8px; font-size: .67rem; letter-spacing: .04em; }

  .admin-row {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px 12px;
    min-height: 0;
    padding: 17px 6px;
  }
  .admin-row .admin-word,
  .admin-row .admin-row-copy { grid-column: 1; min-width: 0; }
  .admin-row .status-stamp { grid-column: 2; grid-row: 1; align-self: start; }
  .admin-row .edit-link { grid-column: 2; grid-row: 2; align-self: end; }
  .admin-word { flex-wrap: wrap; gap: 6px 10px; }
  .admin-word strong { max-width: 100%; font-size: 1.9rem; overflow-wrap: anywhere; }
  .admin-word span { overflow-wrap: anywhere; }
  .admin-row-copy h2 { font-size: 1rem; overflow-wrap: anywhere; }
  .admin-row-copy p { overflow-wrap: anywhere; }
  .status-stamp { min-height: 30px; padding-inline: 5px; font-size: .52rem; line-height: 1.25; transform: none; }
  .edit-link { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; font-size: .67rem; }

  .bulk-form { gap: 12px; }
  .bulk-form .admin-row { grid-template-columns: 32px minmax(0, 1fr) 72px; }
  .bulk-form .bulk-check { grid-column: 1; grid-row: 1 / 3; align-self: stretch; }
  .bulk-form .admin-word,
  .bulk-form .admin-row-copy { grid-column: 2; }
  .bulk-form .admin-row .status-stamp { grid-column: 3; grid-row: 1; }
  .bulk-form .admin-row .edit-link { grid-column: 3; grid-row: 2; }
  .bulk-check { place-content: center; }
  .bulk-check input { width: 20px; height: 20px; }
  .bulk-controls { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .bulk-controls label,
  .bulk-controls select,
  .bulk-controls .secondary-button { width: 100%; min-width: 0; }
  .bulk-controls select,
  .bulk-controls .secondary-button { min-height: 44px; }
  .pagination { margin-top: 22px; }
  .pagination a { display: grid; place-items: center; min-height: 44px; padding: 8px 14px; }

  .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 26px 0 38px; }
  .quality-grid a { min-height: 88px; padding: 15px 13px; }
  .quality-grid strong { font-size: 1.55rem; }
  .quality-grid span { font-size: .65rem; }

  .taxonomy-heading { display: grid; gap: 18px; margin-bottom: 32px; }
  .taxonomy-heading .back-link { margin: 0; }
  .taxonomy-grid { gap: 50px; }
  .taxonomy-grid > section + section { padding-top: 34px; border-top: 1px solid var(--tea-ink); }
  .taxonomy-title { align-items: end; gap: 12px; }
  .taxonomy-title h2 { font-size: 1.5rem; }
  .taxonomy-row { padding: 17px 0; }
  .taxonomy-row > form:first-child,
  .taxonomy-new,
  .category-row > form:first-child,
  .taxonomy-new:has(.wide) {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-right: 0;
  }
  .taxonomy-row .wide,
  .taxonomy-new .wide,
  .category-row > form:first-child > button { grid-column: 1; }
  .taxonomy-row input,
  .taxonomy-new input { min-height: 44px; }
  .taxonomy-row > form:first-child > button,
  .taxonomy-new .secondary-button { justify-self: stretch; min-height: 42px; }
  .taxonomy-usage { justify-content: flex-start; margin-top: 12px; }
  .taxonomy-new { margin-top: 20px; padding: 18px; }

  .media-upload { gap: 15px; margin-bottom: 32px; padding: 18px; }
  .media-upload input { width: 100%; min-width: 0; }
  .media-upload .primary-button { width: 100%; }
  .media-grid { grid-template-columns: 1fr; gap: 12px; }
  .media-card > div { padding: 15px; }
  .media-card code { font-size: .62rem; }

  .new-topic-panel > summary,
  .admin-topic-item > summary { min-height: 52px; padding: 14px 16px; }
  .admin-topic-item > summary { flex-wrap: wrap; gap: 7px 12px; }
  .admin-topic-item > summary strong { min-width: 0; overflow-wrap: anywhere; }
  .admin-topic-item > summary small { flex-basis: 100%; margin-left: 0; }
  .topic-admin-form .form-grid { gap: 18px; padding: 22px 16px; }
  .topic-admin-form .form-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .topic-admin-form .form-actions > * { width: 100%; }

  .editor-heading { gap: 17px; margin-bottom: 18px; padding-bottom: 18px; }
  .editor-heading h1 { font-size: 2.15rem; line-height: 1.25; }
  .editor-heading-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .editor-heading-actions .back-link,
  .editor-heading-actions .secondary-button { display: inline-flex; align-items: center; min-height: 42px; margin: 0; }
  .editor-word-preview { min-height: 92px; }
  .editor-word-preview strong { max-width: 100%; font-size: 3.2rem; overflow-wrap: anywhere; }
  .entry-form { box-shadow: none; }
  .entry-form legend { padding: 14px 16px; }
  .form-grid { gap: 20px; padding: 24px 16px; }
  .field input,
  .field select { min-height: 46px; }
  .field textarea { min-height: 118px; }
  .markdown-editor textarea { min-height: 250px; }
  .workflow-note { margin: -8px 16px 24px; }
  .tag-checks { gap: 7px; }
  .tag-checks span { display: grid; place-items: center; min-height: 40px; padding: 6px 11px; }
  .media-picker { padding: 14px; overflow-wrap: anywhere; }
  .media-insert { min-height: 40px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; gap: 10px; padding: 18px 16px 22px; }
  .form-actions > a,
  .form-actions > button { width: 100%; min-height: 44px; justify-content: center; text-align: center; }
  .example-editor,
  .source-editor { margin-top: 54px; }
  .example-admin-row,
  .example-edit-row { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 20px 2px; }
  .example-edit-row > form:first-of-type { grid-column: 2; gap: 15px; }
  .example-edit-row .row-actions { grid-column: 2; }
  .example-add-form .form-grid { padding-block: 24px; }
  .example-add-form > button { width: calc(100% - 32px); margin: 0 16px 22px; }
  .source-form { gap: 16px; padding: 18px 16px; }
  .delete-zone { margin-top: 54px; }

  .member-create { width: 100%; }
  .member-create summary { display: flex; align-items: center; min-height: 48px; padding: 13px 16px; }
  .member-create form { padding: 8px 16px 18px; }
  .member-directory { padding-bottom: 72px; }
  .member-list { display: grid; gap: 9px; }
  .member-row {
    grid-template-columns: 1fr;
    gap: 13px;
    min-height: 0;
    padding: 18px 16px;
    border: 1px solid var(--line);
    background: rgba(255,253,249,.62);
  }
  .member-identity { gap: 11px; }
  .member-identity h2 { font-size: 1.38rem; }
  .member-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; gap: 6px 12px; }
  .member-mini-stats span { white-space: normal; }
  .member-last-seen { padding-top: 10px; border-top: 1px solid var(--line); }
  .member-row .edit-link { justify-content: flex-start; min-height: 42px; text-align: left; }

  .member-today-seal { width: 100px; height: 100px; }
  .member-stat-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-stat-index > * { min-height: 68px; padding: 11px 10px; }
  .member-stat-index strong { font-size: 1.45rem; }
  .member-view-tabs {
    flex-wrap: nowrap;
    gap: 0;
    margin: 28px 0 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .member-view-tabs a { flex: 0 0 auto; min-height: 42px; padding: 10px 12px; white-space: nowrap; }
  .member-view-heading { gap: 12px; }
  .member-overview { gap: 36px; }
  .activity-list { padding-left: 22px; }
  .activity-list article { grid-template-columns: 1fr; gap: 3px; min-height: 0; padding-block: 12px 16px; }
  .activity-dot { left: -21px; }
  .collection-ledger { padding: 20px 17px; }
  .member-entry-row { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding: 18px 6px; }
  .member-entry-word { flex-wrap: wrap; }
  .member-entry-word strong { font-size: 1.85rem; overflow-wrap: anywhere; }
  .member-entry-actions { grid-column: 1; justify-items: start; }
  .member-entry-actions a,
  .member-entry-actions button { min-height: 38px; }
  .member-admin-panels { gap: 11px; margin-top: 46px; }
  .member-admin-panels > section { padding: 20px 16px; }
  .member-edit-form,
  .compact-fields { grid-template-columns: 1fr; }
  .member-data-tools > div { grid-template-columns: 1fr; }
  .member-data-tools form,
  .member-delete-account { align-items: stretch; flex-direction: column; padding: 16px; }
  .member-data-tools form:nth-child(odd) { border-right: 0; }
  .member-data-tools button,
  .member-delete-account button { width: 100%; min-height: 42px; }
  .member-login-preview { margin-top: 46px; }

  .login-history-hero { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 26px; }
  .login-history-head { padding: 10px 6px; }
  .login-history-list { display: grid; gap: 8px; }
  .login-history-list article {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 5px 12px;
    min-height: 0;
    padding: 16px 8px;
    border: 1px solid var(--line);
    background: rgba(255,253,249,.55);
  }
  .login-history-list article time,
  .login-history-list article .login-person,
  .login-history-list article code { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
  .login-history-list article .login-result,
  .login-history-list article form { grid-column: 2; }
  .login-history-list article .login-result { grid-row: 1 / 3; min-width: 58px; }
  .login-history-list article form { grid-row: 3; }
  .login-history-list article button { min-width: 58px; min-height: 40px; }
}
