@font-face {
  font-family: "Project FZ ShuSong";
  src:
    url("./fonts/方正书宋简体.TTF") format("truetype"),
    url("./fonts/fangzheng/founder-shusong.ttf") format("truetype"),
    local("方正书宋简体"),
    local("方正书宋"),
    local("FZShuSong-Z01S"),
    local("FZShuSong-Z01");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ KaiTi";
  src:
    url("./fonts/方正楷体简体.TTF") format("truetype"),
    url("./fonts/fangzheng/founder-kaiti.ttf") format("truetype"),
    local("方正楷体简体"),
    local("方正楷体"),
    local("FZKai-Z03S"),
    local("FZKai-Z03");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ XingKai";
  src:
    url("./fonts/方正行楷简体.TTF") format("truetype"),
    url("./fonts/方正行楷细简.TTF") format("truetype"),
    url("./fonts/fangzheng/founder-xingkai.ttf") format("truetype"),
    local("方正行楷细简"),
    local("方正行楷简体"),
    local("方正行楷"),
    local("FZXingKai-S04S"),
    local("FZXingKai-S04");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ JiaGuWen";
  src:
    url("./fonts/方正甲骨文(1).TTF") format("truetype"),
    local("方正甲骨文");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project Bronze Script";
  src:
    url("./fonts/书体坊金文大篆.ttf") format("truetype"),
    local("书体坊金文大篆");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ XiaoZhuan";
  src:
    url("./fonts/方正小篆体(1).TTF") format("truetype"),
    url("./fonts/jiudian-zhuanshu.ttf") format("truetype"),
    local("方正小篆体"),
    local("方正小篆");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ LiShu";
  src:
    url("./fonts/方正隶书简体(1).TTF") format("truetype"),
    local("方正隶书简体"),
    local("方正隶书");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Project FZ CaoShu";
  src:
    url("./fonts/方正文征明行草 简.TTF") format("truetype"),
    local("方正文征明行草 简"),
    local("方正文征明行草");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian XingKai";
  src: url("./fonts/jiudian-xingkai.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian Hei";
  src: url("./fonts/jiudian-heiti.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian PrintKai";
  src: url("./fonts/jiudian-printkaiti.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian PrintSong";
  src: url("./fonts/jiudian-printsong.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian ZhuanShu";
  src: url("./fonts/jiudian-zhuanshu.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jiudian TempSeal";
  src: url("./fonts/jiudian-tempseal-ge.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+4E2A;
}

@font-face {
  font-family: "Jiudian TempSeal";
  src: url("./fonts/jiudian-tempseal-yao.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+5E7A;
}

:root {
  --bg: #edf1f4;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --ink: #161917;
  --muted: #6b7479;
  --line: rgba(27, 37, 42, 0.15);
  --soft-line: rgba(27, 37, 42, 0.08);
  --seal: #a92d3d;
  --blue: #253d78;
  --jade: #1d6f68;
  --sand: #f6f4ef;
  --shadow: 0 18px 46px rgba(24, 34, 38, 0.12);
  --model-font: "Project FZ KaiTi", "Jiudian PrintKai", "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", "Noto Serif CJK SC", serif;
  --model-font-weight: 400;
  --paper-texture-opacity: 0.5;
  --model-opacity: 0.22;
  --anchor-size-px: 3.78px;
  --school-small-offset-px: 1.134px;
  --school-large-offset-px: 2.268px;
  --model-guide-frame-line: rgba(36, 123, 255, 0.72);
  --model-guide-center-line: rgba(36, 123, 255, 0.78);
  --model-guide-dash-count: 9;
  --model-guide-dash-unit: calc(100% / (var(--model-guide-dash-count) + var(--model-guide-dash-count) - 1));
  --model-guide-dash-step: calc(var(--model-guide-dash-unit) + var(--model-guide-dash-unit));
  --board-frame-line: rgba(0, 156, 21, 0.58);
  --board-texture-line: rgba(0, 156, 21, 0.1);
  --board-grid-line: rgba(0, 156, 21, 0.22);
  --board-center-line: rgba(0, 156, 21, 0.32);
  --board-anchor-fill: rgba(0, 156, 21, 0.58);
  --tabbar-height: 86px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(38, 61, 120, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 111, 104, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  overflow: hidden;
}

body.has-consent-dialog {
  overflow: hidden;
}

body.is-awaiting-consent .demo-app {
  visibility: hidden;
  pointer-events: none;
}

body.is-app-ready .launch-screen,
body:not(.is-awaiting-consent) .launch-screen[hidden] {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.demo-app {
  width: min(100%, 480px);
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(12px);
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    24px
    max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at top, rgba(169, 45, 61, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 241, 244, 0.98));
}

.launch-screen[hidden] {
  display: none;
}

.launch-screen-inner {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.launch-seal-wrap {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 54px rgba(24, 34, 38, 0.14);
}

.launch-seal-image {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.launch-copy {
  display: grid;
  gap: 8px;
}

.launch-copy strong {
  font-size: 34px;
  line-height: 1.1;
}

.launch-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 22, 24, 0.5);
  backdrop-filter: blur(2px);
}

.consent-overlay[hidden] {
  display: none;
}

.consent-dialog {
  width: min(100%, 420px);
  border-radius: 24px;
  background: #fff;
  padding: 28px 22px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.consent-dialog h2 {
  margin: 0 0 14px;
  font-size: 34px;
  text-align: center;
}

.consent-dialog p {
  margin: 0;
  font-size: 26px;
  line-height: 1.7;
  color: #2e3438;
}

.consent-link {
  color: #2c6aa6;
}

.consent-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.consent-decline-btn {
  background: rgba(29, 111, 104, 0.08);
  color: #8a8f94;
}

.consent-accept-btn {
  color: #fff;
  background: #ff9a00;
}

body.is-awaiting-consent .consent-overlay {
  background: rgba(237, 241, 244, 0.18);
  backdrop-filter: none;
}

.demo-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.seal-image {
  width: 48px;
  height: 48px;
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
  box-shadow:
    0 10px 24px rgba(24, 34, 38, 0.12);
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-family: "Jiudian PrintSong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 21px;
  white-space: nowrap;
}

.brand-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.appbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.appbar-actions[hidden] {
  display: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(27, 37, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(24, 34, 38, 0.08);
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease;
}

.icon-button span[aria-hidden="true"] {
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

.icon-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.primary {
  background: var(--blue);
  color: #fff;
}

.icon-button.is-disabled {
  opacity: 0.38;
  cursor: default;
}

.demo-main {
  min-height: 0;
  position: relative;
}

.tab-panel {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
  padding: 4px 18px calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 22px);
  scrollbar-width: none;
}

.tab-panel::-webkit-scrollbar {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.practice-summary,
.board-card,
.practice-switcher-card,
.practice-tools-card,
.preview-card,
.font-card,
.group-card,
.character-card,
.catalog-card,
.setting-card {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 252, 250, 0.82));
  box-shadow: var(--shadow);
}

.practice-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.summary-side {
  flex: 0 0 96px;
  display: flex;
  align-items: center;
}

.summary-side-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.summary-glyph-wrap {
  display: flex;
  justify-content: center;
}

.summary-glyph {
  position: relative;
  overflow: hidden;
  width: 96px;
  height: 96px;
  padding: 2px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--model-guide-frame-line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 247, 0.88)),
    #fbfaf5;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: 68px;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 4px 10px rgba(27, 37, 42, 0.04);
}

.summary-glyph-char {
  z-index: 1;
  display: block;
  transform: scale(1.12);
  transform-origin: center;
}

.summary-glyph::before,
.summary-glyph::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.summary-glyph::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 0.75px);
  width: 1.5px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--model-guide-center-line) 0 var(--model-guide-dash-unit),
    transparent var(--model-guide-dash-unit) var(--model-guide-dash-step)
  );
}

.summary-glyph::after {
  left: 0;
  right: 0;
  top: calc(50% - 0.75px);
  height: 1.5px;
  background-image: repeating-linear-gradient(
    to right,
    var(--model-guide-center-line) 0 var(--model-guide-dash-unit),
    transparent var(--model-guide-dash-unit) var(--model-guide-dash-step)
  );
}

.summary-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.summary-hint-head,
.summary-meta h1 {
  margin: 0;
}

.summary-hint-head,
.panel-head p,
.preview-info p {
  color: var(--muted);
  font-size: 12px;
}

.summary-hint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-hint-head p,
.summary-hint-head span {
  margin: 0;
}

.summary-meta h1 {
  margin-top: 6px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  word-break: break-word;
}

.summary-meta h1[hidden],
.stroke-preview-strip[hidden],
.stroke-steps[hidden] {
  display: none !important;
}

.stroke-preview-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.stroke-preview-row {
  display: flex;
  gap: 6px;
  min-width: max-content;
}

.stroke-preview-card {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 246, 245, 0.84)),
    var(--sand);
  box-shadow:
    inset 0 0 0 1px rgba(27, 37, 42, 0.08),
    0 4px 10px rgba(31, 45, 61, 0.05);
}

.stroke-preview-index {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  color: rgba(34, 57, 97, 0.82);
  background: rgba(239, 243, 251, 0.95);
  box-shadow: inset 0 0 0 1px rgba(61, 92, 146, 0.14);
}

.stroke-preview-card svg {
  width: 34px;
  height: 34px;
  display: block;
}

.stroke-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  max-height: 96px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.stroke-step {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(37, 61, 120, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.stroke-step em {
  flex: 0 0 auto;
  min-width: 16px;
  font-style: normal;
}

.stroke-step span {
  min-width: 0;
}

.stroke-step-geometry {
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
}

.stroke-step.is-muted {
  color: var(--muted);
}

.hero-pills,
.board-metrics,
.chip-row,
.swatches {
  display: flex;
  gap: 10px;
}

.hero-pills {
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  padding-top: 0;
}

.hero-pills span,
.board-metrics span,
.status-pill,
#fontMetaText {
  color: var(--muted);
  font-size: 12px;
}

.hero-pill-button,
.hero-pills span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 61, 120, 0.08);
}

