:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-2: #fff3e8;
  --ink: #3b302b;
  --muted: #84756c;
  --line: #f1e3d6;
  --primary: #e8602f;
  --primary-deep: #c2491c;
  --primary-soft: #ffe6da;
  --mint: #2f9c7c;
  --mint-soft: #ddf4ec;
  --sun: #ffc23d;
  --sun-soft: #fff1c9;
  --sky: #4b8fe8;
  --sky-soft: #e4efff;
  --danger: #c23b2a;
  --shadow-sm: 0 2px 8px rgba(120, 72, 40, 0.06);
  --shadow: 0 10px 28px rgba(120, 72, 40, 0.1);
  --radius: 22px;
  --radius-sm: 14px;
  --tab-h: 66px;
  --bar-h: 60px;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --round: var(--sans);
  --serif: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
body.is-operator,
body.is-gated { padding-bottom: 0; }
a { color: var(--primary-deep); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.45; letter-spacing: 0.01em; }
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
h4 { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
p { margin: 0.35rem 0 0.75rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; left: 1rem; top: -4rem; background: #fff; padding: 0.4rem 0.7rem; z-index: 50; border-radius: 10px; }
.skip:focus { top: 0.5rem; }

/* app bar */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 241, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(241, 227, 214, 0.8);
  padding-top: env(safe-area-inset-top);
}
.app-bar-inner {
  width: min(1080px, calc(100% - 1.5rem));
  margin: 0 auto;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; }
.brand-mark {
  width: 2.2rem; height: 2.2rem; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, #ff9b6a, #ffc23d); color: #fff; flex: none;
  box-shadow: 0 4px 10px rgba(232, 96, 47, 0.28);
}
.brand-mark .icon { width: 1.3rem; height: 1.3rem; }
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-text strong, .brand-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text strong { font-family: var(--round); font-weight: 500; font-size: 1.02rem; }
.brand-text span { font-size: 0.68rem; color: var(--muted); }
.top-nav { display: none; }
.nav-menu > summary,
.tab-menu > summary { list-style: none; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker,
.tab-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::marker,
.tab-menu > summary::marker { content: ""; }
.nav-caret { display: none; }
.nav-panel {
  display: grid; gap: 0.15rem; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 0.4rem;
}
.nav-panel a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem;
  border-radius: 14px; text-decoration: none; color: var(--ink);
}
.nav-panel a:hover { background: var(--surface-2); }
.nav-panel a[aria-current="page"] { background: var(--primary-soft); }
.nav-panel a[aria-current="page"] b { color: var(--primary-deep); }
.nav-panel b { display: block; font-size: 0.92rem; line-height: 1.3; }
.nav-panel small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 500; line-height: 1.4; }
.nav-panel-icon {
  width: 2.2rem; height: 2.2rem; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.nav-panel-icon .icon { width: 1.15rem; height: 1.15rem; }
.nav-panel-support .nav-panel-icon { background: var(--mint-soft); color: var(--mint); }
.app-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; flex: none; }
.app-bar-actions .button-sm { white-space: nowrap; }
.point-chip {
  display: inline-flex; align-items: center; gap: 0.2rem; text-decoration: none;
  background: var(--sun-soft); color: #8a5a00; border-radius: 999px;
  padding: 0.25rem 0.7rem 0.25rem 0.55rem; font-weight: 700; font-size: 0.95rem;
  white-space: nowrap;
}
.point-chip-rank {
  font-size: 0.72rem; line-height: 1; font-weight: 700;
  padding-right: 0.4rem; margin-right: 0.15rem;
  border-right: 1px solid rgba(138, 90, 0, 0.28);
}
.point-chip .icon { width: 1.05rem; height: 1.05rem; color: #f0a500; fill: #ffc23d; }
.point-chip small { font-size: 0.72rem; font-weight: 500; }
.avatar {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--mint-soft); color: var(--mint); font-weight: 700; text-decoration: none;
  border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.6rem; flex: none; }
.text-link { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.92rem; padding: 0.4rem 0.3rem; }

/* tab bar */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(120, 72, 40, 0.06);
}
.tab-menu { position: static; min-width: 0; }
.tab-bar > a,
.tab-bar > .tab-menu > summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  color: #a8978c; text-decoration: none; font-size: 0.62rem; font-weight: 700; position: relative;
  background: none; border: 0; padding: 0; width: 100%; height: 100%;
}
.tab-bar > a .icon,
.tab-bar > .tab-menu > summary .icon { width: 1.5rem; height: 1.5rem; }
.tab-bar > a[aria-current="page"],
.tab-bar > .tab-menu > summary[aria-current="true"],
.tab-bar > .tab-menu[open] > summary { color: var(--primary); }
.tab-bar > a[aria-current="page"]::before,
.tab-bar > .tab-menu > summary[aria-current="true"]::before,
.tab-bar > .tab-menu[open] > summary::before {
  content: ""; position: absolute; top: 0.45rem; width: 2.8rem; height: 2rem; border-radius: 999px;
  background: var(--primary-soft); z-index: -1;
}
.tab-bar > a[aria-current="page"] .icon,
.tab-bar > .tab-menu > summary[aria-current="true"] .icon,
.tab-bar > .tab-menu[open] > summary .icon { transform: translateY(-1px); }
.tab-bar .nav-panel {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: calc(100% + 0.55rem); z-index: 2;
}

main { width: min(640px, calc(100% - 2rem)); margin: 0 auto; padding: 1.1rem 0 2.5rem; }
main.main-wide { width: min(1080px, calc(100% - 2rem)); }
.site-footer { color: var(--muted); font-size: 0.8rem; }
.footer-inner { width: min(640px, calc(100% - 2rem)); margin: 0 auto; padding: 0.5rem 0 1.6rem; }
.footer-inner a { font-weight: 700; }