.hero-pill-button {
  border: 1px solid rgba(37, 61, 120, 0.14);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.hero-pill-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.pill-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.pill-button.subtle {
  background: rgba(37, 61, 120, 0.08);
  color: var(--blue);
}

.board-card {
  padding: 12px;
}

.board-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.board-meta > strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.board-metrics {
  flex-wrap: wrap;
  justify-content: end;
}

.board-metrics em {
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.board-stage {
  display: grid;
  place-items: center;
  padding: 4px 0 8px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 245, 0.72)),
    linear-gradient(90deg, rgba(169, 45, 61, 0.04), rgba(29, 111, 104, 0.05));
}

.board {
  position: relative;
  width: min(calc(100vw - 46px), 426px);
  height: min(calc(100vw - 46px), 426px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--board-frame-line);
  border-radius: 0;
  background: var(--sand);
  box-shadow:
    0 18px 40px rgba(24, 34, 38, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.paper-texture,
.model-character,
.sixteen-grid,
.center-grid,
.anchor-layer,
#inkCanvas {
  position: absolute;
  inset: 0;
}

.paper-texture {
  z-index: 0;
  opacity: 0;
  background:
    linear-gradient(
      to bottom,
      transparent calc(12.5% - 0.5px),
      var(--board-texture-line) calc(12.5% - 0.5px) calc(12.5% + 0.5px),
      transparent calc(12.5% + 0.5px),
      transparent calc(25% - 0.5px),
      var(--board-texture-line) calc(25% - 0.5px) calc(25% + 0.5px),
      transparent calc(25% + 0.5px),
      transparent calc(37.5% - 0.5px),
      var(--board-texture-line) calc(37.5% - 0.5px) calc(37.5% + 0.5px),
      transparent calc(37.5% + 0.5px),
      transparent calc(50% - 0.5px),
      var(--board-texture-line) calc(50% - 0.5px) calc(50% + 0.5px),
      transparent calc(50% + 0.5px),
      transparent calc(62.5% - 0.5px),
      var(--board-texture-line) calc(62.5% - 0.5px) calc(62.5% + 0.5px),
      transparent calc(62.5% + 0.5px),
      transparent calc(75% - 0.5px),
      var(--board-texture-line) calc(75% - 0.5px) calc(75% + 0.5px),
      transparent calc(75% + 0.5px),
      transparent calc(87.5% - 0.5px),
      var(--board-texture-line) calc(87.5% - 0.5px) calc(87.5% + 0.5px),
      transparent calc(87.5% + 0.5px)
    ),
    linear-gradient(
      to right,
      transparent calc(12.5% - 0.5px),
      var(--board-texture-line) calc(12.5% - 0.5px) calc(12.5% + 0.5px),
      transparent calc(12.5% + 0.5px),
      transparent calc(25% - 0.5px),
      var(--board-texture-line) calc(25% - 0.5px) calc(25% + 0.5px),
      transparent calc(25% + 0.5px),
      transparent calc(37.5% - 0.5px),
      var(--board-texture-line) calc(37.5% - 0.5px) calc(37.5% + 0.5px),
      transparent calc(37.5% + 0.5px),
      transparent calc(50% - 0.5px),
      var(--board-texture-line) calc(50% - 0.5px) calc(50% + 0.5px),
      transparent calc(50% + 0.5px),
      transparent calc(62.5% - 0.5px),
      var(--board-texture-line) calc(62.5% - 0.5px) calc(62.5% + 0.5px),
      transparent calc(62.5% + 0.5px),
      transparent calc(75% - 0.5px),
      var(--board-texture-line) calc(75% - 0.5px) calc(75% + 0.5px),
      transparent calc(75% + 0.5px),
      transparent calc(87.5% - 0.5px),
      var(--board-texture-line) calc(87.5% - 0.5px) calc(87.5% + 0.5px),
      transparent calc(87.5% + 0.5px)
    );
  background-size: 25% 25%;
  background-repeat: repeat;
  transition: opacity 160ms ease;
}

.model-character {
  z-index: 1;
  display: grid;
  place-items: center;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  line-height: 1;
  color: #111;
  opacity: 0;
  user-select: none;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.sixteen-grid {
  z-index: 2;
  opacity: 0;
  background-image:
    linear-gradient(to right, transparent calc(25% - 0.5px), var(--board-grid-line) calc(25% - 0.5px), var(--board-grid-line) calc(25% + 0.5px), transparent calc(25% + 0.5px)),
    linear-gradient(to right, transparent calc(75% - 0.5px), var(--board-grid-line) calc(75% - 0.5px), var(--board-grid-line) calc(75% + 0.5px), transparent calc(75% + 0.5px)),
    linear-gradient(to bottom, transparent calc(25% - 0.5px), var(--board-grid-line) calc(25% - 0.5px), var(--board-grid-line) calc(25% + 0.5px), transparent calc(25% + 0.5px)),
    linear-gradient(to bottom, transparent calc(75% - 0.5px), var(--board-grid-line) calc(75% - 0.5px), var(--board-grid-line) calc(75% + 0.5px), transparent calc(75% + 0.5px));
  transition: opacity 160ms ease;
}

.center-grid {
  z-index: 3;
  opacity: 0;
  transition: opacity 160ms ease;
}

.center-grid::before,
.center-grid::after {
  content: "";
  position: absolute;
  background: var(--board-center-line);
}

.center-grid::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 0.5px);
  width: 1px;
}

.center-grid::after {
  left: 0;
  right: 0;
  top: calc(50% - 0.5px);
  height: 1px;
}

.anchor-layer {
  z-index: 4;
  opacity: 0;
  transition: opacity 160ms ease;
}

.anchor-layer span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--anchor-size-px);
  height: var(--anchor-size-px);
  border-radius: 50%;
  background: var(--board-anchor-fill);
  transform: translate(-50%, -50%);
}

#inkCanvas {
  z-index: 5;
  touch-action: none;
}

.board.show-texture .paper-texture {
  opacity: var(--paper-texture-opacity);
}

.board.show-model .model-character {
  opacity: var(--model-opacity);
}

.board.show-grid .sixteen-grid {
  opacity: 0.96;
}

.board.show-center .center-grid,
.board.show-anchors .anchor-layer {
  opacity: 1;
}

.practice-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.practice-save-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(29, 111, 104, 0.1);
  color: var(--jade);
  font-size: 13px;
  font-weight: 700;
}

.practice-save-toggle input {
  appearance: none;
  width: 38px;
  height: 22px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(27, 37, 42, 0.18);
  cursor: pointer;
  transition: background 160ms ease;
}

.practice-save-toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(24, 34, 38, 0.18);
  transition: transform 160ms ease;
}

.practice-save-toggle input:checked {
  background: var(--jade);
}