.period-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.period-range label { font-weight: 500; font-size: 0.82rem; }
#monthly, #once { scroll-margin-top: calc(var(--bar-h) + 0.75rem); }
.donate-key {
  position: relative; margin: 0 0 1.1rem; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.donate-key img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 72% center;
}
.donate-key figcaption {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 1.15rem 1.35rem 1.15rem 1.15rem;
  background: linear-gradient(90deg, rgba(32, 24, 18, 0.5) 0%, rgba(32, 24, 18, 0.16) 46%, transparent 70%);
  color: #fff; font-weight: 700; font-size: 1.12rem; line-height: 1.55;
  text-align: left;
}
.donate-panel { border-color: #d7efe6; }
.donate-average {
  margin: 0 0 0.35rem; padding: 0.55rem 0.8rem; text-align: center;
  background: var(--surface-2); border-radius: 12px; color: var(--muted);
  font-size: 0.85rem; font-weight: 700;
}
.donate-panel h3, .section h3 { margin: 1rem 0 0.55rem; font-size: 1rem; }
.donate-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.3rem 0 0.8rem; }
.donate-amounts a {
  display: grid; justify-items: center; gap: 0.05rem; text-decoration: none; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 0.85rem 0.4rem;
}
.donate-amounts a:hover { border-color: #b7e0d2; background: var(--mint-soft); color: var(--ink); }
.donate-amounts small { color: var(--muted); font-weight: 700; font-size: 0.75rem; }
.donate-amounts b { font-size: 1.15rem; line-height: 1.3; }
.donate-amounts span { color: var(--mint); font-size: 0.78rem; font-weight: 700; }
.donate-points { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.45rem; }
.donate-points li {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  background: var(--surface-2); border-radius: 14px; padding: 0.7rem 0.9rem;
}
.donate-points li > span { flex: 1; min-width: 0; }
.donate-points li > .button { flex: none; white-space: nowrap; }
.donate-points span { color: var(--primary-deep); font-weight: 700; }
.donate-points small {
  display: block; margin-top: 0.15rem; color: var(--muted);
  font-size: 0.82rem; font-weight: 500; line-height: 1.55;
}
.event-list { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.75rem; }
.event-list li {
  display: flex; flex-direction: column; gap: 0.7rem; min-width: 0;
  background: var(--surface-2); border-radius: 14px; padding: 0.7rem;
}
.event-list img { width: 100%; height: auto; border-radius: 10px; display: block; }
.event-body {
  display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 0.7rem;
  padding: 0 0.2rem 0.15rem;
}
.event-body > span { flex: 1; min-width: 0; color: var(--primary-deep); font-weight: 700; }
.event-body > .button {
  align-self: center; flex: none; white-space: nowrap; margin-top: auto;
  padding: 0.65rem 1.35rem; font-size: 0.95rem;
}
.event-body small {
  display: block; margin-top: 0.15rem; color: var(--muted);
  font-size: 0.82rem; font-weight: 500; line-height: 1.55;
}
.donate-reasons {
  list-style: none; padding: 0; margin: 0.2rem 0 0; display: grid;
  grid-template-columns: 1fr 1fr; gap: 0.6rem;
}
.donate-reasons li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 0.85rem 0.7rem 0.8rem; text-align: center; font-weight: 700;
  font-size: 0.86rem; line-height: 1.45;
}
.donate-reasons img { width: 2.5rem; height: 2.5rem; display: block; margin: 0 auto 0.35rem; }
.donate-mission {
  margin: 0.85rem 0 0; padding: 1rem 1.05rem; background: var(--mint-soft); border-radius: 20px;
}
.donate-mission p { margin: 0.25rem 0; font-weight: 700; }
.donate-mission p + p { font-weight: 500; }
.donate-activities { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.donate-activities li {
  display: grid; grid-template-columns: 6.2rem 1fr; gap: 0.85rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0.75rem;
}
.donate-activities img {
  width: 6.2rem; height: 6.2rem; object-fit: cover; border-radius: 50%; display: block;
}
.donate-activities h3 { margin: 0 0 0.2rem; font-size: 0.98rem; }
.donate-activities p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.6; }
.donate-stats {
  list-style: none; padding: 0; margin: 0 0 0.85rem; display: grid; gap: 0.5rem;
}
.donate-stats li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0.75rem 0.9rem;
}
.donate-stats b { display: block; color: var(--primary-deep); font-size: 1.2rem; line-height: 1.3; }
.donate-stats span { color: var(--muted); font-size: 0.82rem; }
.donate-quotes { list-style: none; padding: 0; margin: 0 0 0.85rem; display: grid; gap: 0.5rem; }
.donate-quotes li {
  margin: 0; padding: 0.8rem 0.95rem; background: var(--surface-2); border-radius: 16px;
  font-size: 0.88rem; line-height: 1.65;
}
.donate-quotes li::before { content: "「"; }
.donate-quotes li::after { content: "」"; }
.donate-award { margin: 0 0 0.8rem; }
.donate-award img { display: block; width: 100%; border-radius: 20px; }
.donate-award figcaption { margin: 0.55rem 0 0; }
.donate-award figcaption b, .donate-award figcaption span { display: block; }
.donate-award figcaption span { color: var(--muted); font-size: 0.88rem; }
.donate-award-list { margin: 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.88rem; }
.donate-award-list li { margin: 0.25rem 0; }
.donate-pie {
  margin: 0.35rem 0 0; display: grid; justify-items: center; gap: 1rem;
}
.donate-pie-chart { width: 11.5rem; height: 11.5rem; border-radius: 50%; }
.donate-costs { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 0.5rem; }
.donate-costs li {
  display: grid; grid-template-columns: 0.85rem 1fr auto; align-items: center; gap: 0.55rem;
  font-size: 0.88rem;
}
.donate-cost-swatch { width: 0.85rem; height: 0.85rem; border-radius: 4px; }
.donate-cost-swatch.is-maintain { background: var(--primary); }
.donate-cost-swatch.is-server { background: #e2a322; }
.donate-cost-swatch.is-support { background: var(--mint); }
.donate-costs b { font-weight: 700; }
.donate-costs li > span:last-child { color: var(--primary-deep); font-weight: 700; }
.donate-impacts { list-style: none; padding: 0; margin: 0.3rem 0 0; display: grid; gap: 0.65rem; }
.donate-impacts li {
  display: grid; grid-template-columns: 6.4rem 1fr; gap: 0.75rem; align-items: center;
  background: #fff; border: 1px solid #d7efe6; border-radius: 18px; padding: 0.55rem;
}
.donate-impacts img {
  width: 6.4rem; height: 4.7rem; object-fit: cover; border-radius: 12px; display: block;
}
.donate-impacts b { display: block; font-size: 0.92rem; }
.donate-impacts p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.donate-voices { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.donate-voices li {
  display: grid; grid-template-columns: 4.8rem 1fr; gap: 0.8rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0.8rem;
}
.donate-voices img {
  width: 4.8rem; height: 5.8rem; object-fit: cover; object-position: center top;
  border-radius: 16px; display: block;
}
.donate-voices h3 { margin: 0.1rem 0 0.35rem; font-size: 0.98rem; }
.donate-voices p { margin: 0; font-size: 0.86rem; line-height: 1.65; }
.donate-voices .meta { margin: 0 0 0.15rem; }
.donate-speeches {
  list-style: none; padding: 0; margin: 0.9rem 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem;
}
.donate-speech-open {
  display: grid; gap: 0.45rem; width: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.donate-speech-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #1c1917;
}
.donate-speech-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.donate-speech-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--ink);
}
.donate-speech-play .icon { width: 1.35rem; height: 1.35rem; }
.donate-speech-title { font-size: 0.82rem; font-weight: 700; line-height: 1.45; }
.donate-speech-dialog {
  width: min(960px, calc(100vw - 2rem)); max-width: calc(100vw - 2rem);
  margin: auto; padding: 0.85rem; border: 0; border-radius: 22px;
  background: #1c1917; color: #fff; box-shadow: var(--shadow);
}
.donate-speech-dialog::backdrop { background: rgba(28, 25, 23, 0.72); }
.donate-speech-dialog-bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem;
  margin: 0 0 0.65rem;
}
.donate-speech-dialog-title { margin: 0; font-size: 0.92rem; font-weight: 700; line-height: 1.45; }
.donate-speech-close {
  flex: none; border: 0; background: transparent; color: #fff;
  font-weight: 700; cursor: pointer; padding: 0.1rem 0.15rem;
}
.donate-speech-dialog .video-frame { margin: 0; border-radius: 14px; }
.spread-guides { display: grid; gap: 0.75rem; margin: 0 0 0.85rem; }
.spread-guide {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.05rem 1.05rem;
}
.spread-guide.is-sns { border-left-color: var(--sky); }
.spread-guide.is-personal { border-left-color: #e2a322; }
.spread-guide.is-organization { border-left-color: var(--mint); }
.spread-guide.is-seminar { border-left-color: var(--primary); }
.spread-head { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.45rem; }
.spread-kicker {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem;
}
.spread-kicker h3 { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.spread-points {
  flex: none; margin: 0.05rem 0 0;
  background: var(--primary-soft); color: var(--primary-deep);
  border-radius: 999px; padding: 0.12rem 0.62rem;
  font-size: 0.72rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.spread-guide > p { margin: 0.45rem 0 0; font-size: 0.9rem; line-height: 1.7; }
.spread-how { color: var(--muted); }
.spread-icon {
  width: 2.15rem; height: 2.15rem; border-radius: 12px;
  display: grid; place-items: center; flex: none;
}
.spread-icon .icon { width: 1.15rem; height: 1.15rem; }
.spread-icon.is-sns { background: var(--sky-soft); color: #2f6dc0; }
.spread-icon.is-personal { background: var(--sun-soft); color: #8a5a00; }
.spread-icon.is-organization { background: var(--mint-soft); color: var(--mint); }
.spread-icon.is-seminar { background: var(--primary-soft); color: var(--primary-deep); }
.spread-accounts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.spread-accounts a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.84rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.38rem 0.8rem 0.38rem 0.55rem;
}
.spread-accounts a:hover { border-color: #ffb08f; background: #fff; color: var(--primary-deep); }
.spread-accounts .icon { width: 1rem; height: 1rem; }
.spread-flyer { margin: 0.75rem 0 0; }
.is-operator .footer-inner { width: min(1080px, calc(100% - 2rem)); }

/* surfaces */
.card, .panel, .content-card, .empty-card, .auth-card, .total-card, .profile-card, .menu-list, .history-list {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.panel { padding: 1.1rem 1.15rem; margin: 0 0 1rem; }
.panel h2 { font-size: 1.08rem; }
.stack { display: grid; gap: 0.9rem; }
.split { display: grid; gap: 1rem; }
.section { margin: 1.8rem 0 0; }
.section.donate-representative { margin-bottom: 1.8rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.7rem; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head a {
  display: inline-flex; align-items: center; gap: 0.1rem; font-size: 0.85rem; font-weight: 700;
  text-decoration: none; color: var(--primary-deep);
}
.section-head a .icon { width: 1rem; height: 1rem; }
.count-chip { background: var(--primary-soft); color: var(--primary-deep); border-radius: 999px; padding: 0 0.6rem; font-weight: 700; font-size: 0.85rem; }
.page-head { margin: 0.3rem 0 1.1rem; }
.page-head p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.sort-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.sort-switch a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.sort-switch a[aria-current="page"] { background: var(--primary); color: #fff; }
.sort-switch a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.2rem; margin: 0 0 0.6rem;
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.88rem;
}
.back-link .icon { width: 1.05rem; height: 1.05rem; }
.empty-text { color: var(--muted); }
.help { color: var(--muted); font-size: 0.85rem; }
.meta { color: var(--muted); font-size: 0.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0 0 0.3rem; }

/* home */
.home-name {
  margin: 0.2rem 0 0.7rem;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.3;
}
.home-name strong { font-weight: 900; }
.home-install {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 1rem 1.05rem 0.95rem; margin: 0 0 0.9rem;
  box-shadow: 0 8px 22px rgba(90, 50, 28, 0.06);
}
.home-install h2 { margin: 0; font-size: 1rem; }
.home-install p { margin: 0.4rem 0 0; }
.home-install ol { margin: 0.35rem 0 0; padding-left: 1.25rem; }
.home-install li { margin: 0.1rem 0; }
.home-install > .button,
.home-install form { margin-top: 0.75rem; }
.home-install form .button { margin-top: 0; }
.home-install [hidden] { display: none !important; }
.note-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 1rem 1.05rem 0.9rem; margin: 0 0 0.9rem;
  box-shadow: 0 8px 22px rgba(90, 50, 28, 0.06);
}
.note-kicker { margin: 0 0 0.35rem; color: var(--primary); font-size: 0.78rem; font-weight: 700; }
.note-body { margin: 0; font-size: 1.02rem; line-height: 1.75; }
.note-figure { margin: 0.75rem 0 0.15rem; }
.note-figure img { display: block; width: 100%; height: auto; border-radius: 16px; }
.note-meta { margin: 0.55rem 0 0.15rem; justify-content: flex-end; }
.note-card .stamp-block { margin-top: 0.35rem; }
.note-card .stamp-bar { margin-top: 0.45rem; }
.home-notices { display: grid; gap: 0.55rem; }
.home-notice {
  display: grid; gap: 0.05rem; margin: 0; padding: 0.8rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  color: inherit; text-decoration: none;
}
.home-notice b { font-size: 0.95rem; line-height: 1.45; }
.home-notice small { color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.section.home-next,
.section.home-know { margin-top: 1.15rem; }
.home-next .panel p { margin: 0; }
.home-know-block + .home-know-block { margin-top: 1.15rem; }
.home-know-block h3 { margin: 0 0 0.7rem; font-size: 1rem; }
.home-events { margin-top: 1.15rem; }
.home-events h3 { margin: 0 0 0.7rem; font-size: 1rem; }
.home-events .event-list { margin-bottom: 0; }
.home-events .event-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 8px 22px rgba(90, 50, 28, 0.06);
}
.home-voices { margin-top: 1.15rem; }
.home-voices > h3 { margin: 0 0 0.7rem; font-size: 1rem; }
.home-voices .voice-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 1rem 1.05rem 0.95rem;
  box-shadow: 0 8px 22px rgba(90, 50, 28, 0.06);
}
.home-voices .voice-card + .voice-card { margin-top: 0.75rem; border-top: 0; }
.home-voices .voice-card h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.home-voices .voice-card p { margin: 0.35rem 0 0; }
.home-badges { margin-top: 1.15rem; }
.home-badges > h3 { margin: 0 0 0.7rem; font-size: 1rem; }
.home-badges .medal { background: #fff; box-shadow: 0 8px 22px rgba(90, 50, 28, 0.06); }
.home-exits { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.7rem; font-weight: 700; }
.home-exits a { text-decoration: none; }
.home-position {
  margin-top: 1.15rem; padding: 1rem 1.1rem 0.95rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.home-rank { margin: 0; }
.home-rank a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem;
  color: inherit; text-decoration: none; font-weight: 700;
}
.home-points { color: var(--muted); }
.home-rank-next { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.88rem; }
.home-position-links { display: flex; gap: 1rem; margin: 0.75rem 0 0; font-size: 0.85rem; font-weight: 700; }
.home-position-links a { text-decoration: none; }
.home-support { display: grid; gap: 0.35rem; margin-top: 0.9rem; }
.home-support a { color: var(--primary-deep); font-size: 0.92rem; font-weight: 700; }
.bar { height: 0.6rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #ff9b6a, var(--primary)); border-radius: inherit; }
.empty-card {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.95rem 1rem; text-decoration: none; color: var(--ink);
}
.empty-card > span:nth-child(2) { display: grid; flex: 1; line-height: 1.5; }
.empty-card b { font-size: 0.95rem; }
.empty-card small { color: var(--muted); font-size: 0.8rem; }
.empty-card > .icon { color: #c9b8ab; }
.empty-icon {
  width: 2.8rem; height: 2.8rem; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--sun-soft); color: #c98a00;
}

.hero {
  position: relative; overflow: hidden; padding: 1.6rem 1.3rem 1.4rem; border-radius: 28px;
  background: linear-gradient(160deg, #fff1e4 0%, #ffe3d3 100%); border: 1px solid #ffd9c4;
}
.hero > * { position: relative; z-index: 1; }
.hero-blob { position: absolute; border-radius: 50%; z-index: 0; }
.hero-blob-a { width: 11rem; height: 11rem; right: -3rem; top: -3.5rem; background: rgba(255, 194, 61, 0.35); }
.hero-blob-b { width: 7rem; height: 7rem; left: -2rem; bottom: -2.5rem; background: rgba(47, 156, 124, 0.16); }
.hero-kicker { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--primary-deep); background: #fff; border-radius: 999px; padding: 0.15rem 0.7rem; margin: 0 0 0.7rem; }
.hero h1 { font-family: var(--round); font-weight: 500; font-size: 1.9rem; line-height: 1.4; margin: 0 0 0.6rem; }
.hero p { font-size: 0.95rem; }
.hero-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }
.steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.85rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0.8rem 1rem;
}
.steps li b { font-size: 0.95rem; }
.steps li small { grid-column: 2; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.step-icon { grid-row: span 2; width: 2.7rem; height: 2.7rem; border-radius: 15px; display: grid; place-items: center; }
.step-icon-a { background: var(--sky-soft); color: var(--sky); }
.step-icon-b { background: var(--primary-soft); color: var(--primary); }
.step-icon-c { background: var(--mint-soft); color: var(--mint); }

/* content cards */
.card-list { display: grid; gap: 0.75rem; }
.content-card { overflow: hidden; position: relative; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.content-card:active { transform: scale(0.985); }
.content-card h3 { margin: 0.1rem 0 0; font-size: 1rem; line-height: 1.55; }
.content-card h3 a { color: var(--ink); text-decoration: none; }
.content-card h3 a::after { content: ""; position: absolute; inset: 0; }
.content-card.has-thumb { display: flex; flex-direction: column; }
.content-card-thumb { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.content-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content-card-body { padding: 0.8rem 1rem 0.95rem; }
.content-card.is-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1rem; }
.content-card.is-row .content-card-body { padding: 0; flex: 1; min-width: 0; }
.content-card-icon {
  width: 2.9rem; height: 2.9rem; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.content-card-icon.is-letter { background: var(--sky-soft); color: var(--sky); }
.carousel {
  grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -1rem; padding: 0.2rem 1rem 0.6rem; scroll-padding-inline: 1rem; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel .content-card h3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pill, .sample-flag, .kind-chip {
  display: inline-flex; align-items: center; gap: 0.2rem; max-width: 100%;
  border-radius: 999px; padding: 0.05rem 0.6rem; font-size: 0.72rem; font-weight: 700; line-height: 1.6;
}
.pill .icon { width: 0.9rem; height: 0.9rem; }
.pill-done { background: var(--mint-soft); color: #1f7a5f; }
.pill-wait { background: var(--sun-soft); color: #8a5a00; }
.sample-flag { background: #fde8e4; color: #a43a26; margin: 0.4rem 0 0; }
.kind-chip { background: var(--primary-soft); color: var(--primary-deep); }
.kind-chip.is-letter { background: var(--sky-soft); color: #2f6dc0; }

/* buttons */
.button, button.primary, .rank-up button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  background: var(--primary); color: #fff; border: 0; border-radius: 999px;
  padding: 0.75rem 1.3rem; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.3;
  box-shadow: 0 6px 16px rgba(232, 96, 47, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.button:hover { background: var(--primary-deep); color: #fff; }
.button:active { transform: translateY(1px) scale(0.99); box-shadow: 0 3px 8px rgba(232, 96, 47, 0.25); }
.button-block { display: flex; width: 100%; }
.button-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; box-shadow: 0 4px 10px rgba(232, 96, 47, 0.22); }
.button-ghost, .button.secondary, a.button.secondary {
  background: #fff; color: var(--primary-deep); border: 2px solid var(--primary-soft); box-shadow: none;
}
.button-ghost:hover, .button.secondary:hover { background: var(--primary-soft); color: var(--primary-deep); }
.button-danger { background: var(--danger); box-shadow: 0 6px 16px rgba(194, 59, 42, 0.25); }
.button-danger:hover { background: #a22e1f; }
.button:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* banners */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.message { background: var(--mint-soft); color: #1f5c4a; border-radius: var(--radius-sm); padding: 0.7rem 0.95rem; font-weight: 500; }
.message.error, .message.warning { background: #fde8e4; color: #8d2d1f; }
.rank-up {
  display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.75rem; align-items: center;
  background: linear-gradient(140deg, #2f9c7c, #4bb894); color: #fff;
  padding: 0.9rem 1rem; border-radius: 20px; margin-bottom: 1rem; box-shadow: 0 10px 24px rgba(47, 156, 124, 0.3);
}
.rank-up-icon { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255, 255, 255, 0.22); display: grid; place-items: center; }
.rank-up p { margin: 0; font-weight: 700; }
.rank-up form { grid-column: 1 / -1; margin: 0; }
.rank-up button { width: 100%; background: #fff; color: #1f7a5f; box-shadow: none; padding: 0.55rem 1rem; }
.verify-banner { background: var(--sun-soft); border-radius: 18px; padding: 0.85rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.verify-banner p { margin-top: 0; }

/* forms */
.field { margin: 0 0 1rem; }
.field label, .check { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.9rem; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.field legend { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.9rem; }
.field [type="radio"], .field [type="checkbox"] { accent-color: var(--primary); width: 1.15rem; height: 1.15rem; }
.field div:has(> label > input[type="radio"]),
.field div:has(> label > input[type="checkbox"]) { margin: 0.25rem 0; }
.field label:has(> input[type="radio"]),
.field label:has(> input[type="checkbox"]) {
  display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500;
}
.input, select.input, textarea.input {
  width: 100%; max-width: 42rem; background: #fff; border: 2px solid var(--line); border-radius: 14px;
  padding: 0.7rem 0.85rem; font-size: 16px; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:focus { outline: none; border-color: #ffb08f; box-shadow: 0 0 0 4px var(--primary-soft); }
.check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; accent-color: var(--primary); }
.error { color: #b0321f; margin: 0.25rem 0; font-size: 0.85rem; font-weight: 500; }
.field ul { list-style: none; padding: 0; margin: 0.3rem 0; }
.field li { margin: 0.3rem 0; }
.auth-card { padding: 1.6rem 1.3rem 1.3rem; margin: 0.6rem 0 0; text-align: left; }
.auth-card h1 { font-family: var(--round); font-weight: 500; font-size: 1.6rem; }
.auth-icon {
  width: 3.2rem; height: 3.2rem; border-radius: 18px; display: grid; place-items: center; margin-bottom: 0.8rem;
  background: linear-gradient(140deg, #ff9b6a, #ffc23d); color: #fff;
}
.auth-icon .icon { width: 1.6rem; height: 1.6rem; }
.auth-card form { margin-top: 1rem; }
.entry-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.entry-grid .auth-card { margin: 0; scroll-margin-top: 5rem; }
.entry-grid h2 { font-family: var(--round); font-weight: 500; font-size: 1.4rem; margin: 0 0 0.4rem; }
.entry-guide { margin: 0; }
.entry-guide .steps { margin-bottom: 1rem; }
.entry-guide > .button { margin-top: 0.4rem; }
.auth-switch { text-align: center; margin: 1.1rem 0 0; font-size: 0.9rem; color: var(--muted); }
.oauth-buttons { display: grid; gap: 0.6rem; margin: 1rem 0 0; }
.button-oauth {
  background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: none; font-weight: 700;
}
.button-oauth:hover { background: var(--surface-2); color: var(--ink); }
.oauth-divider {
  display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0 0.2rem;
  color: var(--muted); font-size: 0.85rem;
}
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-connections { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.oauth-connections li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.oauth-connections li > span { display: inline-flex; align-items: center; gap: 0.45rem; }

/* article */
.article-head h1 { font-size: 1.45rem; line-height: 1.5; margin: 0.3rem 0 0.7rem; }
.point-note {
  display: flex; gap: 0.55rem; align-items: flex-start; background: var(--sun-soft); color: #6b4700;
  border-radius: 16px; padding: 0.7rem 0.9rem; font-size: 0.85rem; line-height: 1.6;
}
.point-note .icon { width: 1.15rem; height: 1.15rem; margin-top: 0.1rem; }
.point-note.is-done { background: var(--mint-soft); color: #1f5c4a; }
.prose { font-size: 1.02rem; line-height: 1.95; }
.prose h2, .prose h3 { margin-top: 1.5rem; }
.prose img { border-radius: 18px; display: block; width: 100%; margin: 1rem 0 0.35rem; }
.prose blockquote { margin: 1rem 0; padding: 0.15rem 0 0.15rem 1rem; border-left: 3px solid var(--line); }
.letter-chapter { margin: 2.2rem 0 1.6rem; }
.letter-chapter h2 {
  font-size: 1.2rem; margin: 0 0 0.9rem; padding-left: 0.8rem; border-left: 5px solid var(--primary); border-radius: 2px;
}
.article-figure { margin: 0 0 1rem; }
.article-figure img { border-radius: 18px; display: block; width: 100%; }
.article-figure figcaption { color: var(--muted); font-size: 0.85rem; }
.article-frame-wrap {
  margin: 1rem -1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; background: #fff; min-height: 70vh;
}
.article-frame { display: block; width: 100%; min-height: 70vh; height: 80vh; border: 0; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1rem 0;
  background: #1c1917; border-radius: 18px; overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-meter { margin: 0.8rem 0 0.2rem; }

.reactions { margin: 1.6rem 0 2rem; display: grid; gap: 1.4rem; }
.stamp-block h2, .comment-block h2 { font-size: 1.08rem; }
.stamp-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin: 0.55rem 0 0.2rem;
}
.stamp-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem;
  padding: 0.32rem 0.2rem 0.22rem; background: var(--surface-2); color: var(--ink);
  border: 0; border-radius: 12px; cursor: pointer; font: inherit; line-height: 1.2; text-align: center;
}
.stamp-btn[data-kind="like"] { --stamp: var(--sky); --stamp-soft: var(--sky-soft); --stamp-deep: #2f6dc0; }
.stamp-btn[data-kind="support"] { --stamp: var(--primary); --stamp-soft: var(--primary-soft); --stamp-deep: var(--primary-deep); }
.stamp-btn[data-kind="learned"] { --stamp: #c98a00; --stamp-soft: var(--sun-soft); --stamp-deep: #8a5a00; }
.stamp-btn[data-kind="moved"] { --stamp: #e24b6a; --stamp-soft: #ffe0e6; --stamp-deep: #b52e4a; }
.stamp-btn[data-kind="solemn"] { --stamp: #6b8fb5; --stamp-soft: #e6eef6; --stamp-deep: #4a6a8a; }
.stamp-btn[data-kind="share"] { --stamp: var(--mint); --stamp-soft: var(--mint-soft); --stamp-deep: #1f7a5f; }
.stamp-btn:hover { background: var(--stamp-soft, #ffe8d4); }
.stamp-btn.is-on {
  background: var(--stamp-soft, var(--primary-soft)); color: var(--stamp-deep, var(--primary-deep));
}
.stamp-btn.is-disabled { cursor: default; opacity: 0.85; }
.stamp-btn.is-disabled:hover { background: var(--surface-2); }
.stamp-icon { display: grid; place-items: center; line-height: 0; color: var(--stamp, var(--ink)); }
.stamp-icon .icon { width: 1.2rem; height: 1.2rem; }
.stamp-label { font-size: 0.68rem; font-weight: 700; line-height: 1.25; }
.stamp-count { font-size: 0.7rem; font-weight: 700; color: var(--muted); line-height: 1; }
.stamp-btn.is-on .stamp-count { color: var(--stamp-deep, var(--primary-deep)); }
.stamp-count.is-empty { display: none; }
.comment-list { list-style: none; padding: 0; margin: 0.6rem 0 1rem; display: grid; gap: 0.7rem; }
.comment-item {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem 0.95rem;
}
.comment-item p { margin: 0.25rem 0 0; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: baseline; }
.comment-meta b { font-size: 0.9rem; }
.comment-meta time { color: var(--muted); font-size: 0.78rem; }
.comment-delete { margin: 0.45rem 0 0; }
.text-danger {
  background: none; border: 0; padding: 0; color: var(--danger); font: inherit; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.comment-form { margin-top: 0.8rem; }
.toast-host {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 0.8rem);
  width: min(560px, calc(100% - 1.5rem)); display: grid; gap: 0.5rem; pointer-events: none;
}
.toast {
  margin: 0; background: #3b302b; color: #fff; border-radius: 16px; padding: 0.8rem 1rem; font-weight: 700;
  box-shadow: var(--shadow); animation: toast-in 0.35s ease both;
}
.toast-rank { background: linear-gradient(140deg, #2f9c7c, #4bb894); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* badges */
.badge-mark {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none;
  background: #fff; border: 2px solid #f0d48a;
}
.badge-mark img.badge-emoji { width: 86%; height: 86%; object-fit: contain; }
.badge-mark img.badge-photo { width: 100%; height: 100%; object-fit: cover; }
.openmoji-credit { margin: 1.4rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.6; }
.openmoji-credit a { color: inherit; }
.medal-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; align-items: start; }
.medal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1rem 0.8rem;
  display: grid; justify-items: center; text-align: center; gap: 0.3rem; align-content: start;
}
.medal .badge-mark { width: 4rem; height: 4rem; }
.medal b { font-size: 0.92rem; line-height: 1.45; }
.medal small { color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.medal-date { color: var(--mint) !important; font-weight: 700; }
.badge-group + .badge-group { margin-top: 1.15rem; }
.badge-group-title { margin: 0 0 0.55rem; font-size: 0.95rem; }
.badge-progress .badge-mark { filter: grayscale(0.6); opacity: 0.8; }
.badge-progress .bar { justify-self: stretch; width: 100%; margin: 0.35rem 0 0.15rem; }
.progress-text { font-size: 0.78rem; line-height: 1.5; margin: 0; }
.badge-more { justify-self: stretch; width: 100%; margin-top: 0.15rem; }
.badge-more summary {
  list-style: none; cursor: pointer; width: fit-content; margin: 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--primary-deep); border: 2px solid var(--primary-soft);
  border-radius: 999px; padding: 0.28rem 0.85rem; font-size: 0.8rem; font-weight: 700; line-height: 1.3;
}
.badge-more summary::-webkit-details-marker { display: none; }
.badge-more summary::marker { content: ""; }
.badge-more summary:hover { background: var(--primary-soft); }
.badge-more .badge-more-shut { display: none; }
.badge-more[open] .badge-more-open { display: none; }
.badge-more[open] .badge-more-shut { display: inline; }
.badge-more-body {
  margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px solid var(--line);
  text-align: left; max-height: 16rem; overflow: auto;
}
.badge-more-body p { margin: 0 0 0.55rem; font-size: 0.82rem; }
.badge-more-body h4 { margin: 0.7rem 0 0.35rem; font-size: 0.85rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.check-list li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.9rem; }
.check-dot {
  width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid #e2d3c6; flex: none; margin-top: 0.2rem;
  display: grid; place-items: center;
}
.check-list li.is-done .check-dot { background: var(--mint); border-color: var(--mint); color: #fff; }
.check-dot .icon { width: 0.85rem; height: 0.85rem; }

/* points */
.total-card { padding: 1.2rem; text-align: center; margin-bottom: 1rem; }
.total-points { margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 0.25rem; }
.total-points b { font-family: var(--round); font-weight: 500; font-size: 3rem; line-height: 1.1; color: var(--primary); }
.total-points span { font-weight: 700; color: var(--primary); }
.total-rank { display: inline-block; margin: 0.2rem 0 0.4rem; background: var(--primary-soft); color: var(--primary-deep); border-radius: 999px; padding: 0.05rem 0.8rem; font-weight: 700; font-size: 0.85rem; }
.history-list { list-style: none; margin: 0; padding: 0.3rem 0; }
.history-list > .empty-text { padding: 1rem; }
.history-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; }
.history-item + .history-item { border-top: 1px solid var(--line); }
.history-icon { width: 2.5rem; height: 2.5rem; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.history-icon.is-letter { background: var(--sky-soft); color: var(--sky); }
.history-icon.is-video { background: var(--sun-soft); color: #8a5a00; }
.history-icon.is-spread { background: var(--sky-soft); color: var(--sky); }
.history-icon.is-volunteer { background: var(--primary-soft); color: var(--primary); }
.history-icon.is-event { background: var(--mint-soft); color: var(--mint); }
.history-icon.is-note { background: var(--sun-soft); color: #8a5a00; }
.history-icon.is-voice { background: var(--sky-soft); color: var(--sky); }
.history-body { flex: 1; min-width: 0; }
.history-title { margin: 0 0 0.15rem; font-weight: 700; font-size: 0.92rem; line-height: 1.5; }
.history-title a { color: var(--ink); text-decoration: none; }
.history-body .meta { margin: 0; font-size: 0.75rem; }
.history-points { font-family: var(--round); font-size: 1.25rem; color: var(--mint); white-space: nowrap; }
.history-points small { font-size: 0.7rem; font-family: var(--sans); font-weight: 700; margin-left: 0.1rem; }

/* my page */
.profile-card { display: flex; gap: 1rem; align-items: center; padding: 1.2rem; margin-bottom: 0.9rem; }
.profile-card h1 { font-size: 1.3rem; margin: 0; }
.profile-email { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.85rem; word-break: break-all; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.9rem; }
.mini-stats a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0.9rem 1rem;
  text-decoration: none; color: var(--ink); display: grid; gap: 0.1rem;
}
.mini-stats b { font-family: var(--round); font-weight: 500; font-size: 1.5rem; color: var(--primary); line-height: 1.3; }
.mini-stats b small { font-size: 0.8rem; margin-left: 0.15rem; }
.mini-stats span { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.menu-list { display: grid; margin: 0 0 1rem; overflow: hidden; }
.menu-list > a, .menu-list button {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.95rem 1rem; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 0.95rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.menu-list > * + * { border-top: 1px solid var(--line); }
.menu-list form { margin: 0; }
.menu-list span { flex: 1; }
.menu-list .icon:first-child { color: var(--primary); }
.menu-list .icon:last-child:not(:first-child) { color: #cbb9ac; width: 1.1rem; height: 1.1rem; }
.quiet-link { text-align: center; font-size: 0.82rem; }
.quiet-link a { color: var(--muted); }

/* pager */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; margin-top: 1.2rem; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.2rem; background: #fff;
  border: 2px solid var(--line); border-radius: 999px; padding: 0.5rem 0.9rem; text-decoration: none;
  color: var(--ink); font-weight: 700; font-size: 0.9rem;
}
.pager-btn:last-child { justify-self: end; }
.pager-count { color: var(--muted); font-size: 0.85rem; }

/* operator */
.chapter-editor, .option-editor {
  border: 2px dashed var(--line); background: #fff; border-radius: 18px;
  padding: 0.9rem 1rem 0.4rem; margin: 0 0 0.9rem; max-width: 42rem;
}
.chapter-editor legend, .option-editor legend { font-weight: 700; padding: 0 0.4rem; color: var(--primary-deep); }
.voice-card + .voice-card { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.open-voices-list { display: grid; gap: 1rem; margin: 0 0 1rem; }
.open-voices-list > .voice-card {
  margin: 0; padding: 1.1rem 1.15rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.open-voices-list > .voice-card + .voice-card {
  margin-top: 0; padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.voice-card h4 { margin: 1.1rem 0 0.45rem; font-size: 0.95rem; }
.voice-results { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.7rem; }
.voice-results li { display: grid; gap: 0.15rem; }
.voice-results .meta { display: flex; justify-content: space-between; gap: 0.75rem; margin: 0; font-size: 0.85rem; }
.voice-results .bar { margin-top: 0.15rem; }
.voice-yours { color: var(--primary-deep); font-weight: 700; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.subnav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.1rem; }
.subnav a {
  text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.88rem; font-weight: 500;
}
.subnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 1rem; }
.filters .field { margin: 0; }
.stats { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
.stat { padding: 0.9rem 1rem; }
.stat b { display: block; font-family: var(--round); font-weight: 500; font-size: 1.8rem; }
.period-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 1rem; }
.period-switch a { text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.2rem 0.8rem; color: var(--ink); }
.period-switch a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

@media (max-width: 559px) {
  .donate-points li:has(> .button) { flex-direction: column; align-items: flex-start; }
  .donate-reasons { grid-template-columns: 1fr; }
  .donate-reasons li {
    display: flex; align-items: center; gap: 0.75rem; text-align: left; padding: 0.7rem 0.85rem;
  }
  .donate-reasons img { margin: 0; }
}
@media (max-width: 420px) {
  .spread-kicker { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .app-bar-inner { width: min(1080px, calc(100% - 1rem)); gap: 0.4rem; }
  .brand { gap: 0.35rem; }
  .brand-text strong { font-size: 0.9rem; }
  .app-bar-actions .button-sm { padding: 0.4rem 0.55rem; font-size: 0.78rem; }
}
@media (max-width: 380px) {
  .brand-text strong { font-size: 0.78rem; }
  .app-bar-actions .button-sm { padding: 0.35rem 0.45rem; font-size: 0.72rem; }
}

@media (min-width: 560px) {
  .donate-stats { grid-template-columns: repeat(3, 1fr); }
  .donate-pie { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 1.4rem; }
  .event-list { grid-template-columns: 1fr 1fr; }
  .stamp-bar { grid-template-columns: repeat(6, 1fr); }
  .medal-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel { grid-auto-columns: 46%; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; text-align: center; justify-items: center; row-gap: 0.4rem; padding: 1rem 0.8rem; }
  .steps li small { grid-column: auto; }
  .step-icon { grid-row: auto; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tab-bar { display: none; }
  .top-nav { display: flex; align-items: center; gap: 0.2rem; margin-left: 1.2rem; }
  .top-nav > a,
  .top-nav > .nav-menu > summary {
    display: inline-flex; align-items: center; gap: 0.1rem;
    color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.9rem;
    padding: 0.4rem 0.8rem; border-radius: 999px;
  }
  .top-nav > a:hover,
  .top-nav > .nav-menu > summary:hover { color: var(--ink); background: var(--surface-2); }
  .top-nav > a[aria-current="page"],
  .top-nav > .nav-menu > summary[aria-current="true"],
  .top-nav > .nav-menu[open] > summary { color: var(--primary-deep); background: var(--primary-soft); }
  .top-nav > .nav-menu { position: relative; }
  .top-nav .nav-caret { display: inline-flex; }
  .top-nav .nav-caret .icon { width: 0.9rem; height: 0.9rem; transform: rotate(90deg); }
  .top-nav .nav-menu[open] .nav-caret .icon { transform: rotate(-90deg); }
  .top-nav .nav-panel { position: absolute; top: calc(100% + 0.45rem); left: 0; min-width: 16.5rem; z-index: 5; }
  .top-nav > .nav-menu-end .nav-panel { left: auto; right: 0; }
  main { width: min(720px, calc(100% - 2rem)); padding-top: 1.8rem; }
  .footer-inner { width: min(720px, calc(100% - 2rem)); }
  .card-list-thumbs:not(.carousel) { grid-template-columns: repeat(2, 1fr); }
  .carousel { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0; padding: 0; }
  .article-frame-wrap { margin: 1rem 0; border: 1px solid var(--line); border-radius: 20px; }
  .toast-host { bottom: 1.5rem; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr 0.9fr; }
}

@media (hover: hover) {
  .content-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
:focus-visible { outline: 3px solid #ffb08f; outline-offset: 2px; border-radius: 6px; }