.practice-save-toggle input:checked::after {
  transform: translateX(16px);
}

.quick-range-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.quick-range-field span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.quick-range-field input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.quick-range-field output {
  min-width: 54px;
  color: var(--muted);
  text-align: right;
  font-size: 14px;
  font-weight: 700;
}

.favorite-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(169, 45, 61, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(169, 45, 61, 0.72);
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.appbar-favorite-button {
  width: 42px;
  height: 42px;
  border-color: rgba(169, 45, 61, 0.18);
  border-radius: 12px;
  color: rgba(169, 45, 61, 0.72);
}

.practice-switcher-card {
  padding: 16px;
  margin-top: 14px;
}

.practice-tools-card {
  padding: 16px;
  margin-top: 14px;
}

.practice-font-grid,
.practice-character-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 0;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.practice-font-grid::-webkit-scrollbar,
.practice-character-rail::-webkit-scrollbar {
  display: none;
}

.practice-font-grid .chip-button {
  flex: 0 0 auto;
  min-height: 42px;
  white-space: nowrap;
}

.practice-switcher-row {
  display: block;
  margin-top: 10px;
}

.practice-neighbor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-chip-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(37, 61, 120, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(24, 34, 38, 0.06);
  cursor: pointer;
}

.nav-chip-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.nav-chip-icon {
  font-size: 20px;
  line-height: 1;
}

.nav-chip-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.practice-tools-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.practice-character-rail button {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.78);
  color: #111;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: 31px;
  cursor: pointer;
}

.practice-character-rail button.is-active {
  border-color: rgba(169, 45, 61, 0.28);
  background: rgba(169, 45, 61, 0.08);
  color: var(--seal);
}

.favorite-button.is-active {
  background: rgba(169, 45, 61, 0.12);
  color: var(--seal);
}

.favorite-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.favorite-button.is-active .favorite-icon {
  fill: currentColor;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 18px);
  z-index: 30;
  min-width: 96px;
  max-width: calc(100% - 40px);
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(27, 37, 42, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(24, 34, 38, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.swatches {
  align-items: center;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: var(--swatch);
  box-shadow: 0 4px 14px rgba(24, 34, 38, 0.14);
  cursor: pointer;
}

.swatch.is-active {
  outline: 2px solid rgba(37, 61, 120, 0.42);
  outline-offset: 2px;
}

.range-field output,
.panel-head p,
.preview-info span,
.card-title-row span {
  color: var(--muted);
}

.swatch-label-title,
.board-frame-picker-copy strong {
  color: var(--ink);
}

.panel-head,
.card-title-row,
.swatch-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2,
.card-title-row h3 {
  margin: 4px 0 0;
}

.preview-card,
.font-card,
.group-card,
.character-card,
.catalog-card,
.mine-card,
.setting-card {
  padding: 16px;
  margin-bottom: 14px;
}

.preview-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.preview-character {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0;
  border: 2px solid var(--model-guide-frame-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 247, 0.88)),
    #fbfaf5;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: 72px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.preview-character-char {
  z-index: 1;
  display: block;
  transform: scale(1.1);
  transform-origin: center;
}

.preview-character::before,
.preview-character::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.preview-character::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 0.75px);
  width: 1.5px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--model-guide-center-line) 0 var(--model-guide-dash-unit),
    transparent var(--model-guide-dash-unit) var(--model-guide-dash-step)
  );
}

.preview-character::after {
  left: 0;
  right: 0;
  top: calc(50% - 0.75px);
  height: 1.5px;
  background-image: repeating-linear-gradient(
    to right,
    var(--model-guide-center-line) 0 var(--model-guide-dash-unit),
    transparent var(--model-guide-dash-unit) var(--model-guide-dash-step)
  );
}

.preview-info strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
}

.preview-info span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.chip-row {
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
}

.chip-button.is-active {
  background: rgba(37, 61, 120, 0.12);
  border-color: rgba(37, 61, 120, 0.2);
  color: var(--blue);
  font-weight: 700;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.character-grid button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
  color: #111;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: clamp(24px, 7vw, 33px);
  cursor: pointer;
}

.character-grid button.is-active {
  border-color: rgba(169, 45, 61, 0.28);
  background: rgba(169, 45, 61, 0.08);
  color: var(--seal);
}

.catalog-search-field {
  display: block;
  margin-top: 12px;
}

.catalog-search-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.catalog-filter-row {
  margin-top: 12px;
}

.catalog-detail {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(245, 247, 247, 0.88);
}

.catalog-detail strong {
  font-size: 24px;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
}

.catalog-detail span,
.catalog-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.catalog-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 14px;
  border-radius: 16px;
  background: rgba(245, 247, 247, 0.88);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.catalog-grid button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
  color: #111;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: 31px;
  cursor: pointer;
}

.catalog-grid button.is-active {
  border-color: rgba(37, 61, 120, 0.26);
  background: rgba(37, 61, 120, 0.1);
  color: var(--blue);
}

.catalog-more {
  width: 100%;
  margin-top: 14px;
}

.favorite-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.favorite-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.favorite-row.is-active {
  border-color: rgba(169, 45, 61, 0.28);
  background: rgba(169, 45, 61, 0.08);
}

.favorite-glyph {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 247, 247, 0.92);
  color: #111;
  font-family: var(--model-font);
  font-weight: var(--model-font-weight);
  font-size: 34px;
}

.favorite-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.favorite-copy em,
.favorite-empty span {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.favorite-order {
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(224, 231, 238, 0.82);
  color: #607085;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.favorite-empty {
  display: grid;
  gap: 8px;
  padding: 20px 14px;
  border-radius: 16px;
  background: rgba(245, 247, 247, 0.88);
  text-align: center;
}

.mine-card-action {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid rgba(37, 61, 120, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mine-card-action:focus-visible,
.mine-back-button:focus-visible {
  outline: 3px solid rgba(47, 104, 220, 0.32);
  outline-offset: 2px;
}

.mine-list-detail {
  margin-bottom: 0;
}

.mine-list-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.mine-list-detail-head h3 {
  margin: 0;
}

.mine-list-detail-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mine-back-button {
  min-width: 58px;
  min-height: 38px;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 14px;
  background: rgba(245, 247, 247, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mine-full-list {
  padding-bottom: 4px;
}

.toggle-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.switch-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(245, 247, 247, 0.9);
}

.switch-row input {
  appearance: none;
  width: 46px;
  height: 28px;
  position: relative;
  border-radius: 999px;
  background: rgba(27, 37, 42, 0.14);
  cursor: pointer;
  transition: background 160ms ease;
}

.switch-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(24, 34, 38, 0.16);
  transition: transform 160ms ease;
}

.switch-row input:checked {
  background: var(--jade);
}

.switch-row input:checked::after {
  transform: translateX(18px);
}

.range-field {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.range-field input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.range-field output {
  min-width: 62px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}

.swatch-label-row {
  margin-top: 14px;
}

.settings-swatches {
  opacity: 0.7;
}

.board-frame-picker-card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(27, 37, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.board-frame-picker-trigger {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 0 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 249, 0.88)),
    var(--surface-strong);
  border: 1px solid rgba(27, 37, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
  overflow: hidden;
}

.board-frame-color-preview {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--jade);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 10px 24px rgba(24, 34, 38, 0.12);
}

.board-frame-picker-copy {
  display: grid;
  gap: 4px;
}

.board-frame-picker-copy strong {
  font-size: 14px;
  color: var(--ink);
}

.board-frame-picker-copy small {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.board-frame-picker-trigger input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.board-frame-opacity-field {
  margin-top: 0;
}

.tabbar {
  min-height: var(--tabbar-height);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(244, 247, 249, 0.92);
  backdrop-filter: blur(18px);
}

.tab-button {
  min-height: 60px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 0 10px;
  border-radius: 18px;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.tab-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-button strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.tab-button.is-active {
  background: rgba(37, 61, 120, 0.1);
  color: var(--blue);
}

.tab-button:active,
.pill-button:active,
.chip-button:active,
.icon-button:active,
.favorite-button:active,
.favorite-row:active {
  transform: scale(0.98);
}

@media (min-width: 720px) {
  body {
    padding: 22px 0;
  }

  .demo-app {
    height: min(920px, calc(100dvh - 44px));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 34px;
    box-shadow: 0 28px 72px rgba(24, 34, 38, 0.16);
    overflow: hidden;
  }

  .board {
    width: min(360px, 100%);
    height: min(360px, 100%);
  }
}

@media (max-width: 420px) {
  .demo-appbar {
    gap: 8px;
    padding-inline: 14px;
  }

  .brand {
    gap: 10px;
  }

  .seal-image {
    width: 44px;
    height: 44px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .appbar-actions {
    gap: 6px;
  }

  .appbar-actions .icon-button {
    width: 38px;
    height: 38px;
  }

  .practice-summary {
    gap: 8px;
    padding: 14px;
  }

  .summary-side {
    flex-basis: 112px;
  }

  .summary-glyph {
    min-height: 80px;
    font-size: 64px;
  }

  .practice-neighbor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-chip-button {
    min-height: 58px;
  }

  .practice-tools-footer {
    align-items: flex-start;
  }

  .practice-character-rail button {
    width: 52px;
    height: 52px;
    border-radius: 0;
    font-size: 27px;
  }

  .character-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .character-grid button {
    border-radius: 0;
    font-size: clamp(20px, 6.2vw, 28px);
  }

  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .status-pill {
    padding: 0 10px;
  }
}

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

.mine-panel {
  gap: 12px;
}

.tab-panel.mine-panel.is-active {
  display: grid;
}

.mine-overview {
  gap: 12px;
}

.mine-overview:not([hidden]) {
  display: grid;
}

.mine-profile-card,
.mine-menu-card button {
  border-radius: 18px;
}
.mine-profile-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, #2d67d8, #6fa0ff);
  color: #fff;
}
.mine-profile-main { display:flex; gap:12px; align-items:center; background:none; border:none; color:inherit; }
.mine-avatar { width:52px;height:52px;border-radius:50%;background:rgba(255,255,255,.22);display:grid;place-items:center;font-weight:700; }
.mine-profile-main strong{display:block;font-size:18px}.mine-profile-main small{opacity:.9}
.mine-menu-card button{border:none;background:rgba(255,255,255,.86);padding:14px;font-size:16px;text-align:left;color:inherit;text-decoration:none}
.mine-menu-card button{width:100%;display:flex;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.06)}
.mine-menu-card button:last-child{border-bottom:none}
.mine-menu-card button:focus-visible{outline:3px solid rgba(47,104,220,.32);outline-offset:2px}
.mine-menu-card.danger button{color:#a92d3d}

.login-sheet,
.feedback-sheet,
.policy-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(4px);
}

.login-panel {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 480px);
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  padding: 10px 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 1));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.login-panel::before {
  content: "";
  justify-self: center;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.54);
}

.login-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.login-panel h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.login-panel .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  color: #111827;
  font-size: 20px;
  line-height: 1;
}

.login-field input,
.feedback-field textarea {
  width: 100%;
  border: 1px solid #d9e1ee;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  padding: 0 14px;
  font-size: 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.login-field input {
  height: 48px;
}

.feedback-field textarea {
  min-height: 132px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.5;
}

.policy-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(78vh, 680px);
}

.policy-body {
  min-height: 0;
  overflow: auto;
  border: 1px solid #d9e1ee;
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px;
  color: #111827;
  -webkit-overflow-scrolling: touch;
}

.policy-body p {
  margin: 0;
  color: #5d6678;
  line-height: 1.6;
}

.policy-document {
  display: grid;
  gap: 12px;
}

.policy-document h1 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.28;
}

.policy-document h2 {
  margin: 8px 0 0;
  color: #111827;
  font-size: 16px;
  line-height: 1.4;
}

.policy-document p,
.policy-document li,
.policy-document td,
.policy-document th {
  color: #263244;
  font-size: 14px;
  line-height: 1.75;
}

.policy-document p,
.policy-document ol,
.policy-document ul {
  margin: 0;
}

.policy-document ol,
.policy-document ul {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

.policy-document table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.policy-document th,
.policy-document td {
  border: 1px solid #d9e1ee;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.policy-document th {
  background: #eef4ff;
  font-weight: 800;
}

.policy-document .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.policy-document .policy-meta {
  display: grid;
  gap: 4px;
  color: #5d6678;
  font-size: 13px;
}

.policy-document .policy-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.policy-document .policy-note {
  font-weight: 800;
}

.login-field input::placeholder,
.feedback-field textarea::placeholder {
  color: #7b8494;
}

.login-field input:focus,
.feedback-field textarea:focus {
  outline: none;
  border-color: rgba(45, 103, 216, 0.72);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 103, 216, 0.12);
}

.login-field.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.login-field.split button {
  min-width: 0;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: #e7efff;
  color: #255bc0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.login-submit {
  height: 48px;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, #2d67d8, #5d8df2);
  color: #fff;
  box-shadow: 0 14px 28px rgba(45, 103, 216, 0.24);
}

.login-submit:disabled {
  background: #b9c9e8;
  color: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

.login-tip-success,
.feedback-tip-success { color: #1f8f47; }
.login-tip-error,
.feedback-tip-error { color: #b33a3a; }
#loginTipText,
#feedbackTipText {
  min-height: 18px;
  color: #5d6678;
  font-size: 13px;
  line-height: 1.35;
}

.login-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.login-agreement span {
  min-width: 0;
}

.login-agreement a {
  color: #2d67d8;
  text-decoration: none;
}

.login-agreement a:hover {
  text-decoration: underline;
}

.login-agreement input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #2d67d8;
}

@media (max-width: 520px) {
  .login-panel {
    bottom: 0;
    width: 100%;
    border-right: none;
    border-bottom: none;
    border-left: none;
    border-radius: 24px 24px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
