/* 明鏡・穿石の単一CSS正典。
   基礎 → アプリ構造 → ブランド表現の順で並べ、カスケード層は使わない。
   変更時は対象コンポーネントの既存宣言をここで統合し、後方上書きを増やさない。 */
:root {
  color-scheme: light;
  --navy-950: #0b1424;
  --navy-900: #0f172a;
  --navy-800: #1d2a3f;
  --paper: #f7fbff;
  --paper-cool: #eef5f8;
  --paper-deep: #dfe9ee;
  --ink: #142033;
  --ink-soft: #526275;
  --ink-faint: #718094;
  --line: #cbd8df;
  --line-strong: #9fb3c0;
  --sky: #0369a1;
  --sky-bright: #0284c7;
  --sky-pale: #dceff8;
  --success: #176b58;
  --danger: #9f3434;
  --display: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --body: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --utility: ui-monospace, "SFMono-Regular", "Roboto Mono", monospace;
  --reading-width: 70ch;
  --shadow-focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--sky-bright);
}

.preview-gate-page {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgb(11 20 36 / 97%), rgb(15 35 55 / 92%)),
    var(--navy-950);
  color: #e7f1f8;
}

.preview-gate {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.preview-gate__brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.75rem;
  color: #e7f1f8;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.preview-gate__panel {
  width: min(100%, 39rem);
  align-self: center;
  margin: 3rem auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid #38526d;
  background: rgb(11 20 36 / 68%);
}

.preview-gate__panel h1 {
  margin: 1.5rem 0 1rem;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.preview-gate__panel > p:not(.section-index) {
  margin: 0 0 2rem;
  color: #b9cad8;
}

.preview-gate__panel .primary-action {
  width: fit-content;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--sky);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--sky-bright);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  border-radius: 0.125rem;
  outline: 0;
  box-shadow: var(--shadow-focus);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-180%);
  background: var(--paper);
  color: var(--navy-950);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* 上部バーは全幅で唯一のナビ。ボトムナビはモバイルのみ（下の@mediaで復帰） */
.bottom-nav {
  display: none;
}
.compact-brand {
  color: inherit;
  text-decoration: none;
}

.compact-brand:hover {
  color: inherit;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 1.5rem;
  height: 2rem;
  align-items: flex-end;
  justify-content: center;
}

.brand-mark i {
  position: absolute;
  display: block;
  width: 0.45rem;
  height: 0.65rem;
  border: 1px solid #55b9ea;
  border-radius: 55% 55% 58% 58%;
  transform: rotate(45deg);
}

.brand-mark i:nth-child(1) {
  top: 0.1rem;
  left: 0.25rem;
}

.brand-mark i:nth-child(2) {
  top: 0.85rem;
  right: 0.18rem;
}

.brand-mark i:nth-child(3) {
  bottom: 0;
  left: 0.08rem;
}
.tier-label {
  color: #8fa6ba;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.account-control {
  display: grid;
  gap: 0.25rem;
}

.account-control form {
  margin: 0;
}

/* 色は勝ち層(app.css brand)が定義する。#dce7f1は旧・暗色レール用の残骸だった。 */
.account-name {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sky);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.library-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.38fr) 1fr;
  gap: 2rem;
  align-items: end;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-strong);
}

.ledger-label,
.section-index,
.callout-kicker,
.article-number,
.state-code {
  margin: 0;
  color: var(--sky);
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.library-heading h1,
.article-header h1,
.state-main h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.library-heading div > p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

.library-search {
  margin: 3rem 0 0;
}

.library-search label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-field {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  min-height: 3.5rem;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.search-field > span {
  color: var(--sky);
  font-size: 1.35rem;
  text-align: center;
}

.search-field input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.search-field input::placeholder {
  color: #7b8996;
  opacity: 1;
}

.search-field input:focus-visible {
  box-shadow: none;
}

.search-field button {
  min-width: 5rem;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  border: 0;
  background: var(--sky);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.search-field button:hover {
  background: #075985;
}

.resume-strip {
  display: grid;
  grid-template-columns: minmax(8rem, 0.38fr) 1fr;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0 4.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resume-strip h2,
.list-heading h2,
.lesson-group__header h2,
.membership-callout h2,
.completion-panel h2,
.guest-gate h2 {
  margin: 0.25rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.35;
}

.resume-strip h2 {
  font-size: 1rem;
}

.resume-content {
  min-width: 0;
}

.resume-link {
  position: relative;
  display: grid;
  min-height: 3.5rem;
  align-content: center;
  padding: 0.35rem 3rem 0.35rem 1rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid var(--sky-bright);
}

.resume-link::after {
  position: absolute;
  right: 0.75rem;
  align-self: center;
  color: var(--sky);
  content: "→";
  font-size: 1.25rem;
}

.resume-link:hover {
  background: var(--paper-cool);
  color: var(--ink);
}

.resume-link span {
  color: var(--ink-faint);
  font-size: 0.75rem;
}

.resume-link strong {
  overflow: hidden;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.library-list {
  scroll-margin-top: 2rem;
}

.list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.list-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.list-heading > p {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.76rem;
}

.lesson-group + .lesson-group {
  margin-top: 3.5rem;
}

.lesson-group__header {
  display: grid;
  grid-template-columns: 4.75rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  min-height: 3.5rem;
  padding: 0.8rem 0;
  border-bottom: 2px solid var(--ink);
}

.lesson-group__header p,
.lesson-group__header span {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.72rem;
}

.lesson-group__header h2 {
  font-size: 1.15rem;
}

.lesson-ledger {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lesson-row {
  position: relative;
  display: grid;
  grid-template-columns: 4.75rem 1rem minmax(0, 1fr) 3.75rem;
  gap: 1rem;
  min-height: 7rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.lesson-slot {
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.lesson-drop {
  position: relative;
  width: 0.55rem;
  height: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 55% 55% 58% 58%;
  transform: rotate(45deg);
}

.lesson-drop::before,
.lesson-drop::after {
  position: absolute;
  z-index: -1;
  top: -3.2rem;
  left: 0.18rem;
  width: 1px;
  height: 3rem;
  background: var(--line);
  content: "";
  transform: rotate(-45deg);
  transform-origin: bottom;
}

.lesson-drop::after {
  top: auto;
  bottom: -3.2rem;
  transform-origin: top;
}

.lesson-row:first-child .lesson-drop::before,
.lesson-row:last-child .lesson-drop::after {
  display: none;
}

.lesson-row.is-complete .lesson-drop,
.lesson-row[data-local-complete="true"] .lesson-drop {
  border-color: var(--sky-bright);
  background: var(--sky-bright);
}

.lesson-title {
  display: inline-block;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.45;
  text-decoration-color: transparent;
}

.lesson-title:hover {
  color: var(--sky);
  text-decoration-color: currentColor;
}

.lesson-copy > p:not(.lesson-meta) {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.45rem 0 0;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.68rem;
}

.lesson-state {
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.membership-callout {
  margin-top: 5rem;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  background: var(--sky-pale);
  border-left: 3px solid var(--sky);
}

.membership-callout h2 {
  max-width: 22ch;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.membership-callout > p:not(.callout-kicker) {
  max-width: 50ch;
  margin: 0.75rem 0 1.5rem;
  color: #31475a;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-action:hover {
  border-color: #075985;
  background: #075985;
  color: #ffffff;
}

.secondary-action {
  border: 1px solid var(--sky);
  background: transparent;
  color: var(--sky);
  cursor: pointer;
}

.secondary-action:hover {
  background: var(--sky-pale);
  color: #075985;
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.empty-state h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
}

.empty-state > p {
  margin: 0.5rem auto 1.5rem;
  color: var(--ink-soft);
}

/* Article reading view */

.article-main {
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: 3rem clamp(2rem, 5vw, 4.5rem) 7rem;
}

.back-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--sky);
}

.article-header {
  margin: 2.5rem 0 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-strong);
}

.article-header h1 {
  max-width: 24ch;
  margin-top: 1rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.25;
}

.article-lead {
  max-width: 43rem;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.7rem;
}

.article-outline {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 4.5rem 1.5rem 2rem 0;
}

.article-outline h2 {
  margin: 0.4rem 0 1rem;
  font-family: var(--display);
  font-size: 1rem;
}

.article-outline ol,
.mobile-outline ol {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-outline a,
.mobile-outline a {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  text-decoration: none;
  border-left: 1px solid var(--line);
}

.article-outline a:hover,
.article-outline a[aria-current="location"],
.mobile-outline a:hover {
  color: var(--sky);
  border-left-color: var(--sky);
}

.outline-empty {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.mobile-outline {
  display: none;
}

.reading-progress {
  position: fixed;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #d8e3e8;
  pointer-events: none;
}

.reading-progress span {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: calc(var(--reading-progress, 0) * 1%);
  background: var(--sky-bright);
}

.reading-progress i {
  position: absolute;
  top: clamp(0.35rem, calc(var(--reading-progress, 0) * 1%), calc(100% - 0.9rem));
  left: -0.3rem;
  width: 0.65rem;
  height: 0.85rem;
  background: var(--sky-bright);
  border-radius: 55% 55% 58% 58%;
  transform: rotate(45deg);
}

.reading-resume {
  margin: -1.5rem 0 3rem;
  padding: 1rem 1.25rem;
  background: var(--paper-cool);
  border-left: 2px solid var(--sky);
}

.reading-resume[hidden] {
  display: none;
}

.reading-resume p {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}

.reading-resume .secondary-action {
  margin-right: 0.75rem;
}

.prose {
  max-width: var(--reading-width);
  color: #182637;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose figure,
.prose table {
  margin-top: 1.4em;
  margin-bottom: 1.4em;
}

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 2rem;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.4;
}

.prose h2 {
  margin: 3.5em 0 1.2em;
  padding: 0.65rem 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  margin: 2.6em 0 0.9em;
  font-size: 1.3rem;
}

.prose h4 {
  margin: 2.25em 0 0.75em;
  font-size: 1.08rem;
}

.prose a {
  color: var(--sky);
  text-decoration-thickness: 0.08em;
}

.prose strong {
  color: #081525;
  font-weight: 700;
}

.prose blockquote {
  margin-right: 0;
  margin-left: 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  color: #3f5668;
  border-left: 2px solid var(--sky-bright);
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose hr {
  width: 4rem;
  margin: 4rem auto;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.prose code,
.prose pre {
  font-family: var(--utility);
  font-size: 0.88em;
}

.prose code {
  padding: 0.12em 0.35em;
  background: var(--paper-deep);
}

.prose pre {
  overflow-x: auto;
  padding: 1.25rem;
  background: var(--navy-900);
  color: #edf7ff;
  line-height: 1.65;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--body);
  font-size: 0.88rem;
}

.prose th,
.prose td {
  min-width: 8rem;
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--paper-cool);
}

.guest-gate {
  position: relative;
  margin: 4rem 0;
  padding: 2.5rem 2rem;
  background: var(--navy-900);
  color: #e8f2fa;
}

.guest-gate h2 {
  max-width: 24ch;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.guest-gate > p:not(.callout-kicker) {
  max-width: 48ch;
  margin: 0.75rem 0 1.5rem;
  color: #b8c8d6;
}

.guest-gate__drop {
  position: absolute;
  width: 1rem;
  height: 1.4rem;
  background: #55b9ea;
  border-radius: 55% 55% 58% 58%;
  transform: rotate(45deg);
}

.quiet-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  margin-left: 1rem;
  color: #8ed5f6;
  font-size: 0.85rem;
}

.completion-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin: 5rem 0 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.completion-panel h2 {
  font-size: 1.35rem;
}

.completion-panel > div > p:last-child {
  max-width: 48ch;
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.completion-button {
  display: inline-flex;
  min-width: 9rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--sky);
  background: transparent;
  color: var(--sky);
  cursor: pointer;
}

.completion-status {
  grid-column: 1 / -1;
  min-height: 1.5em;
  margin: 0;
  color: var(--success);
  font-size: 0.8rem;
}

/* Error and missing states */
.state-shell {
  min-height: 100vh;
}

.state-main {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(3rem, 8vw, 7rem);
  overflow: hidden;
}

/* 認証エラー等、やり直し・参加・帰還の複数導線を持つ状態画面 */
.state-main .state-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.state-main h1 {
  max-width: 18ch;
  margin-top: 1.25rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.25;
}

.state-main > p:not(.state-code) {
  max-width: 45ch;
  margin: 1rem 0 1.75rem;
  color: var(--ink-soft);
}

.state-ripple {
  position: absolute;
  z-index: -1;
  top: 18%;
  right: 10%;
  width: clamp(8rem, 24vw, 18rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.state-ripple::before,
.state-ripple::after {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.state-ripple::before {
  inset: 18%;
}

.state-ripple::after {
  inset: 38%;
  border-color: var(--sky-bright);
}

@media (max-width: 75rem) {

  .article-outline {
    display: none;
  }

  /* 面の作り（丸パネル・余白）はapp.css新層が持つ。ここは表示切り替えだけ。 */
  .mobile-outline {
    display: block;
  }

  .mobile-outline summary {
    display: flex;
    min-height: 3rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
  }

  .mobile-outline summary::after {
    content: "+";
    color: var(--sky);
    font-size: 1.25rem;
  }

  .mobile-outline[open] summary::after {
    content: "−";
  }

  .mobile-outline ol {
    padding-bottom: 1rem;
  }
}

@media (max-width: 60rem) {
  html {
    scroll-padding-top: 5rem;
  }

  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }

  .site-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto auto;
    min-height: calc(3.75rem + env(safe-area-inset-top));
    align-items: center;
    gap: 0.75rem;
    padding: env(safe-area-inset-top) 1rem 0;
    background: var(--navy-950);
    color: #e8f2fa;
    border-bottom: 1px solid #26374f;
  }

  .compact-brand {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  /* 旧図形ロゴ時代の縮小transformは撤去済み（テキストブランド「明鏡」を
     app.css新層の.compact-brand .brand-mark{font-size:1.12rem}が正とする） */

  .compact-brand b {
    color: #55b9ea;
  }

  .account-control--compact {
    display: none;
  }

  .site-topbar > .text-action {
    min-height: 2.75rem;
    color: #8ed5f6;
    white-space: nowrap;
  }

  .app-shell,
  .article-shell,
  .state-shell {
    display: block;
    min-height: auto;
  }
  .article-main {
    padding: 1.5rem clamp(1rem, 5vw, 2rem) 5rem;
  }

  .reading-progress i {
    top: -0.3rem;
    left: clamp(0.35rem, calc(var(--reading-progress, 0) * 1%), calc(100% - 0.9rem));
  }

  .state-main {
    min-height: calc(100vh - 7.75rem);
  }
}

@media (max-width: 40rem) {
  .library-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-field {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  }

  .search-field button {
    min-width: 4rem;
    padding: 0 0.75rem;
  }

  .resume-strip {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
  }

  .resume-link {
    padding-left: 0.75rem;
  }

  .list-heading {
    align-items: start;
  }

  .lesson-group__header {
    grid-template-columns: 3.5rem 1fr auto;
  }

  .lesson-row {
    grid-template-columns: 3.5rem 0.75rem minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 6.5rem;
  }

  .lesson-state {
    grid-column: 3;
    text-align: left;
  }

  .lesson-copy > p:not(.lesson-meta) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .article-header {
    margin: 1.5rem 0 2.25rem;
  }

  /* 375pxで本文がファーストビューに入るサイズ(10vw=37pxは4行占有で本文が沈む) */
  .article-header h1 {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  .prose h2 {
    margin-top: 3em;
  }

  .guest-gate,
  .membership-callout {
    padding: 2rem 1.25rem;
  }

  .quiet-link {
    display: flex;
    width: fit-content;
    margin: 0.75rem 0 0;
  }

  .completion-panel {
    grid-template-columns: 1fr;
  }

  .completion-button {
    justify-self: stretch;
  }

  .state-ripple {
    top: 12%;
    right: -3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-progress-meter span,
  .video-updates details[open] summary span,
  .video-progress-overview details[open] summary span,
  .video-import[open] > summary i {
    transition: none;
  }
}

@media print {
  .site-topbar,
  .bottom-nav,
  .reading-progress,
  .reading-resume,
  .completion-panel,
  .guest-gate,
  .article-outline,
  .mobile-outline {
    display: none !important;
  }

  body,
  .prose {
    background: #ffffff;
    color: #000000;
  }

  .app-shell,
  .article-shell {
    display: block;
  }

  .article-main {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .prose {
    max-width: none;
  }
}

/* Video learning views */

.video-updates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.34fr);
  gap: 1.5rem 2rem;
  margin: 2rem 0 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.video-updates__latest h2 {
  max-width: 46ch;
  margin: 0.45rem 0 0;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.55;
}

.video-updates time {
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.68rem;
}

.video-updates__latest > time {
  display: block;
  margin-top: 0.6rem;
}

.video-updates details {
  align-self: start;
}

.video-updates summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
}

.video-updates summary::-webkit-details-marker {
  display: none;
}

.video-updates details[open] summary span {
  transform: rotate(45deg);
}

.video-updates ol {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.video-updates li {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--line);
}

.video-updates li p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

.video-filters {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0.25rem 0.15rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.video-filters a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.4rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #ffffff;
}

.video-filters a:hover {
  color: var(--sky);
  border-color: var(--sky);
}

.video-progress-overview {
  display: grid;
  grid-template-columns: minmax(12rem, 0.5fr) minmax(14rem, 1fr) auto;
  gap: 1.25rem 2rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--paper-cool);
  border-left: 2px solid var(--sky);
}

.video-progress-overview h2 {
  margin: 0.3rem 0 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.video-progress-overview div > p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.video-progress-overview div > p strong {
  color: var(--ink);
  font-family: var(--utility);
}

.video-progress-meter {
  height: 0.3rem;
  overflow: hidden;
  background: var(--paper-deep);
}

.video-progress-meter span {
  display: block;
  width: calc(var(--video-progress, 0) * 1%);
  height: 100%;
  background: var(--sky-bright);
  transition: width 180ms ease-out;
}

.video-progress-overview details {
  position: relative;
}

.video-progress-overview summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--sky);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
}

.video-progress-overview summary::-webkit-details-marker {
  display: none;
}

.video-progress-overview details[open] summary span {
  transform: rotate(45deg);
}

.video-progress-overview ul {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(22rem, 80vw);
  margin: 0;
  padding: 0.75rem 1rem;
  background: #ffffff;
  box-shadow: 0 1rem 2.5rem rgb(11 20 36 / 14%);
  list-style: none;
  border: 1px solid var(--line);
}

.video-progress-overview li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.video-progress-overview li:last-child {
  border-bottom: 0;
}

.video-progress-overview li strong {
  color: var(--ink);
  font-family: var(--utility);
}

.video-ledger {
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-row {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.video-slot {
  align-self: start;
  padding-top: 0.2rem;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.69rem;
  letter-spacing: 0.05em;
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid #33475f;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 20, 36, 0.22), transparent 55%);
  content: "";
}

.video-thumbnail__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a9bece;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.video-thumbnail__play {
  position: absolute;
  z-index: 1;
  right: 0.5rem;
  bottom: 0.5rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: rgba(247, 251, 255, 0.94);
  color: var(--navy-950);
  font-size: 0.68rem;
  font-style: normal;
  border-radius: 50%;
}

.video-row.is-locked .video-thumbnail img {
  filter: saturate(0.3);
  opacity: 0.65;
}

.video-row.is-locked .video-thumbnail__play {
  color: var(--ink-soft);
}

.video-title {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 600;
  line-height: 1.5;
  text-decoration-color: transparent;
}

.video-title:hover {
  color: var(--sky);
  text-decoration-color: currentColor;
}

.video-row__copy > p:not(.video-meta) {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.35rem 0 0;
  -webkit-box-orient: vertical;
  color: var(--ink-soft);
  font-size: 0.84rem;
  -webkit-line-clamp: 2;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.68rem;
}

.video-row__state {
  color: var(--sky);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.video-row.is-locked .video-row__state {
  color: var(--ink-faint);
}

.video-row.is-watched .video-row__state,
.video-row[data-local-watched="true"] .video-row__state {
  color: var(--success);
}

.video-row.is-watched::before,
.video-row[data-local-watched="true"]::before {
  position: absolute;
  top: 50%;
  left: -0.35rem;
  width: 0.55rem;
  height: 0.75rem;
  transform: translateY(-50%) rotate(45deg);
  background: var(--sky-bright);
  content: "";
  border-radius: 55% 55% 58% 58%;
}

/* Video detail */
.video-header {
  margin: 2rem 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-strong);
}

.video-header h1 {
  max-width: 28ch;
  margin: 0.85rem 0 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.video-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 0.7rem;
}

.video-header__meta span + span::before {
  margin-right: 1.25rem;
  content: "·";
}

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #030507;
  box-shadow: 0 1.5rem 3rem rgba(11, 20, 36, 0.18);
}

.video-stage iframe,
.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-stage--locked {
  display: grid;
  min-height: 22rem;
  aspect-ratio: auto;
  place-content: center;
  justify-items: start;
  padding: clamp(2rem, 6vw, 5rem);
  color: #dce7f1;
}

.video-stage--locked::before {
  position: absolute;
  top: -8rem;
  right: -5rem;
  width: 23rem;
  height: 23rem;
  border: 1px solid #29425b;
  content: "";
  border-radius: 50%;
}

.video-stage--locked h2 {
  position: relative;
  max-width: 28ch;
  margin: 0.6rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.4;
}

.video-stage--locked > p:not(.callout-kicker) {
  position: relative;
  max-width: 50ch;
  margin: 0.75rem 0 1.5rem;
  color: #a9bece;
}

.video-stage--locked .callout-kicker {
  position: relative;
  color: #55b9ea;
}

.video-stage--locked .primary-action {
  position: relative;
}

.video-lock-mark {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  color: #6c849a;
  font-family: var(--utility);
  font-size: 1.1rem;
}

.video-resume-prompt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--paper-cool);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid var(--sky);
}

.video-resume-prompt[hidden] {
  display: none;
}

.video-resume-prompt p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.86rem;
}

.video-watch-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: center;
  margin: 2rem 0 0;
  padding: 1.5rem;
  background: var(--paper-cool);
  border-left: 2px solid var(--line-strong);
}

.video-watch-control h2 {
  margin: 0.3rem 0 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
}

.video-watch-control div > p:last-child {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.video-watch-control .completion-status {
  grid-column: 1 / -1;
}

.video-completion-button {
  min-width: 11.5rem;
}

.video-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.video-section__heading {
  display: grid;
  grid-template-columns: minmax(9rem, 0.32fr) 1fr;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.video-section__heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
}

.chapter-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.chapter-list li {
  border-bottom: 1px solid var(--line);
}

.chapter-list button {
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 4.5rem minmax(0, 1fr) 2rem;
  gap: 1rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.chapter-list button:hover {
  background: var(--paper-cool);
}

.chapter-list button span {
  color: var(--sky);
  font-family: var(--utility);
  font-size: 0.72rem;
}

.chapter-list button strong {
  font-size: 0.9rem;
}

.chapter-list button i {
  color: var(--sky);
  font-size: 0.7rem;
  font-style: normal;
  text-align: center;
}

.chapter-status,
.copy-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--success);
  font-size: 0.78rem;
}

.video-description {
  max-width: 65ch;
  color: var(--ink-soft);
}

.video-notes ul {
  display: grid;
  gap: 0;
  max-width: 70ch;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: note;
}

.video-notes li {
  position: relative;
  padding: 1.25rem 0 1.25rem 4rem;
  color: #243548;
  font-family: var(--display);
  line-height: 1.85;
  border-top: 1px solid var(--line);
  counter-increment: note;
}

.video-notes li::before {
  position: absolute;
  top: 1.45rem;
  left: 0;
  color: var(--sky);
  content: "0" counter(note);
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.video-memo label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.video-memo textarea {
  display: block;
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

.video-memo textarea::placeholder {
  color: var(--ink-faint);
}

.video-memo__status {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  color: var(--ink-faint);
  font-size: 0.75rem;
}

.video-memo__status[data-state="saved"] {
  color: var(--success);
}

.video-memo__status[data-state="error"] {
  color: var(--danger);
}

.video-bonus {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 3.5rem;
  padding: 1.5rem;
  background: var(--sky-pale);
  border-left: 3px solid var(--sky);
}

.video-bonus__mark {
  color: var(--sky);
  font-family: var(--display);
  font-size: 1.5rem;
}

.video-bonus h2 {
  margin: 0.3rem 0 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.video-bonus div > p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.prompt-section {
  padding-top: 0;
}

.prompt-section > summary {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  list-style: none;
}

.prompt-section > summary::-webkit-details-marker {
  display: none;
}

.prompt-section > summary small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--sky);
  font-family: var(--utility);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.prompt-section > summary i {
  color: var(--sky);
  font-family: var(--body);
  font-size: 1.4rem;
  font-style: normal;
  font-weight: 400;
}

.prompt-section[open] > summary i {
  transform: rotate(45deg);
}

.prompt-section__body {
  padding-bottom: 1rem;
}

.video-import {
  margin-top: 4rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.video-import > summary {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  list-style: none;
}

.video-import > summary::-webkit-details-marker {
  display: none;
}

.video-import > summary small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--sky);
  font-family: var(--utility);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.video-import > summary i {
  color: var(--sky);
  font-size: 1.35rem;
  font-style: normal;
  font-weight: 400;
}

.video-import[open] > summary i {
  transform: rotate(45deg);
}

.video-import__body {
  max-width: 46rem;
  padding: 0 0 1.5rem;
}

.video-import__body > p:first-child {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.video-import__body code {
  font-family: var(--utility);
  font-size: 0.78rem;
}

.video-import input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.video-import label:has(input:focus-visible) {
  border-radius: 0.125rem;
  box-shadow: var(--shadow-focus);
}

.video-import__status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.video-import__status[data-state="saved"] {
  color: var(--success);
}

.video-import__status[data-state="error"] {
  color: var(--danger);
}

.prompt-section pre {
  max-height: 30rem;
  overflow: auto;
  margin: 0 0 1rem;
  padding: 1.25rem;
  background: var(--paper-cool);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.86rem;
  line-height: 1.75;
  white-space: pre-wrap;
  border: 1px solid var(--line);
}

@media (max-width: 48rem) {
  .video-updates {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .video-progress-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .video-progress-overview ul {
    right: auto;
    left: 0;
  }

  .video-row__state {
    grid-column: 3;
    text-align: left;
  }

  .video-row__copy > p:not(.video-meta) {
    display: none;
  }

  .video-section__heading {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .video-bonus {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .video-bonus .secondary-action {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 40rem) {
  .video-library-main,
  .video-main {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .video-slot {
    grid-column: 1 / -1;
    padding: 0;
  }

  /* 旧: サムネ(col2)×コピー(col1)の横並び指定があったが、video-cardの縦積みレイアウト
     (grid-column: 1/-1)とgrid-rowだけ衝突してタイトルがサムネに埋まる崩れを起こしていた。
     配置はvideo-card側(勝ち層)に一本化し、ここでは指定しない。 */

  .video-meta span:nth-last-child(-n + 2) {
    display: none;
  }

  .video-stage {
    margin-right: -1rem;
    margin-left: -1rem;
  }

  .video-stage--locked {
    min-height: 24rem;
    padding: 2rem 1.25rem;
  }

  .video-watch-control {
    grid-template-columns: 1fr;
    margin-right: -1rem;
    margin-left: -1rem;
    padding: 1.5rem 1.25rem;
  }

  .video-completion-button {
    width: 100%;
  }

  .chapter-list button {
    grid-template-columns: 3.5rem minmax(0, 1fr) 1.5rem;
    gap: 0.5rem;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  .video-notes li {
    padding-left: 2.75rem;
  }

  .video-bonus {
    padding: 1.5rem 1.25rem;
  }

}

@media print {
  .video-rail,
  .video-bottom-nav,
  .video-stage,
  .video-resume-prompt,
  .video-watch-control,
  .video-import,
  .chapter-section,
  .video-pager {
    display: none !important;
  }

  .video-main {
    width: auto;
    max-width: none;
    padding: 0;
  }
}

:root {
  --navy-950: #0b1424;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --paper: #f7fbff;
  --paper-cool: #eef4fb;
  --paper-deep: #e5eef8;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #4f6076;
  --line: #d7e3ef;
  --line-strong: #b8cadb;
  --sky: #0369a1;
  --sky-bright: #0284c7;
  --sky-pale: #e0f2fe;
  --success: #047857;
  --display: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --utility: "Inter", ui-sans-serif, system-ui, sans-serif;
  --app-cloud: #eef4fb;
  --app-paper: rgb(255 255 255 / 72%);
  --app-paper-deep: #e8f1fa;
  --app-ink: #0b1424;
  --app-ink-soft: #475569;
  --app-muted: #4f6076;
  --app-line: #d7e3ef;
  --app-line-strong: #b8cadb;
  --app-water: #0284c7;
  --app-water-dark: #0369a1;
  --app-water-pale: #e0f2fe;
  --app-moss: #0369a1;
  --app-gold: #b7791f;
  --app-rail: rgb(255 255 255 / 66%);
  --app-rail-soft: #eef6ff;
  --app-focus: #0284c7;
  --app-shadow: 0 30px 90px rgb(154 169 194 / 18%);
  --app-shadow-soft: 0 18px 45px rgb(164 179 203 / 18%);
  --app-glass-border: rgb(208 223 240 / 90%);
  --app-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --app-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --app-reading: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --app-utility: "Inter", ui-sans-serif, system-ui, sans-serif;
  --app-panel-inset: 30px;
  --app-panel-inset-mobile: 22px;
  --app-panel-inset-narrow: 18px;
}

html {
  background: #e9f0f9;
}

body {
  color: var(--app-ink);
  background:
    radial-gradient(circle at 9% 4%, rgb(255 255 255 / 94%) 0 13rem, transparent 34rem),
    radial-gradient(circle at 94% 12%, rgb(214 236 251 / 82%) 0 10rem, transparent 30rem),
    radial-gradient(circle at 28% 96%, rgb(254 243 199 / 42%) 0 8rem, transparent 25rem),
    linear-gradient(180deg, #f4f9ff 0%, #e9f0f9 34%, #f2f7fd 100%);
  background-attachment: fixed;
  font-family: var(--app-ui);
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.03em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a,
button,
input,
textarea,
summary {
  -webkit-tap-highlight-color: rgb(2 132 199 / 16%);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--app-focus);
  outline-offset: 3px;
}

.skip-link {
  background: var(--app-paper);
  color: var(--app-ink);
}

/* 左レール撤去後は1カラム。gridは維持する（.article-shellが目次カラムを足すため） */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.app-bottom-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-bottom-nav {
  display: none;
}

.dashboard-main,
.learning-main,
.record-main,
.my-main {
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
  padding: 48px 0 88px;
}

.dashboard-welcome {
  min-height: 96px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--app-line);
}

.dashboard-welcome p,
.page-intro > p,
.profile-header > div > p:first-child {
  margin: 0 0 4px;
  color: var(--app-muted);
  font-size: 0.9rem;
}

.dashboard-welcome h1,
.page-intro h1 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(2rem, 4vw, 3.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.quiet-action,
.collection-more {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--app-water-dark);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.quiet-action span,
.collection-more span {
  transition: transform 160ms ease-out;
}

.quiet-action:hover span,
.collection-more:hover span {
  transform: translateX(3px);
}

.quiet-update {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 20px;
  padding: 12px 16px;
  color: var(--app-ink-soft);
  background: rgb(255 255 255 / 52%);
  border-left: 3px solid var(--app-water);
}

.quiet-update span {
  flex: none;
  color: var(--app-water-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.quiet-update p {
  margin: 0;
  font-size: 0.87rem;
}

.home-priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 24px;
  margin-top: 28px;
  align-items: stretch;
}

.resume-focus {
  position: relative;
  min-height: 264px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 8px 24px;
  padding: 34px;
  color: #f1f8f7;
  background:
    radial-gradient(circle at 87% 18%, rgb(124 207 207 / 14%) 0 2px, transparent 3px),
    linear-gradient(145deg, #143e4a, #0e2e3a);
  border-radius: 20px 6px 20px 20px;
  box-shadow: var(--app-shadow);
  overflow: hidden;
}

.resume-focus::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -68px;
  width: 220px;
  height: 220px;
  border: 1px solid rgb(123 199 201 / 17%);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgb(123 199 201 / 05%), 0 0 0 52px rgb(123 199 201 / 2.5%);
}

.profile-mark i {
  font-style: normal;
  transform: rotate(-45deg);
}

.resume-focus__body,
.resume-focus > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ui-kicker {
  margin: 0 0 8px;
  color: var(--app-water-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.resume-focus h2 {
  max-width: 22ch;
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  line-height: 1.35;
}

.resume-focus p:not(.ui-kicker) {
  margin: 10px 0 0;
  color: #b9ced0;
  font-size: 0.86rem;
}

.resume-focus__progress {
  appearance: none;
  display: block;
  width: min(320px, 100%);
  height: 4px;
  margin-top: 22px;
  border: 0;
  background: rgb(255 255 255 / 10%);
  overflow: hidden;
}

.focus-action {
  position: relative;
  z-index: 2;
  grid-column: 1;
  width: fit-content;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  color: var(--app-rail);
  background: #eaf5f3;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}

.focus-action:active {
  transform: translateY(1px);
}
.section-heading h2,
.account-panel h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 1.25rem;
  line-height: 1.3;
}
.today-step,
.learning-collection,
.notebook,
.practice-capture,
.polish-panel,
.migaki-panel,
.practice-board,
.bookmark-shelf,
.record-panel,
.course-progress,
.account-panel {
  margin-top: 56px;
}

.section-heading {
  min-height: 54px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--app-line);
}

.section-heading > a,
.section-heading > span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--app-water-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.learning-link-list {
  display: grid;
}

.learning-link {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  color: var(--app-ink);
  border-bottom: 0;
  text-decoration: none;
  transition: background-color 160ms ease-out, padding 160ms ease-out;
}

.learning-link:active {
  background: var(--app-paper-deep);
}

.learning-link__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.learning-link__copy small {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.learning-link__copy strong {
  font-size: 0.96rem;
  line-height: 1.45;
}

.learning-link__arrow,
.learning-link__status {
  color: var(--app-water-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.page-intro {
  padding: 16px 0 32px;
  border-bottom: 1px solid var(--app-line);
}

.unified-search > label {
  display: block;
  margin-bottom: 8px;
  color: var(--app-ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.unified-search > div {
  height: 56px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 8px 0 16px;
  background: var(--app-paper);
  border: 1px solid var(--app-line-strong);
  border-radius: 10px;
}

.unified-search input {
  min-width: 0;
  height: 100%;
  color: var(--app-ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
}

.unified-search input::placeholder {
  color: #6b7e84;
}

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

.unified-search button {
  min-width: 72px;
  min-height: 40px;
  color: #fff;
  background: var(--app-water-dark);
  border: 0;
  border-radius: 7px;
  font-weight: 700;
}

.format-tabs {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.format-tabs a {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--app-ink-soft);
  background: rgb(255 255 255 / 56%);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.learning-collection {
  margin-top: 48px;
}

.collection-more {
  margin-top: 12px;
}

.quiet-empty {
  margin: 0;
  padding: 24px 0;
  color: var(--app-muted);
}

.quiet-empty--large {
  margin-top: 40px;
  padding: 56px 24px;
  text-align: center;
  background: rgb(255 255 255 / 48%);
  border: 1px dashed var(--app-line-strong);
}

.quiet-empty--large h2 {
  margin: 0 0 6px;
}

/* 0件時の出口。カテゴリの棚へ静かに誘導する */
.quiet-empty__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  margin-top: 14px;
}

.quiet-empty__links a {
  color: var(--app-water-dark);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.quiet-empty__links a:hover {
  text-decoration: underline;
}

/* 検索結果のタイトル照らし。塗り潰さず、水の淡地だけ */
.learning-link__copy mark {
  color: inherit;
  background: rgb(224 242 254);
  border-radius: 3px;
  padding: 0 1px;
}

.search-more-note {
  margin: 14px 0 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

/* 更新履歴。日付の見出し+新着と同じ行リスト */
.updates-day {
  margin-top: 34px;
}

.updates-day__date {
  margin: 0 0 12px;
  font-family: var(--app-reading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.updates-back {
  display: inline-block;
  margin-top: 34px;
}
/* マイページのヘッダーは一枚の帯。名前は見出しでなく名札=段位と同じ列に収める。 */
.profile-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--app-line);
}

.profile-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: var(--app-water-dark);
  border-radius: 50%;
  font-family: var(--app-reading);
  font-size: 1.3rem;
}

.profile-header__id {
  min-width: 0;
}

.profile-header h1 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.login-panel {
  margin-top: 28px;
  padding: 32px;
  color: #fff;
  background: var(--app-rail);
  border-radius: 12px;
}

.login-panel h2 {
  margin: 0;
}
#learning-record {
  scroll-margin-top: 96px;
}
.account-panel__row,
.account-panel__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--app-line);
}

.account-panel__row p {
  margin: 3px 0 0;
  color: var(--app-muted);
  font-size: 0.75rem;
}

.account-panel__row a,
.account-panel__action .text-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--app-water-dark);
  font-weight: 700;
}

/* Existing reading and video library surfaces */
.library-main,
.video-library-main {
  width: min(1040px, calc(100% - 80px));
  margin: 0 auto;
  padding: 44px 0 96px;
}

.library-heading,
.video-library-heading {
  min-height: auto;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--app-line);
}

.library-heading > div > p,
.video-library-heading > div > p {
  color: var(--app-muted);
  font-family: var(--app-ui);
}

.library-search,
.video-library-main .library-search {
  margin-top: 28px;
}

.search-field {
  border-color: var(--app-line-strong);
  border-radius: 10px;
  background: var(--app-paper);
}

.search-field input {
  min-height: 48px;
  font-size: 16px;
}

.resume-strip,
.video-resume-strip {
  border-color: var(--app-line);
  background: var(--app-paper);
}

.resume-link {
  color: var(--app-ink);
}

.lesson-row,
.video-row {
  display: block;
  min-height: 0;
  padding: 0;
  border-color: var(--app-line);
}

.lesson-row__link {
  min-height: 112px;
  display: grid;
  grid-template-columns: 72px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 16px;
  color: var(--app-ink);
  text-decoration: none;
  transition: background-color 160ms ease-out, padding 160ms ease-out;
}

.lesson-row__link:active,
.video-row__link:active {
  background: var(--app-paper-deep);
}

.lesson-copy,
.video-row__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.lesson-title,
.video-title {
  color: var(--app-ink);
  font-family: var(--app-ui);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.lesson-summary,
.video-description-row {
  display: -webkit-box;
  color: var(--app-ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-meta,
.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--app-muted);
  font-size: 0.72rem;
}

.lesson-meta i,
.video-meta i {
  font-style: normal;
}

.lesson-state,
.video-row__state {
  color: var(--app-water-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.lesson-row[data-local-complete="true"] .lesson-state,
.lesson-row.is-complete .lesson-state,
.video-row.is-watched .video-row__state {
  color: var(--app-moss);
}

.video-row__link {
  min-height: 132px;
  display: grid;
  grid-template-columns: 58px 176px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 16px;
  color: var(--app-ink);
  text-decoration: none;
}

.video-thumbnail {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.video-filters a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--app-ink-soft);
  border-color: var(--app-line);
}

.video-main {
  width: min(980px, calc(100% - 80px));
  margin: 0 auto;
  padding: 38px 0 96px;
}

.video-main > .back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
}

.video-stage {
  margin: 0;
  background: #061217;
  border-radius: 14px;
  box-shadow: 0 24px 54px rgb(6 18 23 / 20%);
  overflow: hidden;
}

.video-header {
  margin-top: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--app-line);
}

.video-watch-control,
.completion-panel {
  border-color: var(--app-line);
  background: var(--app-paper);
  border-radius: 10px;
}

.video-section,
.video-bonus,
.prompt-section,
.video-import {
  border-color: var(--app-line);
}

.prose {
  font-size: 1rem;
  line-height: 1.85;
}

@media (max-width: 75rem) {

  .home-priority-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 60rem) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    background: var(--app-cloud);
  }

  .app-shell {
    display: block;
    min-height: 0;
  }

  .site-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(8px, env(safe-area-inset-top)) 16px 8px;
    color: #eef7f5;
    background: rgb(16 43 56 / 96%);
    border-bottom: 0;
    backdrop-filter: blur(12px);
  }

  .compact-brand {
    color: #fff;
    font-family: var(--app-reading);
    font-size: 0.94rem;
  }

  .topbar-account {
    min-width: 44px;
    min-height: 40px;
    display: grid;
    align-content: center;
    justify-items: end;
    color: #dcebea;
    text-decoration: none;
  }

  .topbar-account span {
    color: #8fafb4;
    font-size: 0.6rem;
  }

  .topbar-account strong {
    max-width: 17ch;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    min-height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px 8px env(safe-area-inset-bottom);
    background: rgb(251 253 252 / 97%);
    border-top: 1px solid var(--app-line);
    box-shadow: 0 -8px 30px rgb(16 43 56 / 08%);
    backdrop-filter: blur(14px);
  }

  .app-bottom-nav a {
    position: relative;
    min-width: 0;
    min-height: 60px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2px;
    color: #64777d;
    border: 0;
    text-decoration: none;
  }

  .app-bottom-nav a::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    width: 20px;
    height: 3px;
    background: transparent;
    border-radius: 999px;
    transform: translateX(-50%);
  }

  .app-bottom-nav a[aria-current="page"]::before {
    background: var(--app-water);
  }

  .app-bottom-nav svg {
    width: 21px;
    height: 21px;
  }

  .app-bottom-nav span {
    font-size: 0.68rem;
    font-weight: 700;
  }

  .home-page .dashboard-main {
    display: flex;
    flex-direction: column;
  }

  .dashboard-welcome {
    min-height: auto;
    align-items: center;
    padding: 4px 0 20px;
  }

  .dashboard-welcome .quiet-action {
    display: none;
  }

  .quiet-update {
    align-items: start;
    gap: 10px;
    margin-top: 16px;
  }

  .resume-focus {
    min-height: 248px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 24px 20px;
    border-radius: 16px 4px 16px 16px;
  }

  .focus-action {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }
  .today-step,
  .learning-collection,
  .notebook,
  .practice-capture,
  .polish-panel,
  .migaki-panel,
  .practice-board,
  .bookmark-shelf,
  .record-panel,
  .course-progress,
  .account-panel {
    margin-top: 36px;
  }

  .learning-link {
    min-height: 88px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 4px;
  }

  .learning-link__copy strong {
    font-size: 0.9rem;
  }

  .format-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .format-tabs::-webkit-scrollbar {
    display: none;
  }
  .profile-header {
    gap: 14px;
    padding-top: 4px;
  }

  .profile-mark {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .account-panel__row {
    align-items: start;
    flex-direction: column;
  }

  .library-heading,
  .video-library-heading {
    padding-top: 0;
  }

  .library-heading .ledger-label {
    display: none;
  }

  .lesson-row__link {
    min-height: 104px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px 4px;
  }

  .lesson-row__link .lesson-slot,
  .video-row__link .video-slot {
    display: none;
  }

  .video-description-row {
    display: none;
  }

  .video-main > .back-link {
    margin-bottom: 8px;
  }

  .video-header {
    margin-top: 22px;
  }

  .video-watch-control,
  .completion-panel {
    width: auto;
    margin-inline: 0;
    border-radius: 8px;
  }

  .article-main {
    padding-bottom: 32px;
  }
}

@media (max-width: 25rem) {
  .learning-link__status {
    display: none;
  }
}

/* Official Meikyou brand rules mirror the public brand site while preserving
   the learning IA and controls. */

::selection {
  color: var(--app-ink);
  background: #bae6fd;
}

.brand-mark {
  position: static;
  width: auto;
  height: auto;
  display: inline-block;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  line-height: 1;
  white-space: nowrap;
}
/* 唯一のナビゲーション。左レール撤去にともない、上部バーが全幅で主要メニューを持つ。
   モバイルでは .topbar-nav を畳み、下部ナビが同じ4項目を担う（下の@media 60rem）。 */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 66px;
  padding: 10px clamp(20px, 4vw, 44px);
  color: var(--app-ink);
  background: rgb(255 255 255 / 84%);
  border-bottom: 1px solid var(--app-line);
  backdrop-filter: blur(20px);
}

.compact-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-ink);
  font-family: var(--app-ui);
  text-decoration: none;
}

.compact-brand .brand-mark {
  font-size: 1.14rem;
}

/* α版チップ（正式版で撤去。DESIGN_DIRECTION.md シグネチャー） */
.compact-brand__alpha {
  padding: 3px 10px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}

.topbar-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.87rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 999px;
  transition: color 160ms ease-out, background 160ms ease-out;
}

.topbar-nav a:hover {
  color: var(--app-ink);
  background: rgb(224 242 254 / 55%);
}

.topbar-nav a[aria-current="page"] {
  color: var(--app-water-dark);
  font-weight: 700;
  background: rgb(224 242 254 / 78%);
}

.topbar-account {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  color: var(--app-ink);
  font-size: 0.8rem;
  text-decoration: none;
  background: rgb(255 255 255 / 58%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.topbar-account span {
  color: var(--app-muted);
  white-space: nowrap;
}

.topbar-account strong {
  max-width: 14ch;
  overflow: hidden;
  color: var(--app-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-bottom-nav svg {
  stroke-width: 1.55;
}
/* 種別タブはPCでも出す。以前はレールの「学ぶ」アコーディオンが同じ役目を持っていたため
   60rem超で隠していたが、レール撤去でこのタブが唯一の切り替え手段になった。 */
.dashboard-main,
.learning-main,
.record-main,
.my-main {
  width: min(1120px, calc(100% - 88px));
  padding: 62px 0 104px;
}

.dashboard-welcome {
  min-height: 120px;
  padding-bottom: 30px;
  border-bottom-color: rgb(203 220 238 / 80%);
}

.dashboard-welcome p,
.page-intro > p,
.profile-header > div > p:first-child {
  color: var(--app-muted);
  font-size: 0.9rem;
}

.dashboard-welcome h1,
.page-intro h1 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.55;
}

.ui-kicker,
.library-heading .ledger-label,
.section-index,
.video-header .article-number {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.quiet-action,
.collection-more {
  min-height: 44px;
  color: var(--app-water-dark);
  font-weight: 700;
}

/* 講座棚。テーマ別講座が横型コンパクトカード(左=水彩サムネ・右=題とメタ)で増えていく。
   バナー資産(1200x675)はサムネとして左端に立てる。 */
.course-shelf {
  margin-top: 14px;
}

.course-shelf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(430px, 100%), 1fr));
  gap: 12px;
  margin-top: 16px;
}

/* 棚のカテゴリ束ね(4分類)。台帳=COURSE_CATEGORIES。
   scroll-margin=棚札ナビ(sticky)と上部バーの陰に見出しが隠れないための着地余白 */
.course-shelf__band {
  margin-top: 28px;
  scroll-margin-top: 132px;
}

.course-shelf__band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding-top: 18px;
  border-top: 1px solid var(--app-line);
}

.course-shelf__band-head h2 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.course-shelf__band-head p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

.course-card {
  display: flex;
  overflow: hidden;
  align-items: stretch;
  min-height: 108px;
  text-decoration: none;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 16px;
  transition: border-color 160ms ease-out;
}

.course-card:hover,
.course-card:focus-visible {
  border-color: var(--app-water-dark);
}

/* サムネ帯。バナーのモチーフは右1/3寄せの型なので、切り出しも右寄りに */
.course-card__banner {
  position: relative;
  overflow: hidden;
  display: block;
  flex: none;
  width: 128px;
}

.course-card__banner img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
  border-right: 1px solid rgb(208 223 240 / 70%);
}

/* 有料講座の金札。金はロック・購入者限定バッジ限定の正典規約(DESIGN_DIRECTION.md) */
.course-card__badge {
  padding: 2px 10px;
  color: var(--app-gold);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: 1px solid rgb(183 121 31 / 45%);
  border-radius: 999px;
}

.course-card__body {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 14px 18px;
}

.course-card__body h3 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* 自分の歩み。読み始めた講座だけ静かな一行。完走は✓ひとつ=祝わない */
.course-card__progress {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.course-card__progress--done {
  color: var(--app-ink);
}

/* 完走→次の講座ブリッジ。講座ページの「はじめ方」の座を完走後に引き継ぐ */
.course-bridge {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.course-bridge__copy h2 {
  margin: 4px 0 6px;
  font-size: 1.15rem;
}

.course-bridge__copy p:last-child {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.course-bridge__next {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  color: var(--app-ink);
  text-decoration: none;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 16px;
  transition: border-color 160ms ease-out;
}

.course-bridge__next:hover,
.course-bridge__next:focus-visible {
  border-color: var(--app-water-dark);
}

.course-bridge__art img {
  display: block;
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.course-bridge__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.course-bridge__body strong {
  font-family: var(--app-reading);
  font-size: 0.98rem;
  font-weight: 600;
}

.course-bridge__body small {
  color: var(--app-muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.course-bridge__next > i {
  color: var(--app-water-dark);
  font-style: normal;
  font-weight: 700;
}

.course-card__body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.course-card__body small {
  color: var(--app-water-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

/* 今日の一磨き。1日1枚だけの入口。祝わない・並べない。 */
.polish-panel__done {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

.polish-card {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 22px 24px;
  text-decoration: none;
  background: rgb(255 255 255 / 66%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 18px;
  transition: border-color 160ms ease-out;
}

.polish-card:hover,
.polish-card:focus-visible {
  border-color: var(--app-water-dark);
}

.polish-card__label {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.polish-card__title {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
}

.polish-card__action {
  color: var(--app-water-dark);
  font-size: 0.85rem;
  font-weight: 700;
}

/* 磨き暦。この1年が和紙に水色の濃淡で染まる。数字は「今月・連続」の一行だけ。 */
.migaki-panel__summary {
  margin: 0;
  color: var(--app-ink-soft);
  font-size: 0.85rem;
}

.migaki-cal {
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 6px;
}

.migaki-cal__grid {
  display: flex;
  gap: 3px;
  width: max-content;
}

.migaki-cal__week {
  display: grid;
  grid-template-rows: 16px repeat(7, 11px);
  gap: 3px;
}

.migaki-cal__month {
  height: 16px;
  overflow: visible;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  white-space: nowrap;
}

.migaki-cal__day {
  width: 11px;
  height: 11px;
  background: rgb(11 20 36 / 6%);
  border-radius: 3px;
}

.migaki-cal__day--void {
  background: transparent;
}

.migaki-cal__day--l1 {
  background: rgb(3 105 161 / 24%);
}

.migaki-cal__day--l2 {
  background: rgb(3 105 161 / 50%);
}

.migaki-cal__day--l3 {
  background: rgb(3 105 161 / 78%);
}

/* 会員段位。祝祭にしない: 明朝の段位名+静かな素点一行(金・バー・アニメ禁止)。
   ヘッダー帯の右肩に寄せる(モバイルは名前の下へ折り返し・左寄せ)。 */
.profile-rank {
  display: grid;
  gap: 3px;
  margin-left: auto;
  text-align: right;
}

.profile-rank__title {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.9rem;
}

.profile-rank__title strong {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.profile-rank__score {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.72rem;
  font-weight: 600;
}

.profile-rank__meta,
.profile-rank__next {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

/* マイページ2カラム。主役=学習の記録(左)。磨き暦・実践・ブックマークは脇(右)。
   モバイルは主→脇の順で1カラムに畳む(下の@media 60rem)。 */
.my-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.56fr);
  gap: 28px;
  align-items: start;
  margin-top: 30px;
}

.my-grid__main,
.my-grid__side {
  min-width: 0;
  display: grid;
  gap: 28px;
}

/* パネルはグリッドアイテム=min-width:autoのままだと中身のmin-content
   (磨き暦のmax-contentグリッド等)で列幅を突き破る。0で列に従わせる */
.my-grid section {
  min-width: 0;
  margin-top: 0;
}

/* 学習の記録。直近の教材へ戻る行。動画はサムネ+再生位置バー+「◯分地点から観る」。 */
.record-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--app-line);
}

.record-row:has(.record-row__thumb) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.record-row:last-child {
  border-bottom: 0;
}

.record-row__thumb {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 8px;
}

.record-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-row__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.record-row__copy small {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.record-row__title {
  color: var(--app-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.record-row__title:hover,
.record-row__title:focus-visible {
  color: var(--app-water-dark);
}

.record-row__resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 3px;
}

.record-row__resume progress,
.course-progress__main progress {
  appearance: none;
  flex: none;
  width: 120px;
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: rgb(186 230 253 / 55%);
  overflow: hidden;
}

.record-row__resume progress::-webkit-progress-bar,
.course-progress__main progress::-webkit-progress-bar {
  background: rgb(186 230 253 / 55%);
  border-radius: 999px;
}

.record-row__resume progress::-webkit-progress-value,
.course-progress__main progress::-webkit-progress-value {
  background: var(--app-water-dark);
  border-radius: 999px;
}

.record-row__resume progress::-moz-progress-bar,
.course-progress__main progress::-moz-progress-bar {
  background: var(--app-water-dark);
  border-radius: 999px;
}

.record-row__resume .text-action {
  font-size: 0.78rem;
}

.record-row__status {
  flex: none;
  color: var(--app-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.record-row__status.is-done {
  color: var(--app-water-dark);
}

/* 受講中の講座。x/nと細い現在地バーだけ。完走は静かな✓の一行=祝わない。 */
.course-progress__list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.course-progress__row {
  padding: 14px 4px;
  border-bottom: 1px solid var(--app-line);
}

.course-progress__row:last-child {
  border-bottom: 0;
}

.course-progress__main {
  display: grid;
  gap: 8px;
  text-decoration: none;
}

.course-progress__main progress {
  width: 100%;
}

.course-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.course-progress__head strong {
  min-width: 0;
  color: var(--app-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.course-progress__main:hover .course-progress__head strong,
.course-progress__main:focus-visible .course-progress__head strong {
  color: var(--app-water-dark);
}

.course-progress__head small {
  flex: none;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.75rem;
  font-weight: 600;
}

.course-progress__next {
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-progress__finished {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 16px 0 0;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.course-progress__finished a {
  color: var(--app-ink-soft);
  text-decoration: none;
}

.course-progress__finished a:hover {
  color: var(--app-water-dark);
}

.notebook__more {
  margin-top: 14px;
}

.account-panel__note {
  margin: 14px 0 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

.quiet-update {
  gap: 12px;
  margin-top: 22px;
  padding: 14px 20px;
  color: var(--app-ink-soft);
  background: rgb(239 246 255 / 80%);
  border: 1px solid #bae6fd;
  border-left-width: 1px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgb(37 99 235 / 9%);
}

.quiet-update span {
  color: var(--app-water-dark);
}

.quiet-update p {
  line-height: 1.8;
}

.home-priority-grid {
  gap: 22px;
  margin-top: 30px;
}

.resume-focus {
  min-height: 284px;
  color: var(--app-ink);
  background:
    radial-gradient(circle at 92% 5%, rgb(224 242 254 / 88%), transparent 42%),
    radial-gradient(circle at 76% 110%, rgb(254 243 199 / 56%), transparent 38%),
    var(--app-paper);
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: 32px;
  box-shadow: 0 24px 120px rgb(166 177 204 / 22%);
  backdrop-filter: blur(30px);
}

.resume-focus::after {
  right: -76px;
  bottom: -104px;
  width: 270px;
  height: 270px;
  border-color: rgb(14 165 233 / 13%);
  box-shadow: 0 0 0 28px rgb(255 255 255 / 18%), 0 0 0 58px rgb(14 165 233 / 3%);
}

.profile-mark i {
  transform: none;
}

.resume-focus .ui-kicker {
  color: var(--app-water-dark);
}

.resume-focus h2 {
  max-width: 22ch;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.65;
}

.resume-focus p:not(.ui-kicker) {
  color: var(--app-muted);
}

.resume-focus__progress,
.waterline-total {
  background: rgb(186 230 253 / 48%);
  border-radius: 999px;
}

.resume-focus__progress::-webkit-progress-bar,
.waterline-total::-webkit-progress-bar {
  background: rgb(186 230 253 / 48%);
  border-radius: 999px;
}

.resume-focus__progress::-webkit-progress-value,
.waterline-total::-webkit-progress-value {
  background: linear-gradient(90deg, #1e40af, #2563eb 52%, #0ea5e9);
  border-radius: 999px;
}

.resume-focus__progress::-moz-progress-bar {
  background: #2563eb;
  border-radius: 999px;
}

.focus-action,
.primary-action,
.state-main .primary-action {
  min-height: 50px;
  color: var(--app-ink);
  background: linear-gradient(180deg, #fff, var(--app-rail-soft));
  border: 1px solid rgb(186 230 253 / 92%);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgb(134 160 199 / 22%);
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: transform 220ms var(--app-ease), box-shadow 220ms var(--app-ease), background-color 220ms var(--app-ease);
}

.focus-action:hover,
.primary-action:hover,
.state-main .primary-action:hover {
  color: var(--app-ink);
  background: #fff;
  box-shadow: 0 22px 60px rgb(134 160 199 / 30%);
  transform: translateY(-2px);
}

.focus-action span,
.primary-action span {
  color: var(--app-water);
}

.resume-focus--empty {
  background:
    radial-gradient(circle at 92% 5%, rgb(224 242 254 / 88%), transparent 42%),
    var(--app-paper);
}

.notebook,
.practice-capture,
.polish-panel,
.migaki-panel,
.practice-board,
.bookmark-shelf,
.record-panel,
.course-progress,
.account-panel,
.resume-strip,
.video-watch-control,
.completion-panel,
.article-outline,
.mobile-outline,
.membership-callout,
.guest-gate,
.video-section,
.video-bonus,
.prompt-section,
.video-import {
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 28px;
  box-shadow: var(--app-shadow-soft);
  backdrop-filter: blur(22px);
}

.video-bonus {
  margin-inline: 0;
}
.section-heading h2,
.account-panel h2 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.65;
}

.section-heading > a,
.section-heading > span {
  color: var(--app-water-dark);
}
.section-heading {
  min-height: 62px;
  padding-bottom: 18px;
  border-bottom-color: rgb(255 255 255 / 90%);
}

.learning-link {
  min-height: 92px;
  margin-inline: -10px;
  padding: 16px 10px;
  color: var(--app-ink);
  border-bottom-color: rgb(255 255 255 / 90%);
  border-radius: 18px;
  border-bottom: 0;
  transition: background-color 220ms var(--app-ease), box-shadow 220ms var(--app-ease), transform 180ms var(--app-ease);
}

.learning-link:hover {
  padding-inline: 10px;
  background: rgb(255 255 255 / 70%);
  box-shadow: 0 14px 36px rgb(154 169 194 / 14%);
  transform: translateY(-1px);
}

.learning-link__copy small,
.learning-link__copy strong,
.learning-link__arrow,
.learning-link__status {
  color: inherit;
}

.learning-link__copy small {
  color: var(--app-muted);
  font-family: var(--app-utility);
}

.learning-link__arrow,
.learning-link__status {
  color: var(--app-water-dark);
}

.page-intro {
  padding: 18px 0 38px;
  border-bottom-color: rgb(255 255 255 / 82%);
}

.page-intro > .ui-kicker {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 18px;
  background: rgb(255 255 255 / 56%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgb(162 175 200 / 14%);
}

.page-intro > p:last-child {
  color: var(--app-muted);
  line-height: 2.1;
}

.unified-search > label,
.library-search > label {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.unified-search > div,
.search-field {
  min-height: 58px;
  background: var(--app-paper);
  border: 1px solid rgb(255 255 255 / 88%);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgb(164 179 203 / 14%);
  backdrop-filter: blur(18px);
}

.unified-search button,
.search-field button {
  min-height: 44px;
  color: var(--app-ink);
  background: linear-gradient(180deg, #fff, var(--app-rail-soft));
  border: 1px solid rgb(186 230 253 / 90%);
  border-radius: 999px;
}

.unified-search > div:focus-within,
.search-field:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgb(186 230 253 / 72%), 0 18px 45px rgb(134 160 199 / 18%);
}

.format-tabs a,
.video-filters a {
  min-height: 44px;
  color: var(--app-muted);
  background: rgb(255 255 255 / 50%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 999px;
}

.format-tabs a[aria-current="page"],
.video-filters a[aria-current="page"] {
  color: var(--app-water-dark);
  background: linear-gradient(180deg, #fff, var(--app-rail-soft));
  border-color: rgb(186 230 253 / 92%);
  box-shadow: 0 12px 30px rgb(134 160 199 / 16%);
}

.quiet-empty--large {
  background: rgb(255 255 255 / 48%);
  border: 1px dashed var(--app-line-strong);
  border-radius: 28px;
}

.notebook,
.practice-capture,
.polish-panel,
.migaki-panel,
.practice-board,
.bookmark-shelf,
.record-panel,
.course-progress,
.account-panel {
  padding: 30px;
}
.account-panel__row,
.account-panel__action {
  border-bottom-color: rgb(255 255 255 / 90%);
}
.profile-header {
  border-bottom-color: rgb(255 255 255 / 84%);
}

.profile-mark {
  width: 56px;
  height: 56px;
  color: var(--app-water-dark);
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(186 230 253 / 92%);
  border-radius: 50%;
  transform: none;
  box-shadow: inset 0 0 0 5px rgb(240 249 255 / 62%), 0 12px 30px rgb(134 160 199 / 16%);
}

/* Discordアバター。汎用の一文字印より後で円形画像の契約を確定する。 */
.profile-mark--avatar {
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: none;
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 50%;
  transform: none;
  box-shadow: none;
}

.profile-mark--avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-panel {
  color: var(--app-ink);
  background: rgb(255 255 255 / 64%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 28px;
  box-shadow: var(--app-shadow-soft);
}

.login-panel p {
  color: var(--app-muted);
}
.account-panel__row a,
.account-panel__action .text-action {
  color: var(--app-water-dark);
}

/* 白パネル上の会員名。旧レール(暗地)用の淡青白 #dce7f1 を墨に正す。 */
.account-name {
  color: var(--app-ink);
  font-weight: 500;
}

/* 保有ロール。静かなチップ(名前のみ・色の誇示なし)。 */
.account-roles {
  flex-wrap: wrap;
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-chips li {
  padding: 6px 14px;
  color: var(--app-ink-soft);
  font-size: 0.78rem;
  background: rgb(255 255 255 / 55%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 999px;
}

.library-main,
.video-library-main {
  width: min(1060px, calc(100% - 88px));
  padding: 58px 0 104px;
}

.library-heading,
.video-library-heading {
  padding: 12px 0 36px;
  border-bottom-color: rgb(203 220 238 / 80%);
}

.library-heading h1,
.video-library-heading h1 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(2.15rem, 4.5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.55;
}

.library-heading > div > p,
.video-library-heading > div > p {
  color: var(--app-muted);
}

.resume-strip {
  padding: 28px;
}

.lesson-group,
.video-group {
  overflow: hidden;
  background: rgb(255 255 255 / 34%);
  border: 1px solid rgb(255 255 255 / 74%);
  border-radius: 24px;
}

.lesson-group__header,
.list-heading {
  border-color: rgb(210 225 240 / 80%);
}

.lesson-group__header h2,
.list-heading h2 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.035em;
}

.lesson-row,
.video-row {
  border-color: rgb(255 255 255 / 88%);
}

.lesson-drop {
  width: 10px;
  height: 10px;
  background: var(--app-paper);
  border-color: var(--app-line-strong);
  border-radius: 50%;
  transform: none;
}

.lesson-drop::before,
.lesson-drop::after {
  left: 4px;
  background: var(--app-line);
  transform: none;
}

.lesson-row__link,
.video-row__link {
  color: var(--app-ink);
  transition: background-color 220ms var(--app-ease), transform 180ms var(--app-ease);
}

.lesson-row__link:hover,
.video-row__link:hover {
  background: var(--app-rail);
}

.lesson-title,
.video-title {
  color: var(--app-ink);
}

.lesson-summary,
.video-description-row,
.lesson-meta,
.video-meta {
  color: var(--app-muted);
}

.lesson-state,
.video-row__state,
.resume-link span {
  color: var(--app-water-dark);
}

.video-thumbnail {
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgb(154 169 194 / 18%);
}

.video-main {
  width: min(980px, calc(100% - 88px));
  padding: 48px 0 104px;
}

.video-stage {
  background: #06101d;
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgb(30 64 175 / 16%);
}

.video-header {
  border-bottom-color: rgb(255 255 255 / 84%);
}

.video-header h1 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.55;
}

.video-header__meta {
  color: var(--app-muted);
}

.video-watch-control,
.completion-panel,
.video-section,
.video-bonus,
.prompt-section,
.video-import {
  border-radius: 24px;
}

.completion-button {
  min-height: 52px;
  color: var(--app-water-dark);
  border-color: #7dd3fc;
  border-radius: 999px;
}

.completion-button.is-complete {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.video-section__heading h2,
.chapter-list strong {
  color: var(--app-ink);
  font-family: var(--app-reading);
  letter-spacing: 0.025em;
}

.article-main {
  color: var(--app-ink);
}

.article-shell {
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem);
}

.article-outline {
  top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 16px 16px 0;
  padding: 30px 18px;
}

/* 読んでいる節を目次で示す（site.jsのinitOutlineSpyが付与） */
.article-outline a.is-active {
  color: var(--app-water-dark);
  border-left-color: var(--app-water-dark);
  font-weight: 700;
}

.reading-progress {
  top: 32px;
  bottom: 32px;
  left: 0;
  background: var(--app-line);
}

.reading-progress i {
  display: none;
}

.article-header {
  border-color: rgb(203 220 238 / 80%);
}

.article-header h1,
.prose h1,
.prose h2,
.prose h3 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.65;
}

.article-lead,
.article-meta,
.prose {
  color: var(--app-ink-soft);
}

.prose {
  font-family: var(--app-ui);
  line-height: 2.05;
}

.prose a,
.back-link,
.quiet-link,
.secondary-action {
  color: var(--app-water-dark);
}

.article-lecture {
  margin: 40px 0 56px;
  padding: 0 0 42px;
  border-top: 0;
  border-bottom: 1px solid rgb(203 220 238 / 80%);
}

.article-lecture__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.65fr);
  gap: 6px 32px;
  margin-bottom: 24px;
}

.article-lecture__heading .section-index {
  grid-column: 1 / -1;
  margin: 0;
}

.article-lecture__heading h2 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.article-lecture__heading > p:last-child {
  align-self: end;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.article-lecture__items {
  display: grid;
  gap: 40px;
}

.article-lecture__item {
  margin: 0;
}

.article-lecture__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;

  /* スライドは白地。暗地だとaspect-ratio起因の1px隙間が黒線・四隅の黒弧に見える */
  background: transparent;
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 24px;
  box-shadow: 0 26px 72px rgb(30 64 175 / 16%);
}

/* aspect-ratioは枠線込みで効くため中身が正確に16:9にならず、
   プレイヤーの黒地が縁に1px漏れる（角丸の四隅では黒い弧に見える）。
   .prose版(iOS講座)と同じく1px外周を切り落として隠す */
.article-lecture__frame iframe {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  margin: -1px;
  display: block;
  border: 0;
}

/* R2配信のネイティブプレーヤー。iframeと違い黒地の縁漏れは起きない */
.article-lecture__frame video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
  background: transparent;
}

.article-lecture__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px 0;
}

.article-lecture__caption > div {
  min-width: 0;
}

.article-lecture__caption p {
  margin: 0 0 2px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.article-lecture__caption h3 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.6;
}

.article-lecture__caption div > span {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.article-lecture__caption > a {
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: var(--app-water-dark);
  background: rgb(255 255 255 / 58%);
  border: 1px solid rgb(186 230 253 / 84%);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.article-lecture__caption > a:hover {
  background: #fff;
  transform: translateY(-1px);
}

.article-lecture-empty {
  margin: 32px 0 48px;
  padding: 20px 22px;
  color: var(--app-ink-soft);
  background: rgb(255 255 255 / 38%);
  border: 1px solid rgb(255 255 255 / 76%);
  border-radius: 22px;
}

.article-lecture-empty p,
.article-lecture-empty strong {
  margin: 0;
}

.article-lecture-empty strong {
  display: block;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
}

.article-lecture-empty div > p:last-child {
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.meikyou-article-gate {
  margin-top: 36px;
}

.preview-gate-page {
  color: var(--app-ink);
  background:
    radial-gradient(circle at 86% 12%, rgb(224 242 254 / 86%), transparent 38%),
    radial-gradient(circle at 20% 92%, rgb(254 243 199 / 46%), transparent 34%),
    linear-gradient(180deg, var(--paper), var(--app-cloud) 45%, #f8fbff);
}

.preview-gate__brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: var(--app-ink);
}

.preview-gate__brand-sub {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.preview-gate__panel {
  color: var(--app-ink);
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: 32px;
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(26px);
}

.preview-gate__panel h1 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  letter-spacing: 0.04em;
}

.preview-gate__panel > p:not(.section-index) {
  color: var(--app-muted);
}

.state-main,
.empty-state {
  color: var(--app-ink);
}

.state-ripple {
  width: 20rem;
  height: 20rem;
  background: rgb(224 242 254 / 64%);
  border: 0;
  filter: blur(56px);
  opacity: 0.75;
}

.state-ripple::before,
.state-ripple::after {
  display: none;
}

.guest-gate,
.membership-callout {
  margin-inline: 0;
  color: var(--app-ink);
}

.guest-gate > p:not(.callout-kicker) {
  color: var(--app-muted);
}

.guest-gate__drop {
  top: 30px;
  right: 30px;
  width: 54px;
  height: 54px;
  background: rgb(255 255 255 / 48%);
  border: 1px solid rgb(186 230 253 / 90%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgb(240 249 255 / 58%), 0 14px 34px rgb(134 160 199 / 16%);
  transform: none;
}

.guest-gate .callout-kicker,
.guest-gate h2 {
  padding-right: 72px;
}

@media (max-width: 40rem) {
  .guest-gate__drop {
    top: 22px;
    right: 22px;
  }
}

.video-stage--locked {
  color: #e7f1fb;
  background: linear-gradient(145deg, var(--app-ink), #13243b);
}

.video-stage--locked::before {
  border-color: rgb(125 211 252 / 18%);
  box-shadow: 0 0 0 32px rgb(255 255 255 / 2.5%), 0 0 0 64px rgb(14 165 233 / 3%);
}

.video-stage--locked > p:not(.callout-kicker) {
  color: #c1cfdd;
}

.video-stage--locked .callout-kicker,
.video-lock-mark {
  color: #7dd3fc;
}

/* Three-track learning library */
.learning-collection {
  position: relative;
  padding: 30px;
  background: rgb(255 255 255 / 54%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 30px;
  box-shadow: 0 20px 56px rgb(142 164 194 / 12%);
  scroll-margin-top: 32px;
  overflow: hidden;
}

.learning-collection::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #67c4d4;
  opacity: 0.72;
}

.learning-collection--video::before {
  background: #729ed6;
}

.learning-collection--meikyou {
  background:
    radial-gradient(circle at 100% 0%, rgb(191 219 254 / 36%), transparent 24rem),
    rgb(249 252 255 / 66%);
}

.learning-collection--meikyou::before {
  background: #274f7b;
}

.learning-collection--standalone {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.learning-collection--standalone::before {
  display: none;
}

.learning-collection--standalone .meikyou-chapter-list {
  margin-top: 0;
}

.learning-collection__heading {
  align-items: start;
}

.learning-collection__heading h2 {
  margin: 2px 0 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.55;
}

.learning-collection__heading div > p:last-child {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.learning-collection__notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 4px;
  padding: 14px 16px;
  color: var(--app-ink-soft);
  background: rgb(240 249 255 / 68%);
  border: 1px solid rgb(186 230 253 / 76%);
  border-radius: 14px;
}

.learning-collection__notice p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.65;
}

.learning-collection__notice a,
.collection-sub-link {
  flex: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--app-water-dark);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

/* noticeの導線が2本あるとき(購入リンク+ログイン)の縦積み */
.learning-collection__notice-actions {
  flex: none;
  display: grid;
  gap: 2px;
  justify-items: end;
  white-space: nowrap;
}

.learning-gate {
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  color: var(--app-ink);
  background: linear-gradient(135deg, rgb(238 246 255 / 76%), rgb(255 255 255 / 56%));
  border: 1px solid rgb(196 215 235 / 82%);
  border-radius: 18px;
}

.learning-gate__copy {
  min-width: 0;
}

.learning-gate__copy h3 {
  margin: 2px 0 0;
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.learning-gate__copy > p:last-child {
  margin: 4px 0 0;
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.65;
}

.learning-gate > a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  color: #fff;
  background: #214f78;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.collection-sub-link {
  width: fit-content;
  margin-top: 10px;
}

.meikyou-chapter-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.meikyou-chapter {
  padding: 0;
  overflow: hidden;
  background: rgb(255 255 255 / 38%);
  border: 0;
  border-radius: 20px;
}

.meikyou-chapter[open] {
  background: rgb(255 255 255 / 56%);
  box-shadow: 0 12px 32px rgb(134 160 199 / 8%);
}

.meikyou-chapter__summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}

.meikyou-chapter__summary::-webkit-details-marker {
  display: none;
}

.meikyou-chapter__summary:hover {
  background: rgb(255 255 255 / 44%);
}

.meikyou-chapter__summary strong {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
}

.meikyou-chapter__summary span,
.meikyou-locked-outline strong {
  flex: none;
  color: var(--app-water-dark);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.meikyou-chapter__summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--app-water-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 160ms var(--app-ease);
}

.meikyou-chapter[open] .meikyou-chapter__summary svg {
  transform: rotate(180deg);
}

.meikyou-chapter .learning-link-list {
  padding: 0 12px 12px;
}

.meikyou-chapter .learning-link {
  min-height: 72px;
  padding-block: 10px;
}

.meikyou-locked-outline {
  display: grid;
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
  background: rgb(191 219 254 / 54%);
  border: 1px solid rgb(191 219 254 / 54%);
  border-radius: 16px;
  list-style: none;
}

.meikyou-locked-outline li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 15px;
  color: var(--app-muted);
  background: rgb(255 255 255 / 74%);
  font-size: 0.76rem;
}

.senseki-mail-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 22px 0 4px;
  padding: 18px;
  background: rgb(240 249 255 / 66%);
  border: 1px solid rgb(186 230 253 / 78%);
  border-radius: 18px;
}

.senseki-mail-guide h3 {
  margin: 3px 0 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.02rem;
  font-weight: 600;
}

.senseki-mail-guide p:last-child {
  margin: 4px 0 0;
  color: var(--app-muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.senseki-mail-guide > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--app-water-dark);
  border: 1px solid rgb(125 211 252 / 72%);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.senseki-mail-guide > a:hover {
  background: rgb(255 255 255 / 78%);
}

.senseki-curriculum {
  margin-top: 30px;
}

.senseki-section-index {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 14px 16px;
  background: rgb(255 255 255 / 28%);
  border-radius: 14px;
}

.senseki-section-index > span {
  padding-top: 8px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.senseki-section-index > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.senseki-section-index a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--app-water-dark);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.senseki-section-index a:hover {
  color: var(--app-ink);
  background: rgb(255 255 255 / 64%);
}

.senseki-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.senseki-section {
  display: block;
  overflow: hidden;
  padding: 0;
  background: rgb(255 255 255 / 24%);
  border: 0;
  border-radius: 16px;
  scroll-margin-top: 96px;
}

.senseki-section[open] {
  background: rgb(255 255 255 / 46%);
  box-shadow: 0 12px 32px rgb(134 160 199 / 8%);
}

.senseki-section__summary {
  min-height: 76px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms var(--app-ease);
}

.senseki-section__summary::-webkit-details-marker {
  display: none;
}

.senseki-section__summary:hover {
  background: rgb(255 255 255 / 54%);
}

.senseki-section__index {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-variant-numeric: tabular-nums;
}

.senseki-section__index small {
  color: var(--app-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.senseki-section__index strong {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.senseki-section__title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.senseki-section__title > strong {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.65;
}

.senseki-section__title > small {
  flex: none;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.senseki-section__chevron {
  width: 16px;
  height: 16px;
  justify-self: end;
  fill: none;
  stroke: var(--app-water-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 160ms var(--app-ease);
}

.senseki-section[open] .senseki-section__chevron {
  transform: rotate(180deg);
}

.senseki-lesson-list {
  min-width: 0;
  margin: 0;
  padding: 0 16px 16px;
  list-style: none;
}

.senseki-lesson-list li {
  margin: 0;
  padding: 0;
}

.senseki-lesson-list li + li {
  margin-top: 2px;
}

.senseki-lesson {
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 13px 10px;
  color: var(--app-ink);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 160ms var(--app-ease), color 160ms var(--app-ease);
}

.senseki-lesson:hover {
  color: var(--app-water-dark);
  background: rgb(255 255 255 / 52%);
}

.senseki-lesson:active {
  background: rgb(224 242 254 / 46%);
}

.senseki-lesson__number {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.senseki-lesson__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.senseki-lesson__copy strong {
  color: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.senseki-lesson__copy small {
  color: var(--app-muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.senseki-lesson__arrow {
  color: var(--app-water-dark);
  font-size: 0.8rem;
  text-align: center;
}

.learning-gate--meikyou-wall {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 82%), rgb(238 246 255 / 76%));
  border-color: rgb(148 163 184 / 50%);
  box-shadow: 0 18px 44px rgb(71 85 105 / 10%);
}

.learning-gate--meikyou-wall::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #64748b, #38bdf8, transparent);
  content: "";
}

.article-lecture__preview-label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #075985;
  background: #e8f7ff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Video-first course surface: one cinematic stage, then compact curriculum cards. */
.video-library-heading {
  grid-template-columns: 1fr;
  gap: 10px;
  justify-items: start;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 0;
}

.video-cinema {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.72fr);
  gap: 0;
  margin: 8px 0 30px;
  overflow: hidden;
  color: #edf6ff;
  background: #07111f;
  border: 1px solid rgb(125 211 252 / 20%);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgb(30 64 175 / 18%);
}

.video-cinema__screen {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 70% 20%, rgb(56 189 248 / 20%), transparent 40%),
    #020711;
  text-decoration: none;
}

.video-cinema__screen::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgb(2 7 17 / 70%));
  content: "";
}

.video-cinema__screen img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 320ms var(--app-ease), opacity 220ms var(--app-ease);
}

.video-cinema__screen:hover img {
  opacity: 0.9;
  transform: scale(1.012);
}

.video-cinema__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(186 230 253 / 62%);
  font-family: var(--app-reading);
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.2em;
}

.video-cinema__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: #07111f;
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(255 255 255 / 86%);
  border-radius: 50%;
  box-shadow: 0 16px 44px rgb(2 7 17 / 32%);
  transform: translate(-50%, -50%);
  transition: transform 180ms var(--app-ease), background-color 180ms var(--app-ease);
}

.video-cinema__screen:hover .video-cinema__play {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.04);
}

.video-cinema__screen-label {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 17px;
  color: rgb(237 246 255 / 84%);
  font-family: var(--app-utility);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.video-cinema__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3vw, 38px);
  border-left: 1px solid rgb(148 163 184 / 20%);
}

.video-cinema__copy .section-index {
  color: #7dd3fc;
}

.video-cinema__copy h2 {
  margin: 10px 0 0;
  color: #f8fbff;
  font-family: var(--app-reading);
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  font-weight: 600;
  line-height: 1.45;
}

.video-cinema__copy > p:not(.section-index, .video-cinema__meta) {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: #aebfd0;
  font-size: 0.8rem;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-cinema__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  color: #7dd3fc;
  font-family: var(--app-utility);
  font-size: 0.68rem;
}

.video-cinema__resume {
  margin-top: 24px;
}

.video-cinema__resume .resume-empty {
  color: #aebfd0;
}

.video-cinema__resume .resume-link {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 14px;
  padding: 11px 14px 11px 16px;
  color: #f8fbff;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(125 211 252 / 34%);
  border-radius: 14px;
  text-decoration: none;
  transition: background-color 180ms var(--app-ease), border-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.video-cinema__resume .resume-link:hover {
  color: #fff;
  background: rgb(255 255 255 / 12%);
  border-color: rgb(125 211 252 / 60%);
  transform: translateY(-1px);
}

.video-cinema__resume .resume-link span {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  color: #7dd3fc;
  font-family: var(--app-utility);
  font-size: 0.64rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-cinema__resume .resume-link strong {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-cinema__resume .resume-link::after {
  position: static;
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: end;
  color: #7dd3fc;
  font-size: 1rem;
}

.video-main .video-section {
  padding: 30px;
}

.video-main .video-import,
.video-library-main > .video-import {
  padding-block: 30px;
  padding-inline: 28px;
}

.video-main .video-notes ul {
  max-width: none;
  margin-top: 24px;
  padding-inline: 12px;
}

.video-main .video-notes li {
  padding: 24px 8px 24px 64px;
  overflow-wrap: break-word;
}

.video-main .video-notes li::before {
  top: 27px;
  left: 4px;
}

.video-library-list {
  margin-top: 42px;
}

.video-group {
  overflow: hidden;
  background: rgb(255 255 255 / 30%);
  border: 0;
  border-radius: 18px;
}

.video-group + .video-group {
  margin-top: 10px;
}

.video-group[open] {
  background: rgb(255 255 255 / 48%);
  box-shadow: 0 14px 38px rgb(134 160 199 / 9%);
}

.video-group__summary {
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms var(--app-ease);
}

.video-group__summary::-webkit-details-marker,
.video-group__more > summary::-webkit-details-marker {
  display: none;
}

.video-group__summary:hover {
  background: rgb(255 255 255 / 58%);
}

.video-group__index {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.video-group__title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.video-group__title strong {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.55;
}

.video-group__title small {
  flex: none;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.video-group__chevron {
  width: 16px;
  height: 16px;
  justify-self: end;
  fill: none;
  stroke: var(--app-water-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 160ms var(--app-ease);
}

.video-group[open] .video-group__chevron {
  transform: rotate(180deg);
}

.video-group__body {
  padding: 0 18px 18px;
}

.video-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.video-group__more {
  margin-top: 16px;
}

.video-group__more > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--app-water-dark);
  background: rgb(240 249 255 / 58%);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  list-style: none;
}

.video-group__more > summary:hover {
  background: rgb(240 249 255 / 88%);
}

.video-group__more > summary i {
  font-style: normal;
  transition: transform 160ms var(--app-ease);
}

.video-group__more-open {
  display: none;
}

.video-group__more[open] .video-group__more-closed {
  display: none;
}

.video-group__more[open] .video-group__more-open {
  display: inline;
}

.video-group__more[open] > summary i {
  transform: rotate(45deg);
}

.video-ledger--more {
  margin-top: 18px;
}

.video-row.video-card {
  min-width: 0;
  overflow: hidden;
  background: rgb(255 255 255 / 48%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 20px;
  box-shadow: 0 15px 42px rgb(134 160 199 / 12%);
}

.video-card .video-row__link {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px 8px;
  padding: 0 0 18px;
  background: transparent;
}

.video-card .video-row__link:hover {
  background: rgb(255 255 255 / 30%);
  transform: translateY(-2px);
}

.video-card .video-slot {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  color: #e7f4ff;
  background: rgb(7 17 31 / 78%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.video-card .video-thumbnail {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.video-card .video-thumbnail__play {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
}

.video-card .video-row__copy {
  grid-column: 1 / -1;
  padding: 4px 18px 0;
}

.video-card .video-title {
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.video-card .video-description-row {
  -webkit-line-clamp: 2;
}

.video-card .video-row__state {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  margin: 0 18px;
  padding: 0 10px;
  color: var(--app-water-dark);
  background: rgb(240 249 255 / 74%);
  border: 1px solid rgb(186 230 253 / 72%);
  border-radius: 999px;
}

.video-card.is-watched::before,
.video-card[data-local-watched="true"]::before {
  display: none;
}

.video-main {
  width: min(1120px, calc(100% - 88px));
}

.video-theater {
  margin: 0;
  padding: 18px;
  color: #edf6ff;
  background: #07111f;
  border: 1px solid rgb(125 211 252 / 18%);
  border-radius: 30px;
  box-shadow: 0 30px 84px rgb(30 64 175 / 18%);
}

.video-theater > .back-link {
  min-height: 44px;
  margin: 0 0 10px;
  padding: 0 6px;
  color: #b8cada;
}

.video-theater > .back-link:hover {
  color: #fff;
}

.video-theater .video-stage {
  margin: 0;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 18px;
  box-shadow: none;
}

.video-theater .video-header {
  margin: 0;
  padding: 24px 10px 10px;
  border: 0;
}

.video-theater .video-header .article-number {
  color: #7dd3fc;
}

.video-theater .video-header h1 {
  max-width: 34ch;
  margin-top: 8px;
  color: #f8fbff;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  letter-spacing: 0.025em;
  line-height: 1.45;
}

.video-theater .video-header__meta {
  margin-top: 13px;
  color: #9eb2c5;
}

.video-theater .video-resume-prompt {
  margin: 0;
  color: #dce8f3;
  background: rgb(255 255 255 / 7%);
  border-color: rgb(125 211 252 / 25%);
}

@media (max-width: 75rem) {
  /* 目次カラム（.article-outline）はこの幅から非表示。本文の1カラムへ */
  .article-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-main,
  .learning-main,
  .record-main,
  .my-main,
  .library-main,
  .video-library-main,
  .video-main {
    width: min(100% - 48px, 980px);
  }
}

@media (max-width: 60rem) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 100% 4%, rgb(224 242 254 / 80%), transparent 23rem),
      radial-gradient(circle at 0% 88%, rgb(254 243 199 / 42%), transparent 20rem),
      linear-gradient(180deg, var(--paper), var(--app-cloud) 42%, #f8fbff);
    background-attachment: scroll;
  }

  .app-shell {
    display: block;
  }

  .article-shell,
  .article-shell--no-outline {
    display: block;
  }
  .site-topbar {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 40;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 8px 12px 0;
    padding: 8px 10px 8px 20px;
    color: var(--app-ink);
    background: var(--app-paper);
    border: 1px solid rgb(255 255 255 / 88%);
    border-bottom: 1px solid rgb(255 255 255 / 88%);
    border-radius: 999px;
    box-shadow: var(--app-shadow-soft);
    backdrop-filter: blur(24px);
  }

  /* モバイルは下部ナビが同じ4項目を担うので、バー内のメニューは畳む */
  .topbar-nav {
    display: none;
  }

  .compact-brand {
    display: flex;
    /* 基礎ルールのmin-height(44pxタップ領域)では行が上端へ寄るため、
       右のアカウントピルと縦中心が揃わない。centerで44px箱の中心に置く */
    align-items: center;
    gap: 10px;
    color: var(--app-ink);
    font-family: var(--app-ui);
  }

  .compact-brand .brand-mark {
    width: auto;
    height: auto;
    display: inline-block;
    font-size: 1.12rem;
  }

  .topbar-account {
    min-width: 92px;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    color: var(--app-ink);
    background: rgb(255 255 255 / 58%);
    border: 1px solid rgb(186 230 253 / 82%);
    border-radius: 999px;
  }

  .topbar-account span {
    white-space: nowrap;
  }

  .topbar-account strong {
    max-width: 13ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-account span {
    color: var(--app-muted);
  }

  .topbar-account strong {
    color: var(--app-ink);
  }

  .app-bottom-nav {
    position: fixed;
    z-index: 60;
    inset: auto 12px max(8px, env(safe-area-inset-bottom));
    min-height: 68px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px 8px;
    background: rgb(255 255 255 / 78%);
    border: 1px solid rgb(255 255 255 / 90%);
    border-radius: 24px;
    box-shadow: 0 18px 60px rgb(134 160 199 / 24%);
    backdrop-filter: blur(24px);
  }

  .app-bottom-nav a {
    display: grid;
    min-width: 0;
    min-height: 56px;
    place-content: center;
    color: var(--app-muted);
    border-radius: 18px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .app-bottom-nav a::before {
    display: none;
  }

  .app-bottom-nav a[aria-current="page"] {
    color: var(--app-water-dark);
    background: linear-gradient(180deg, rgb(255 255 255 / 82%), rgb(238 246 255 / 84%));
  }

  .app-bottom-nav a[aria-current="page"] > span {
    color: #55b9ea;
  }

  /* 下部ナビのラベル契約 */
  .app-bottom-nav a > span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .dashboard-main,
  .learning-main,
  .record-main,
  .my-main,
  .library-main,
  .video-library-main,
  .video-main {
    width: auto;
    margin: 0;
    padding: 36px 20px 52px;
  }

  .learning-collection {
    margin-top: 32px;
    padding: 22px;
    border-radius: 24px;
    scroll-margin-top: 92px;
  }

  .learning-collection--standalone {
    padding: 0;
    border-radius: 0;
  }

  .learning-collection__notice {
    display: grid;
    gap: 6px;
    padding: 14px;
  }

  .learning-collection__notice a {
    width: fit-content;
  }

  .learning-collection__notice-actions {
    justify-items: start;
    white-space: normal;
  }

  .learning-gate {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
  }

  .learning-gate > a {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .meikyou-chapter {
    padding: 0;
    border-radius: 16px;
  }

  .meikyou-chapter__summary {
    min-height: 72px;
    padding: 11px 14px;
  }

  .dashboard-welcome {
    padding: 6px 2px 24px;
  }

  .dashboard-welcome h1,
  .page-intro h1 {
    font-size: clamp(1.9rem, 8.2vw, 2.45rem);
    letter-spacing: 0.045em;
    line-height: 1.6;
  }

  .quiet-update {
    border-radius: 20px;
  }

  .resume-focus {
    display: block;
    min-height: 254px;
    padding: 25px 22px;
    border-radius: 28px;
  }

  .resume-focus__body,
  .resume-focus > div {
    min-width: 0;
  }

  .resume-focus .ui-kicker {
    margin-bottom: 10px;
  }

  .resume-focus h2 {
    max-width: none;
    font-size: 1.32rem;
    line-height: 1.6;
  }

  .focus-action {
    width: 100%;
    justify-content: space-between;
    min-height: 52px;
    margin-top: 18px;
  }

  .notebook,
  .practice-capture,
  .polish-panel,
  .migaki-panel,
  .practice-board,
  .bookmark-shelf,
  .record-panel,
  .course-progress,
  .account-panel {
    padding: 22px;
    border-radius: 24px;
  }

  /* マイページは1カラムへ。主(記録・講座・ノート)→脇(磨き暦・実践・栞)の順に積む */
  .my-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
  }

  .my-grid__main,
  .my-grid__side {
    gap: 24px;
  }

  .profile-header {
    row-gap: 12px;
  }

  .profile-rank {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }

  .profile-rank__title {
    justify-content: flex-start;
  }

  .record-row {
    gap: 8px 12px;
    padding: 12px 2px;
  }

  .record-row__thumb {
    width: 76px;
  }

  .record-row__resume progress {
    width: 88px;
  }

  .learning-link {
    margin-inline: -6px;
    padding-inline: 6px;
    border-radius: 16px;
  }

  .learning-link:hover {
    padding-inline: 6px;
  }

  .page-intro {
    padding-top: 6px;
  }

  .unified-search > div,
  .search-field {
    border-radius: 24px;
  }
  .profile-mark {
    width: 48px;
    height: 48px;
  }

  .library-heading h1,
  .video-library-heading h1 {
    font-size: 2rem;
  }

  .lesson-group,
  .video-group {
    border-radius: 22px;
  }

  .video-stage {
    margin-inline: -20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .video-header h1 {
    font-size: 1.55rem;
  }

  .video-watch-control,
  .completion-panel,
  .video-section,
  .video-bonus,
  .prompt-section,
  .video-import,
  .resume-strip {
    border-radius: 22px;
  }

  .reading-progress {
    z-index: 39;
    top: calc(81px + env(safe-area-inset-top));
    right: 20px;
    bottom: auto;
    left: 20px;
    width: auto;
    height: 2px;
    background: var(--app-line);
    border-radius: 999px;
  }

  .reading-progress span {
    width: calc(var(--reading-progress, 0) * 1%);
    height: 2px;
    border-radius: 999px;
  }

  .article-lecture {
    margin-top: 32px;
    padding-top: 28px;
  }

  .article-lecture__heading {
    grid-template-columns: 1fr;
  }

  .article-lecture__heading .section-index {
    grid-column: auto;
  }

  .article-lecture__frame {
    margin-inline: calc(-1 * clamp(1rem, 5vw, 2rem));
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 18px 50px rgb(30 64 175 / 14%);
  }

  .article-lecture__caption {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .article-lecture__caption > a {
    width: fit-content;
  }
}

@media (max-width: 25rem) {
  .site-topbar {
    margin-inline: 8px;
    padding-left: 16px;
  }

  .topbar-account {
    min-width: 76px;
    padding-inline: 10px;
  }

  .app-bottom-nav {
    right: 8px;
    left: 8px;
  }

  .dashboard-main,
  .learning-main,
  .record-main,
  .my-main,
  .library-main,
  .video-library-main,
  .video-main {
    padding-inline: 14px;
  }

  .resume-focus {
    padding: 22px 18px;
  }

  .notebook,
  .practice-capture,
  .polish-panel,
  .migaki-panel,
  .practice-board,
  .record-panel,
  .course-progress,
  .account-panel {
    padding: 18px;
  }

  .video-stage {
    margin-inline: -14px;
  }
}

@media (max-width: 75rem) {
  .video-cinema {
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.75fr);
  }

  .video-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 60rem) {
  .senseki-mail-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .senseki-mail-guide > a {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .senseki-section-index {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .senseki-section-index > span {
    padding-top: 0;
  }

  .senseki-section-index > div {
    gap: 2px;
  }

  .senseki-section__summary {
    min-height: 72px;
    grid-template-columns: 74px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 11px 14px;
  }

  .senseki-section__index {
    gap: 4px;
  }

  .senseki-section__title {
    display: grid;
    justify-content: stretch;
    gap: 1px;
  }

  .senseki-section__title > strong {
    font-size: 0.92rem;
  }

  .senseki-lesson-list {
    padding: 0 8px 10px;
  }

  .senseki-lesson {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    gap: 10px;
    min-height: 72px;
    padding: 12px 8px;
  }

  .senseki-lesson__number {
    text-align: left;
  }

  .senseki-lesson__copy strong {
    font-size: 0.86rem;
    line-height: 1.75;
  }

  .video-cinema {
    grid-template-columns: 1fr;
    margin-top: 0;
    border-radius: 24px;
  }

  .video-cinema__copy {
    padding: 24px;
    border-top: 1px solid rgb(148 163 184 / 20%);
    border-left: 0;
  }

  .video-cinema__copy h2 {
    font-size: 1.45rem;
  }

  .video-main {
    width: auto;
  }

  .video-theater {
    margin-inline: -20px;
    padding: 12px 20px 20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .video-theater .video-stage {
    margin: 0;
    border-radius: 16px;
  }

  .video-theater .video-header {
    padding-inline: 2px;
  }
}

@media (max-width: 42rem) {
  .video-ledger {
    grid-template-columns: 1fr;
  }

  .video-group + .video-group {
    margin-top: 10px;
  }

  .video-group__summary {
    min-height: 72px;
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 11px 14px;
  }

  .video-group__title {
    display: grid;
    justify-content: stretch;
    gap: 1px;
  }

  .video-group__title strong {
    font-size: 0.94rem;
  }

  .video-group__body {
    padding: 0 10px 12px;
  }

  .video-group__more {
    margin-top: 12px;
  }

  .video-cinema__play {
    width: 56px;
    height: 56px;
  }

  .video-cinema__screen-label {
    right: 14px;
    bottom: 12px;
  }

  .video-cinema__copy {
    padding: 22px 18px;
  }

  .video-cinema__resume .resume-link {
    min-height: 68px;
  }

  .video-cinema__resume .resume-link strong {
    max-width: 100%;
  }

  .video-main .video-section {
    padding: 22px 18px;
  }

  .video-main .video-import,
  .video-library-main > .video-import {
    padding-block: 22px;
    padding-inline: 20px;
  }

  .video-main .video-notes ul {
    padding-inline: 4px;
  }

  .video-main .video-notes li {
    padding: 20px 0 20px 48px;
  }

  .video-main .video-notes li::before {
    top: 23px;
    left: 2px;
  }

}

@media (max-width: 60rem) and (max-height: 650px) {
  .home-page .dashboard-main {
    padding-top: 20px;
  }

  .home-page .dashboard-welcome {
    padding-bottom: 12px;
  }

  .home-page .dashboard-welcome > div > p {
    display: none;
  }

  .home-page .dashboard-welcome h1 {
    font-size: 1.7rem;
    line-height: 1.42;
  }

  .home-page .home-priority-grid {
    margin-top: 14px;
  }

  .home-page .resume-focus {
    min-height: 0;
    padding: 18px;
  }

  .home-page .resume-focus .ui-kicker {
    margin-bottom: 6px;
  }

  .home-page .resume-focus h2 {
    font-size: 1.08rem;
    line-height: 1.52;
  }

  .home-page .resume-focus p:not(.ui-kicker) {
    margin-top: 5px;
    font-size: 0.76rem;
  }

  .home-page .resume-focus__progress {
    margin-top: 10px;
  }

  .home-page .focus-action {
    min-height: 46px;
    margin-top: 12px;
  }
}

/* Learning guidance: make every route explain its promise and next action. */
.home-page .dashboard-welcome h1 {
  max-width: 28ch;
  font-size: clamp(1.85rem, 3.3vw, 2.8rem);
  line-height: 1.45;
}

.home-guide {
  min-height: 284px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgb(254 243 199 / 52%), transparent 42%),
    rgb(255 255 255 / 62%);
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: 28px;
  box-shadow: var(--app-shadow-soft);
}

.home-guide h2,
.home-record h2,
.learning-orientation h2,
.learning-track-map h2 {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-weight: 600;
  letter-spacing: 0.035em;
}

.home-guide__intro > p:last-child {
  margin: 8px 0 0;
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.home-guide ol {
  display: grid;
  gap: 0;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.home-guide li {
  min-height: 34px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgb(255 255 255 / 82%);
}

.home-guide li > span {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-guide li p {
  margin: 0;
  color: var(--app-ink-soft);
  font-size: 0.75rem;
}

.home-guide > a,
.home-record > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding: 0 16px;
  color: var(--app-water-dark);
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(186 230 253 / 80%);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.home-guide > a:hover,
.home-record > a:hover {
  background: #fff;
  transform: translateY(-1px);
}

.home-latest-videos {
  margin-top: 50px;
}

.home-latest-videos .section-heading > div > p:last-child,
.today-step .section-heading > div > p:last-child,
.home-shelf-map .section-heading > div > p:last-child {
  margin: 5px 0 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

/* 会員ホームの新着に添える記事の行(器はguest-arrivalsを共用) */
.home-arrivals__list {
  margin-top: 14px;
}

/* ホームの講座棚ショートカット。カテゴリ3枚だけ=棚のカード再掲はしない。 */
.home-shelf-map {
  margin-top: 50px;
}

/* カテゴリが4分類になっても半端な段を作らない(2列×2 or 4列に自然に割れる) */
.home-shelf-map__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-shelf-map__grid > a {
  display: block;
  overflow: hidden;
  color: var(--app-ink);
  text-decoration: none;
  background: rgb(255 255 255 / 54%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 20px;
  transition: background-color 180ms var(--app-ease), border-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

/* カテゴリの顔=筆頭講座バナーの流用帯。モチーフは右1/3寄せの型なので切り出しも右寄りに */
.home-shelf-map__banner {
  display: block;
  height: 84px;
  overflow: hidden;
  border-bottom: 1px solid rgb(208 223 240 / 70%);
}

.home-shelf-map__banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}

.home-shelf-map__grid > a > div {
  padding: 20px 20px 22px;
}

.home-shelf-map__grid > a:hover {
  background: rgb(255 255 255 / 82%);
  border-color: var(--app-water-dark);
  transform: translateY(-2px);
}

.home-shelf-map__grid h3 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.home-shelf-map__grid p {
  margin: 6px 0 14px;
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.home-shelf-map__grid small {
  color: var(--app-water-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

.home-shelf-map__grid small i {
  margin-left: 4px;
  font-style: normal;
}

.home-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.home-video-card {
  min-width: 0;
  overflow: hidden;
  color: var(--app-ink);
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: 22px;
  box-shadow: 0 16px 44px rgb(134 160 199 / 13%);
  text-decoration: none;
  transition: box-shadow 220ms var(--app-ease), transform 220ms var(--app-ease);
}

.home-video-card:hover {
  box-shadow: 0 22px 58px rgb(134 160 199 / 21%);
  transform: translateY(-3px);
}

.home-video-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #0d213a, #153f65);
}

.home-video-card__visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms var(--app-ease);
}

.home-video-card:hover .home-video-card__visual img {
  transform: scale(1.025);
}

.home-video-card__visual > i {
  font-family: var(--app-reading);
  font-size: 1.5rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

.home-video-card__visual > b {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  color: #0f2745;
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(255 255 255 / 92%);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgb(2 8 23 / 28%);
  font-size: 0.8rem;
}

.home-video-card__visual > small {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #fff;
  background: #1d4ed8;
  border-radius: 999px;
  font-family: var(--app-utility);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.home-video-card__copy {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px 17px 18px;
}

.home-video-card__copy small {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.64rem;
}

.home-video-card__copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-record {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 30px;
  margin-top: 48px;
  padding: 24px;
  background: rgb(255 255 255 / 46%);
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 24px;
}

.home-record h2 {
  font-size: 1.05rem;
  line-height: 1.55;
}

.home-record dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.home-record dl > div {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid rgb(186 203 219 / 64%);
}

.home-record dt {
  color: var(--app-muted);
  font-size: 0.65rem;
}

.home-record dd {
  margin: 2px 0 0;
  color: var(--app-ink);
  font-family: var(--app-utility);
  font-size: 1.25rem;
  font-weight: 600;
}

.home-record dd span {
  margin-left: 2px;
  color: var(--app-muted);
  font-size: 0.62rem;
}

.home-record > a {
  margin: 0;
  white-space: nowrap;
}

.learning-page .page-intro {
  max-width: 900px;
  padding-bottom: 30px;
}

.learning-page .page-intro h1 {
  max-width: 28ch;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  letter-spacing: 0.035em;
  line-height: 1.5;
  text-wrap: balance;
  word-break: auto-phrase;
}

.learning-page .page-intro > p:last-child {
  max-width: 64ch;
  margin-top: 15px;
  line-height: 2;
}

/* 基幹3の小カード。書架では番号+題+一行メタに圧縮(大きな案内文は持たない) */
.learning-track-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.learning-track-map > a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--app-ink);
  background: rgb(255 255 255 / 54%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgb(134 160 199 / 10%);
  text-decoration: none;
  transition: background-color 180ms var(--app-ease), box-shadow 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.learning-track-map > a:hover {
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 20px 50px rgb(134 160 199 / 18%);
  transform: translateY(-2px);
}

.learning-track-map > a > span {
  color: rgb(3 105 161 / 45%);
  font-family: var(--app-utility);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.learning-orientation li > span {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.learning-track-map h2 {
  font-size: 1rem;
}

.learning-track-map small {
  display: block;
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 0.74rem;
}


.learning-orientation {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.8fr);
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding: 24px;
  background: rgb(255 255 255 / 48%);
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 24px;
}

.learning-orientation h2 {
  font-size: 1.04rem;
}

.learning-orientation ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-orientation li {
  min-height: 56px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid rgb(186 203 219 / 58%);
}

.learning-orientation li p {
  margin: 0;
  color: var(--app-ink-soft);
  font-size: 0.75rem;
  line-height: 1.55;
}

.learning-page .unified-search {
  margin-top: 26px;
}

@media (min-width: 60.001rem) and (max-width: 75rem) {
  .home-priority-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.85fr);
  }
}

@media (max-width: 60rem) {
  .home-page .dashboard-welcome { order: 1; }
  .home-page .quiet-update { order: 2; }
  .home-page .home-latest-videos { order: 3; }
  .home-page .home-priority-grid { order: 4; }
  .home-page .today-step { order: 5; }
  .home-page .home-record { order: 6; }

  .home-page .dashboard-welcome h1 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    line-height: 1.5;
  }

  .home-guide {
    min-height: 0;
    padding: 22px;
    border-radius: 24px;
  }

  .home-guide li {
    min-height: 40px;
  }

  .home-guide > a {
    margin-top: 4px;
  }

  .home-latest-videos,
  .home-record {
    margin-top: 40px;
  }

  .home-page .section-heading > a {
    min-height: 44px;
    white-space: nowrap;
  }

  .home-video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-video-card {
    display: grid;
    grid-template-columns: minmax(124px, 42%) minmax(0, 1fr);
    border-radius: 18px;
  }

  .home-video-card__visual {
    aspect-ratio: 16 / 11;
  }

  .home-video-card__visual > b {
    width: 40px;
    height: 40px;
  }

  .home-video-card__visual > small {
    top: 8px;
    left: 8px;
  }

  .home-video-card__copy {
    min-height: 0;
    align-content: center;
    padding: 13px 14px;
  }

  .home-record {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .home-record > a {
    width: 100%;
  }

  .learning-page .page-intro h1 {
    font-size: clamp(1.7rem, 7vw, 2.15rem);
    line-height: 1.55;
  }

  .learning-track-map,
  .home-shelf-map__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-shelf-map__banner {
    height: 64px;
  }

  .learning-track-map > a {
    padding: 14px 18px;
    border-radius: 16px;
  }

  .course-card {
    min-height: 96px;
  }

  .course-card__banner {
    width: 96px;
  }

  .learning-orientation {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }

  .learning-orientation ol {
    grid-template-columns: 1fr;
  }

  .learning-orientation li {
    min-height: 44px;
    padding: 0;
    border-top: 1px solid rgb(186 203 219 / 50%);
    border-left: 0;
  }
}

@media (max-width: 25rem) {
  .video-theater {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .home-video-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .home-record,
  .home-guide,
  .learning-orientation,
  .learning-track-map > a {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiet-action span,
  .collection-more span,
  .focus-action,
  .learning-link,
  .lesson-row__link,
  .video-row__link,
  .senseki-section__summary,
  .senseki-section__chevron,
  .meikyou-chapter__summary svg,
  .video-group__summary,
  .video-group__chevron,
  .video-group__more > summary i {
    transition: none;
  }

  .video-cinema__screen img,
  .video-cinema__play {
    transition: none;
  }

  .article-lecture__caption > a {
    transition: none;
  }

  .home-guide > a,
  .home-record > a,
  .home-video-card,
  .home-video-card__visual img,
  .learning-track-map > a,
  .home-shelf-map__grid > a {
    transition: none;
  }
}

@media print {
  .site-topbar,
  .app-bottom-nav {
    display: none !important;
  }

  .app-shell {
    display: block;
  }
}

/*
 * Panel spacing contract
 *
 * Rounded surfaces are marked with data-ui-panel in the renderers so their
 * effective insets can be audited together. Action panels share one canonical
 * padding rule here instead of inheriting the legacy full-width divider style.
 */
[data-ui-panel="action"] {
  padding: var(--app-panel-inset);
}

@media (max-width: 60rem) {
  [data-ui-panel="action"] {
    padding: var(--app-panel-inset-mobile);
  }
}

@media (max-width: 25rem) {
  [data-ui-panel="action"] {
    padding: var(--app-panel-inset-narrow);
  }
}
.quiet-update__more {
  margin-left: auto;
  color: var(--app-water-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.quiet-update__more:hover {
  text-decoration: underline;
}

/* お知らせ複数行(自動生成フィード)。1行ピルの999px角丸は複数行だと膨れるので抑える */
.quiet-update--feed {
  align-items: flex-start;
  border-radius: 22px;
}

.quiet-update--feed span {
  padding-top: 2px;
}

.quiet-update__list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.quiet-update__list p {
  margin: 0;
  font-size: 0.87rem;
}

.quiet-update__list time {
  margin-right: 10px;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.reading-size {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(203 220 238 / 85%);
  border-radius: 999px;
}

.reading-size button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--app-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--app-ui);
  font-size: 0.74rem;
  font-weight: 600;
}

.reading-size button[aria-pressed="true"] {
  color: var(--app-water-dark);
  background: #fff;
  box-shadow: 0 2px 10px rgb(134 160 199 / 25%);
}

.reading-size button:hover:not([aria-pressed="true"]) {
  color: var(--app-ink);
}

body.reading-size-s .prose {
  font-size: 0.94rem;
  line-height: 2;
}

body.reading-size-l .prose {
  font-size: 1.13rem;
  line-height: 2.1;
}

/* 記事・動画の前後移動。旧フラット箱を青灰ヘアラインのガラス面へ統一する。 */
.article-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
  background: transparent;
  border: 0;
}

.video-pager {
  margin-top: 72px;
}

.pager-link {
  min-height: 112px;
  display: grid;
  align-content: center;
  padding: 18px 20px;
  color: var(--app-ink);
  background: rgb(255 255 255 / 62%);
  border: 1px solid var(--app-glass-border);
  border-radius: 18px;
  box-shadow: var(--app-shadow-soft);
  text-decoration: none;
  transition: background-color 180ms var(--app-ease), border-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.pager-link:hover {
  color: var(--app-water-dark);
  background: #fff;
  border-color: rgb(186 230 253 / 92%);
  transform: translateY(-1px);
}

.pager-link span {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.72rem;
}

.pager-link strong {
  margin-top: 6px;
  font-family: var(--app-reading);
  font-size: 0.95rem;
  line-height: 1.6;
}

.pager-link--next {
  text-align: right;
}

/* ロック中の隣接教材は札で正直に示す(隠さない・驚かせない)。金=明鏡限定・水=無料枠 */
.pager-link__lock {
  display: block;
  margin-top: 6px;
  color: var(--app-gold);
  font-family: var(--app-utility);
  font-size: 0.7rem;
}

.pager-link__lock--free {
  color: var(--app-water-dark);
}

/* 視聴完了パネル内の次導線は全幅の行に置く(2カラムgridの自動配置で潰れない) */
.video-watch-control .completion-next {
  grid-column: 1 / -1;
  justify-self: start;
}

/* 磨き暦のコールドスタート文言。責めない・急かさない誘いの一文 */
.migaki-panel__empty {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.86rem;
}


@media (max-width: 60rem) {
  .article-pager {
    grid-template-columns: 1fr;
  }

  .pager-link {
    min-height: 92px;
  }
}

/* guest向けオンボーディング（Discord参加→ログイン） */
.onboarding {
  display: grid;
  gap: 22px;
  margin-bottom: 34px;
}

.onboarding__intro {
  display: grid;
  gap: 10px;
  max-width: 40rem;
}

.onboarding__intro h2 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.onboarding__intro > p:last-child {
  margin: 0;
  color: var(--app-ink-soft);
  line-height: 2;
}

.onboarding__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 26px;
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
}

.onboarding__step-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.onboarding__step-copy {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.onboarding__step-copy h3 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.onboarding__step-copy p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.88rem;
  line-height: 1.9;
}

.onboarding__step-copy .primary-action {
  margin-top: 6px;
}

@media (max-width: 40rem) {
  .onboarding__step {
    padding: 18px;
  }
}

/* ゲスト向けホーム（未購入者への招き）。文法はLP、トーンは静謐×精密のまま。
   実数はサーバー側でoverviewから描く。金は明鏡会員(購入者限定)の印にだけ使う。 */
.guest-main {
  display: grid;
  gap: clamp(46px, 7vw, 76px);
}

.guest-main .onboarding {
  margin-bottom: 0;
}

.guest-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding-top: clamp(8px, 3vw, 32px);
}

.guest-hero__copy {
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: 46rem;
}

.guest-hero h1 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.5;
}

.guest-hero__lead,
.guest-hero__free {
  margin: 0;
  color: var(--app-ink-soft);
  font-size: 1.02rem;
  line-height: 2.1;
}

.guest-hero__free {
  color: var(--app-ink);
}

.guest-hero__lead b,
.guest-hero__free b {
  padding: 0 1px;
  color: var(--app-ink);
  font-family: var(--app-utility);
  font-size: 1.1em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.guest-hero__free b {
  color: var(--app-water-dark);
}

.guest-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.guest-hero__note {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.guest-hero__peek {
  color: var(--app-water-dark);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.guest-hero__peek:hover {
  text-decoration: underline;
}

.guest-hero__art {
  display: block;
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
  overflow: hidden;
}

.guest-hero__art img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 60rem) {
  .guest-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4vw, 56px);
  }
}

/* 学びの棚のカテゴリ区切り(基幹/実践スキル/教養/AI×マーケ)。一本の長い帯に戻さない。 */
.guest-shelf__group {
  margin-top: 20px;
}

.guest-shelf__group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 10px;
}

.guest-shelf__group-head span {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.guest-shelf__group-head small {
  color: var(--app-muted);
  font-size: 0.76rem;
}

.guest-shelf__list {
  display: grid;
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
  overflow: hidden;
}

.guest-shelf__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 18px;
  padding: 18px var(--app-panel-inset);
  color: inherit;
  text-decoration: none;
  transition: background 160ms var(--app-ease);
}

.guest-shelf__art {
  display: block;
  width: 108px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  overflow: hidden;
}

.guest-shelf__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.guest-shelf__item + .guest-shelf__item {
  border-top: 1px solid var(--app-line);
}

.guest-shelf__item:hover {
  background: rgb(255 255 255 / 92%);
}

.guest-shelf__copy {
  display: grid;
  gap: 2px;
}

.guest-shelf__copy strong {
  font-family: var(--app-reading);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.guest-shelf__copy small {
  color: var(--app-muted);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.guest-shelf__fact {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.guest-shelf__fact b {
  font-family: var(--app-utility);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.guest-shelf__fact small {
  color: var(--app-water-dark);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.guest-shelf__item > i {
  color: var(--app-muted);
  font-style: normal;
}

@media (max-width: 40rem) {
  .guest-shelf__item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 16px var(--app-panel-inset-mobile);
  }

  .guest-shelf__art {
    width: 84px;
    border-radius: 10px;
  }

  .guest-shelf__item > i {
    grid-row: 1;
    grid-column: 3;
  }

  .guest-shelf__fact {
    grid-row: 2;
    grid-column: 2 / -1;
    justify-items: start;
    text-align: left;
  }
}

.guest-arrivals__list {
  display: grid;
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
  overflow: hidden;
}

.guest-arrivals .quiet-update {
  margin-bottom: 16px;
}

.guest-arrival {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--app-panel-inset);
  color: inherit;
  text-decoration: none;
  transition: background 160ms var(--app-ease);
}

.guest-arrival + .guest-arrival {
  border-top: 1px solid var(--app-line);
}

.guest-arrival:hover {
  background: rgb(255 255 255 / 92%);
}

.guest-arrival__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.guest-arrival__copy small {
  color: var(--app-muted);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.guest-arrival__copy strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.guest-arrival__status {
  flex-shrink: 0;
  padding: 5px 12px;
  color: var(--app-water-dark);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid rgb(147 197 253 / 70%);
  border-radius: 999px;
  white-space: nowrap;
}

.guest-arrival__status--gold {
  color: var(--app-gold);
  border-color: rgb(183 121 31 / 45%);
}

@media (max-width: 40rem) {
  .guest-arrival {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px var(--app-panel-inset-mobile);
  }
}

.guest-teacher {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: var(--app-panel-inset);
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
}

.guest-teacher h2 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.guest-teacher p:last-child {
  margin: 0;
  max-width: 44rem;
  color: var(--app-ink-soft);
  line-height: 2.05;
}

.guest-compare__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.guest-compare__plan {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
  padding: var(--app-panel-inset);
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 22px;
  box-shadow: var(--app-shadow-soft);
}

.guest-compare__plan h3 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.guest-compare__plan > p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.88rem;
}

.guest-compare__plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--app-ink-soft);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  list-style: none;
}

.guest-compare__plan li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.guest-compare__plan li::before {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 1px;
  background: var(--app-line-strong);
  transform: translateY(-4px);
}

.guest-compare__plan .primary-action,
.guest-compare__plan .secondary-action {
  margin-top: 8px;
}

.guest-compare__plan--meikyou {
  border-color: rgb(183 121 31 / 38%);
}

.guest-compare__plan--meikyou li::before {
  background: rgb(183 121 31 / 55%);
}

@media (max-width: 60rem) {
  .guest-teacher,
  .guest-compare__plan {
    padding: var(--app-panel-inset-mobile);
  }
}

/* 無料公開の可視化（guest/freeの視点） */
.video-row__state--free {
  color: var(--app-water-dark);
  font-weight: 600;
}

a.video-filters__access {
  border-color: rgb(147 197 253 / 70%);
  color: var(--app-water-dark);
}

a.video-filters__access[aria-current="page"] {
  color: #fff;
  background: var(--app-water-dark);
  border-color: var(--app-water-dark);
}

/* ツール・スキル: 既存の静謐＋精密レジスターを保つ配布物ライブラリ */
.tools-intro {
  max-width: 900px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgb(203 220 238 / 80%);
}

.tools-intro h1 {
  max-width: 24ch;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  letter-spacing: 0.045em;
  line-height: 1.5;
  text-wrap: balance;
  word-break: auto-phrase;
}

.tools-intro > p:last-child {
  max-width: 62ch;
  margin-top: 15px;
  line-height: 2;
}

.tools-preparing {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  padding: 19px 24px;
  color: var(--app-ink-soft);
  background: rgb(245 251 255 / 72%);
  border: 1px solid rgb(175 213 240 / 88%);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgb(134 160 199 / 8%);
}

.tools-preparing__label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tools-preparing__label > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #79bce9;
  border: 2px solid rgb(255 255 255 / 88%);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(121 188 233 / 18%);
}

.tools-preparing h2 {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.tools-preparing div > p {
  margin-top: 3px;
  font-size: 0.76rem;
  line-height: 1.8;
}

/* ツール・スキルの棚。カードは講座棚と同じ「バナー上・本文下」=増えても2列で並ぶ */
.tool-shelf {
  margin-top: 48px;
}

.resource-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.resource-card {
  min-width: 0;
  overflow: hidden;
  background: rgb(255 255 255 / 56%);
  border: 1px solid var(--app-glass-border);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgb(134 160 199 / 10%);
  transition: background-color 180ms var(--app-ease), box-shadow 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.resource-card:hover {
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 20px 52px rgb(134 160 199 / 17%);
  transform: translateY(-2px);
}

.resource-card > a {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: var(--app-ink);
  text-decoration: none;
}

.resource-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--app-water-dark);
  background:
    radial-gradient(circle at 76% 20%, rgb(255 255 255 / 86%), transparent 36%),
    linear-gradient(145deg, rgb(224 242 254 / 72%), rgb(232 241 250 / 96%));
  border-bottom: 1px solid rgb(203 220 238 / 78%);
}

.resource-thumbnail::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgb(3 105 161 / 16%);
  border-radius: 14px;
  content: "";
}

.resource-thumbnail svg {
  z-index: 1;
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.resource-thumbnail__number,
.resource-thumbnail small {
  position: absolute;
  z-index: 1;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.resource-thumbnail__number {
  top: 22px;
  left: 24px;
  font-variant-numeric: tabular-nums;
}

.resource-thumbnail small {
  right: 22px;
  bottom: 20px;
}

.resource-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 22px;
}

.resource-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.resource-access {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--app-water-dark);
  background: rgb(240 249 255 / 78%);
  border: 1px solid rgb(186 230 253 / 84%);
  border-radius: 999px;
  font-family: var(--app-ui);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.resource-access--paid {
  color: #795014;
  background: #fff7e5;
  border-color: #ead3a4;
}

.resource-card__body > strong {
  margin-top: 10px;
  font-family: var(--app-reading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.55;
}

.resource-card__summary {
  max-width: 52rem;
  margin-top: 6px;
  color: var(--app-ink-soft);
  font-size: 0.82rem;
  line-height: 1.8;
}

.resource-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--app-muted);
  font-size: 0.7rem;
}

.resource-card__footer > span:last-child {
  color: var(--app-water-dark);
  font-weight: 700;
  white-space: nowrap;
}

.resource-card__footer i {
  margin-left: 4px;
  font-style: normal;
}

.resource-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--app-water-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.resource-back:hover {
  text-decoration: underline;
}

.resource-detail__hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.8fr);
  align-items: stretch;
  overflow: hidden;
  background: rgb(255 255 255 / 58%);
  border: 1px solid var(--app-glass-border);
  border-radius: 28px;
  box-shadow: var(--app-shadow-soft);
}

.resource-detail__hero .resource-thumbnail {
  min-height: 286px;
}

.resource-detail__hero > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
}

.resource-detail__hero h1 {
  margin: 14px 0 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.5;
  word-break: auto-phrase;
}

.resource-detail__hero p {
  max-width: 54ch;
  margin: 12px 0 0;
  color: var(--app-ink-soft);
  font-size: 0.88rem;
  line-height: 2;
}

.resource-detail__hero small {
  margin-top: 18px;
  color: var(--app-muted);
  font-size: 0.7rem;
}

#resource-guide {
  scroll-margin-top: 96px;
}

.resource-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 30px;
}

/* QUICK START(primer)は全幅の先頭段。列に入れると右隣のoutcomesがprimerの
   高さまで伸びて巨大化し、stepsが次段に孤立する(イケハヤ脳・MCPで実害)。
   全幅化で「できること|使い方」の左右対を元設計どおりに保つ。 */
.resource-guide__primer {
  grid-column: 1 / -1;
}

.resource-guide__primer ol li p,
.resource-guide__examples li {
  max-width: 62ch;
}

.resource-guide__primer,
.resource-guide__outcomes,
.resource-guide__steps,
.resource-download,
.resource-gate {
  padding: var(--app-panel-inset);
  background: rgb(255 255 255 / 54%);
  border: 1px solid var(--app-glass-border);
  border-radius: 24px;
}

.resource-guide h2,
.resource-download h2,
.resource-gate h2 {
  margin: 4px 0 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.resource-guide__outcomes ul {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.resource-guide__outcomes li {
  position: relative;
  min-height: 40px;
  padding: 7px 0 7px 26px;
  color: var(--app-ink-soft);
  border-bottom: 1px solid rgb(203 220 238 / 58%);
  font-size: 0.8rem;
  line-height: 1.75;
}

.resource-guide__outcomes li::before {
  position: absolute;
  top: 12px;
  left: 2px;
  width: 10px;
  height: 6px;
  border-bottom: 1.5px solid var(--app-water-dark);
  border-left: 1.5px solid var(--app-water-dark);
  content: "";
  transform: rotate(-45deg);
}

.resource-guide__steps ol {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.resource-guide__steps li {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgb(203 220 238 / 62%);
}

.resource-guide__steps li > span {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.resource-guide__steps li p {
  margin: 0;
  color: var(--app-ink-soft);
  font-size: 0.8rem;
  line-height: 1.75;
}

.resource-download {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.resource-download p,
.resource-gate p {
  max-width: 55ch;
  margin: 8px 0 0;
  color: var(--app-ink-soft);
  font-size: 0.82rem;
  line-height: 1.8;
}

.resource-download .focus-action,
.resource-gate .focus-action {
  flex: none;
  margin-top: 0;
}

.resource-download__pending {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: var(--app-muted);
  background: rgb(238 244 251 / 82%);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.resource-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 30px;
}

/* 別売りスキルのゲート: 主導線=購入・脇=講座の導入・非常口=ログイン、の縦積み */
.resource-gate__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: none;
  gap: 10px;
  min-width: 240px;
}

.resource-gate__actions .focus-action,
.resource-gate__actions .secondary-action {
  justify-content: center;
}

.resource-gate__actions .quiet-link {
  color: var(--app-muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 60rem) {
  .app-bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-bottom-nav a > span {
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .tools-intro h1 {
    font-size: clamp(1.7rem, 7vw, 2.15rem);
  }

  .resource-detail__hero > div {
    padding: 28px;
  }

  .resource-guide__primer,
  .resource-guide__outcomes,
  .resource-guide__steps,
  .resource-download,
  .resource-gate {
    padding: var(--app-panel-inset-mobile);
  }
}

@media (max-width: 42rem) {
  .tools-preparing {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
    padding: 17px 18px;
    border-radius: 16px;
  }

  .resource-catalog {
    gap: 12px;
    margin-top: 24px;
  }

  .resource-card {
    border-radius: 20px;
  }

  .resource-thumbnail::after {
    inset: 10px;
    border-radius: 12px;
  }

  .resource-thumbnail svg {
    width: 44px;
    height: 44px;
  }

  .resource-thumbnail__number {
    top: 16px;
    left: 17px;
  }

  .resource-thumbnail small {
    right: auto;
    bottom: 14px;
    left: 17px;
  }

  .resource-card__body {
    padding: 18px 18px 16px;
  }

  .resource-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    font-size: 0.58rem;
  }

  .resource-access {
    min-height: 22px;
    padding-inline: 8px;
    font-size: 0.6rem;
  }

  .resource-card__body > strong {
    margin-top: 7px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .resource-card__summary {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .resource-card__footer {
    padding-top: 7px;
    font-size: 0.62rem;
  }

  .resource-card__footer > span:first-child {
    display: none;
  }

  .resource-card__footer > span:last-child {
    margin-left: auto;
  }

  .resource-detail__hero {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .resource-detail__hero .resource-thumbnail {
    min-height: 196px;
    border-right: 0;
    border-bottom: 1px solid rgb(203 220 238 / 78%);
  }

  .resource-detail__hero > div {
    padding: 24px 20px 26px;
  }

  .resource-detail__hero h1 {
    font-size: 1.75rem;
  }

  .resource-guide {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 22px;
  }

  .resource-download,
  .resource-gate {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .resource-download .focus-action,
  .resource-gate .focus-action,
  .resource-download__pending {
    width: 100%;
    justify-content: center;
  }

  .resource-gate__actions {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-card {
    transition: none;
  }
}

/* ── マイページのノート ─────────────────────────────────────────────
   会員が書いたメモを教材横断で読み返す一冊。マイページの主役。 */
.notebook {
  display: grid;
  gap: 20px;
}

.notebook__search {
  display: grid;
  gap: 8px;
}

.notebook__search label {
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.notebook__search > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.notebook__search > div:focus-within {
  border-color: var(--app-water);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 12%);
}

.notebook__search span {
  color: var(--app-muted);
}

.notebook__search input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.95rem;
  background: none;
  border: 0;
}

.notebook__search input:focus-visible {
  outline: none;
}

.notebook__search button {
  min-height: 40px;
  padding: 0 20px;
  color: #fff;
  font-family: var(--app-ui);
  font-size: 0.82rem;
  background: var(--app-water-dark);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.notebook__shelves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notebook__shelves a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.82rem;
  text-decoration: none;
  background: rgb(255 255 255 / 55%);
  border: 1px solid var(--app-line);
  border-radius: 999px;
}

.notebook__shelves a:hover {
  color: var(--app-ink);
  border-color: var(--app-line-strong);
}

.notebook__shelves a[aria-current="page"] {
  color: var(--app-water-dark);
  font-weight: 700;
  background: rgb(224 242 254 / 82%);
  border-color: rgb(125 200 247 / 70%);
}

.notebook__shelves b {
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.74rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.notebook__shelves a[aria-current="page"] b {
  color: var(--app-water-dark);
}

.notebook__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-entry {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border-top: 1px solid var(--app-line);
}

.note-entry:first-child {
  border-top: 0;
  padding-top: 4px;
}

.note-entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.note-entry__source {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.note-entry__shelf {
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.note-entry__source a {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.note-entry__source a:hover {
  color: var(--app-water-dark);
}

.note-entry__head time {
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.note-entry__body {
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.94rem;
  line-height: 1.9;
  white-space: normal;
  overflow-wrap: anywhere;
}

.note-entry__body.is-clipped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-entry__expand {
  justify-self: start;
}

.note-entry__editor {
  display: grid;
  gap: 10px;
}

.note-entry__editor textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.94rem;
  line-height: 1.9;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--app-line-strong);
  border-radius: 14px;
  resize: vertical;
}

.note-entry__editor textarea:focus-visible {
  outline: none;
  border-color: var(--app-water);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 12%);
}

.note-entry__editor p {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}

.note-entry__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.note-entry__status {
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.74rem;
}

@media (max-width: 40rem) {
  .note-entry__head {
    flex-direction: column;
    gap: 6px;
  }

  .notebook__search > div {
    flex-wrap: wrap;
  }
}


/* ── 入力の質: 動画の時刻を刻む / 本文を引用する ───────────────────── */
.video-memo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.video-memo__stamp {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.8rem;
}

.video-memo__hint {
  margin: 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.74rem;
}

/* ノートの [12:34]。その場面への頭出しリンク。 */
.note-stamp {
  color: var(--app-water-dark);
  font-family: var(--app-ui);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid rgb(3 105 161 / 35%);
}

.note-stamp:hover {
  border-bottom-color: var(--app-water-dark);
}

/* 本文を選択すると浮かぶ引用ボタン */
.quote-action {
  position: absolute;
  z-index: 50;
  min-height: 38px;
  padding: 0 16px;
  color: #fff;
  font-family: var(--app-ui);
  font-size: 0.8rem;
  background: var(--app-ink);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgb(11 20 36 / 22%);
  cursor: pointer;
}

.quote-action:hover {
  background: var(--app-water-dark);
}

.quote-action[hidden] {
  display: none;
}


/* ── 実践ボード「やってみる」──────────────────────────────────────
   読了数でなく、実行の記録を残す。実践中は3件までに絞る。 */
.practice-capture label {
  display: block;
  margin-bottom: 10px;
}

.practice-capture__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.practice-capture__row input {
  flex: 1;
  min-width: 240px;
  min-height: 46px;
  padding: 0 16px;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.94rem;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.practice-capture__row input:focus-visible {
  outline: none;
  border-color: var(--app-water);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 12%);
}

.practice-capture__row button {
  min-height: 46px;
  padding: 0 22px;
}

.practice-capture__status {
  margin: 10px 0 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.76rem;
}

.practice-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.practice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--app-line);
}

.practice-item:first-child {
  border-top: 0;
  padding-top: 4px;
}

.practice-item__body {
  flex: 1;
  min-width: 220px;
}

.practice-item__body > p {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}

.practice-item__result {
  margin-top: 6px !important;
  color: var(--app-muted);
  font-size: 0.88rem !important;
  font-weight: 400 !important;
}

.practice-item__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 8px 0 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.74rem;
}

.practice-item__meta a {
  color: var(--app-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--app-line-strong);
}

.practice-item__meta a:hover {
  color: var(--app-water-dark);
}

.practice-item__meta time {
  font-variant-numeric: tabular-nums;
}

.practice-item__actions,
.practice-item__finish {
  display: flex;
  align-items: center;
  gap: 12px;
}

.practice-item__finish input {
  min-width: 220px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.9rem;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
}

.practice-item__status {
  flex-basis: 100%;
  margin: 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.74rem;
}

.practice-item--done .practice-item__body > p {
  color: var(--app-muted);
  font-weight: 500;
}

.practice-done {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--app-line);
}

.practice-done h3 {
  margin: 0 0 10px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

@media (max-width: 40rem) {
  .practice-item {
    flex-direction: column;
    align-items: stretch;
  }

  .practice-item__finish input {
    min-width: 0;
    flex: 1;
  }
}


/* ── 講義の文字起こし ─────────────────────────────────────────────
   時刻は頭出しボタン。読み物として静かに、しかし引きやすく。 */

/* base層の見出しは2カラムgrid。説明文が細い右カラムに潰れるため1カラムを明示する。 */
.video-transcript .video-section__heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  justify-items: start;
}

.video-transcript .video-section__heading p {
  margin: 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.8rem;
}
.transcript-lines {
  display: grid;
  gap: 2px;
  max-height: 30rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.transcript-lines li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--app-line);
}

.transcript-lines li:first-child {
  border-top: 0;
}

.transcript-lines button {
  padding: 4px 8px;
  color: var(--app-water-dark);
  font-family: var(--app-ui);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.transcript-lines button:hover {
  background: rgb(224 242 254 / 70%);
}

.transcript-lines p {
  margin: 0;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: 0.92rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.transcript-note {
  margin: 16px 0 0;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.76rem;
}

.resource-download__notice {
  margin-top: 10px !important;
  color: var(--app-muted);
  font-size: 0.78rem !important;
}

.resource-download__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 40rem) {
  .transcript-lines li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* ── 記事のモバイル目次 ───────────────────────────────────────────
   ガラスパネル群に属しているのに内側の余白が無く、角丸の面に中身が
   張り付いていた（旧・全幅帯デザインの残骸）。面の内側はここが正。 */
.mobile-outline {
  margin: 0 0 40px;
  padding: 16px 22px;
}

.mobile-outline summary {
  min-height: 52px;
}

.mobile-outline ol {
  padding-bottom: 16px;
}


/* ── 穿石 200篇規模の読了表示 ─────────────────────────────────────
   どこまで読んだかが一覧で分かる。読了は静かに沈め、未読だけが前に出る。 */
.senseki-lesson--done .senseki-lesson__copy strong {
  color: var(--app-muted);
  font-weight: 500;
}

.senseki-lesson__state {
  flex: 0 0 auto;
  color: var(--app-water-dark);
  font-family: var(--app-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.senseki-lesson--done .senseki-lesson__number {
  color: rgb(148 163 184 / 80%);
}

/* summaryは3カラムgrid（index/title/chevron）だった。読了✓を4番目の子として
   足すと新しい行に落ちるため、4カラム化して置き場を明示する。 */
.senseki-section__summary {
  grid-template-columns: 92px minmax(0, 1fr) auto 24px;
}

.senseki-section__done {
  grid-row: 1;
  grid-column: 3;
}

.senseki-section__chevron {
  grid-row: 1;
  grid-column: 4;
}

@media (max-width: 60rem) {
  .senseki-section__summary {
    grid-template-columns: 74px minmax(0, 1fr) auto 20px;
  }
}

.senseki-section__done {
  flex: 0 0 auto;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-content: center;
  color: var(--app-water-dark);
  font-size: 0.8rem;
  background: rgb(224 242 254 / 80%);
  border-radius: 999px;
}

.senseki-section-index a.is-complete {
  color: var(--app-muted);
}

.senseki-section-index a i {
  margin-left: 5px;
  color: var(--app-water-dark);
  font-style: normal;
  font-size: 0.72rem;
}


/* ── 講義動画の埋め込み（iOS講座） ─────────────────────────────────
   本文は読み幅70chだが、動画まで70chだと右に余白が残って小さく見える。
   プレイヤーだけ本文コラム幅（article-mainのコンテンツ幅）まで解放する。 */
.prose .article-lecture__frame {
  width: calc(min(52rem, 100vw) - 2 * clamp(2rem, 5vw, 4.5rem));
  max-width: none;
  margin: 8px 0 6px;
  border-radius: 18px;

  /* スライドは和紙色。既定の暗地だと1pxの隙間が黒線に見える */
  background: transparent;
}

/* aspect-ratioは枠線込みで効くため中身が正確に16:9にならず、
   プレイヤーの黒地が縁に1px漏れる。1px外周を切り落として隠す */
.prose .article-lecture__frame iframe {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  margin: -1px;
}

/* AI音声の断り書き。本文と区別するため小さく・プレイヤーの右肩下に */
.prose .article-lecture__note {
  width: calc(min(52rem, 100vw) - 2 * clamp(2rem, 5vw, 4.5rem));
  max-width: none;
  margin: 0 0 30px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.72rem;
  line-height: 1.7;
  text-align: right;
}

@media (max-width: 60rem) {
  .prose .article-lecture__frame {
    /* width:autoのまま負マージンで全幅化。値はモバイルの.article-main padding-inlineと同式
       (旧来の-20px固定は実寸18.75pxと1.25pxズレて横溢れしていた) */
    width: auto;
    margin: 8px calc(-1 * clamp(1rem, 5vw, 2rem)) 6px;
  }

  .prose .article-lecture__note {
    width: 100%;
  }
}

/* ── 記事の締め（読了チップ＋折りたたみ道具） ──────────────────────
   旧: 読了パネル＋マイメモ＋実践ボードで縦に長く、次の講義が遠かった。
   読了は小さなチップ、メモと実践は details に畳んで一枚に収める。 */
.lesson-close {
  display: grid;
  gap: 4px;
  margin-top: 26px;
  padding: 16px 22px;
  background: var(--app-paper);
  border: 1px solid var(--app-glass-border);
  border-radius: 20px;
  box-shadow: var(--app-shadow-soft);
}

/* 読了は本文の締め。枠の外・中央で、読み終わりの一拍として押す */
.lesson-done {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 40px;
  text-align: center;
}

.completion-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  color: var(--app-ink);
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--app-ui);
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 160ms ease-out, background 160ms ease-out;
}

.completion-chip span {
  color: var(--app-water-dark);
  font-size: 0.8rem;
}

.completion-chip strong {
  font-weight: 600;
}

.completion-chip:hover {
  border-color: var(--app-water-dark);
}

.completion-chip.is-complete {
  color: var(--app-water-dark);
  background: rgb(224 242 254 / 70%);
  border-color: rgb(125 179 224 / 80%);
}

.completion-chip--close {
  min-height: 46px;
  padding: 0 30px;
  font-size: 0.92rem;
}

/* ブックマークチップ。記事・動画のヘッダーで保存/解除。保存済み状態は読了チップと同じ水の語彙 */
.bookmark-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  color: var(--app-ink);
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--app-ui);
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 160ms ease-out, background 160ms ease-out;
}

.bookmark-chip svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.bookmark-chip strong {
  font-weight: 600;
}

.bookmark-chip:hover {
  border-color: var(--app-water-dark);
}

.bookmark-chip.is-marked {
  color: var(--app-water-dark);
  background: rgb(224 242 254 / 70%);
  border-color: rgb(125 179 224 / 80%);
}

.bookmark-chip.is-marked svg {
  fill: currentColor;
}

.lesson-done .completion-status {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
}

/* 読了直後の主導線。いま開ける次の教材へ静かに橋渡しする(有料壁には送らない) */
.completion-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 22px;
  color: var(--app-water-dark);
  background: rgb(224 242 254 / 55%);
  border: 1px solid rgb(125 179 224 / 80%);
  border-radius: 999px;
  font-family: var(--app-ui);
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.completion-next:hover {
  background: rgb(224 242 254 / 85%);
  border-color: var(--app-water-dark);
}

.completion-next span {
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.72rem;
}

.completion-next strong {
  font-weight: 600;
}

.completion-next i {
  font-style: normal;
}

.lesson-close__tool + .lesson-close__tool {
  border-top: 1px solid rgb(208 223 240 / 70%);
}

.lesson-close__tool summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 2px;
  color: var(--app-muted);
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.lesson-close__tool summary::-webkit-details-marker {
  display: none;
}

.lesson-close__tool summary:hover {
  color: var(--app-ink);
}

.lesson-close__tool summary svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  transition: transform 160ms ease-out;
}

.lesson-close__tool[open] summary svg {
  transform: rotate(180deg);
}

.lesson-close__tool[open] summary {
  color: var(--app-ink);
}

.lesson-close__label {
  display: block;
  margin: 2px 2px 8px;
  color: var(--app-ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.lesson-close textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--app-ink);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.9;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line-strong);
  border-radius: 12px;
  resize: vertical;
}

.lesson-close textarea:focus-visible,
.lesson-close .practice-capture__row input:focus-visible {
  outline: none;
  border-color: var(--app-focus);
  box-shadow: 0 0 0 3px rgb(2 132 199 / 16%);
}

.lesson-close .practice-capture__row {
  margin: 0 0 4px;
}

.lesson-close__status {
  margin: 6px 2px 10px;
  color: var(--app-muted);
  font-size: 0.75rem;
}

@media (max-width: 60rem) {
  .lesson-close {
    padding: 16px 18px;
  }
}

/* ── 学びの書架（/learn・2026-07-18書架化） ────────────────
   帳場(題+検索)→今日の動き(続きから+ライブ最新)→基幹3→棚札ナビ→講座棚(4分類)。
   カード文法は横型コンパクト1種に統一。棚の並びは固定し、知らせは札(チップ)だけで行う。 */
.library-desk {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  padding: 10px 0 24px;
  border-bottom: 1px solid var(--app-line);
}

.library-desk__title h1 {
  margin-top: 8px;
  color: var(--app-ink);
  font-family: var(--app-reading);
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.4;
}

.learning-page .library-desk__search {
  flex: 0 1 380px;
  min-width: min(320px, 100%);
  margin-top: 0;
}

/* ラベルは支援技術にだけ読ませる(帳場では視覚上はプレースホルダーが担う) */
.library-desk__search > label {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: 0;
  white-space: nowrap;
  clip-path: inset(50%);
}

.library-desk__search > div {
  min-height: 52px;
  box-shadow: none;
}

/* 今日の動き。左=自分の続き・右=ライブ最新。この2枚だけが動くもの */
.library-today {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.library-today--single {
  grid-template-columns: minmax(0, 1fr);
}

.library-resume,
.library-live {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  color: var(--app-ink);
  text-decoration: none;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 16px;
  transition: border-color 160ms ease-out;
}

.library-resume:hover,
.library-resume:focus-visible,
.library-live:hover,
.library-live:focus-visible {
  border-color: var(--app-water-dark);
}

.library-resume {
  padding: 16px 20px;
  border-left: 3px solid var(--app-water-dark);
}

.library-resume > .ui-kicker {
  color: var(--app-water-dark);
}

.library-resume__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.library-resume__body strong {
  overflow: hidden;
  font-family: var(--app-reading);
  font-size: 0.98rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-resume__body small {
  color: var(--app-muted);
  font-size: 0.74rem;
}

.library-resume__go {
  margin-left: auto;
  color: var(--app-water-dark);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.library-resume__go i {
  font-style: normal;
}

.library-live {
  padding-right: 16px;
}

.library-live__art {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  flex: none;
  width: 76px;
  background: rgb(224 236 250 / 90%);
  border-right: 1px solid rgb(208 223 240 / 70%);
}

.library-live__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.library-live__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 0;
}

.library-live__body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
}

.library-live__body small {
  color: var(--app-muted);
  font-size: 0.72rem;
}

/* 棚札ナビ。上部バーの下に貼りつき、どの棚にも飛べる */
.shelf-nav {
  position: sticky;
  top: 66px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 12px 0;
  background: rgb(238 245 251 / 85%);
  backdrop-filter: blur(12px);
}

.shelf-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 16px;
  color: var(--app-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(208 223 240 / 90%);
  border-radius: 999px;
  transition: border-color 160ms ease-out, color 160ms ease-out;
}

.shelf-nav a:hover,
.shelf-nav a:focus-visible {
  color: var(--app-water-dark);
  border-color: var(--app-water-dark);
}

/* 棚札(一の棚〜)。カテゴリ見出しの小さな札 */
.course-shelf__band-tag {
  padding: 3px 9px;
  color: var(--app-muted);
  font-family: var(--app-reading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  white-space: nowrap;
  background: rgb(255 255 255 / 45%);
  border: 1px solid var(--app-line);
  border-radius: 5px;
}

/* カードのメタ行。札(1枚まで)+回数+歩みを一列に */
.course-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 2px;
}

.course-card__meta i {
  font-style: normal;
}

.course-card__chip {
  padding: 2px 10px;
  color: var(--app-water-dark);
  font-size: 0.66rem;
  font-weight: 700;
  border: 1px solid rgb(3 105 161 / 35%);
  border-radius: 999px;
}

.course-card__chip--new {
  background: rgb(220 239 248 / 90%);
  border-color: rgb(3 105 161 / 25%);
}

/* 書架のモバイル。基底(この直上)より後ろに置く=カスケードで確実に勝たせる */
@media (max-width: 60rem) {
  .library-desk {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 0;
  }

  .learning-page .library-desk__search {
    flex: none;
  }

  .library-today {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .library-resume {
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 16px 18px;
  }

  .library-resume__go {
    margin-left: 0;
  }

  .shelf-nav {
    top: 0;
    overflow-x: auto;
    margin-top: 30px;
    scrollbar-width: none;
  }

  .shelf-nav::-webkit-scrollbar {
    display: none;
  }

  .course-shelf__band {
    scroll-margin-top: 66px;
  }
}
/* ツール・スキル: 画像サムネイルと目玉カード（イケハヤ脳・2026-07-15） */
.resource-thumbnail--image {
  background: #0b1424;
}

.resource-thumbnail--image::after {
  border-color: rgb(233 240 249 / 14%);
}

.resource-thumbnail--image img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 詳細ページのヒーローでは、焼き込み題字を切らずに全体を見せる */
.resource-detail__hero .resource-thumbnail--image img {
  object-fit: contain;
  object-position: center;
}

/* イケハヤ脳の「はじめての使い方」（QUICK START） */
.resource-guide__primer ol {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.resource-guide__primer ol li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.resource-guide__primer ol li span {
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.resource-guide__primer ol li p {
  margin: 0;
  color: var(--app-ink);
  line-height: 1.9;
}

.resource-guide__prompt-label {
  margin: 22px 0 8px;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.resource-guide__prompt {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: rgb(255 255 255 / 78%);
  border: 1px solid rgb(203 220 238 / 90%);
  border-radius: 14px;
  color: var(--app-ink);
  font-family: var(--app-utility), monospace;
  font-size: 0.82rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}

.resource-guide__examples {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-guide__examples li {
  padding: 10px 16px;
  background: rgb(255 255 255 / 62%);
  border: 1px solid rgb(208 223 240 / 80%);
  border-radius: 999px;
  color: var(--app-ink);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* 講座トップのヒーロー（/learn?format=<講座>。文字なしバナーを見出し下に敷く） */
.course-hero {
  margin: 26px 0 6px;
  overflow: hidden;
  border: 1px solid var(--app-glass-border);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgb(134 160 199 / 12%);
}

.course-hero img {
  display: block;
  width: 100%;
  height: clamp(170px, 26vw, 300px);
  object-fit: cover;
  object-position: center;
}

@media (width <= 720px) {
  .course-hero {
    margin-top: 18px;
    border-radius: 18px;
  }

  .course-hero img {
    height: clamp(140px, 38vw, 220px);
  }
}

/* ===== 教養としての美術史: 図版・カルーセル（art-course） ===== */
.article-figure {
  margin: 28px 0 8px;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 1px 8px rgba(11, 20, 36, 0.10);
}
.article-figure figcaption {
  margin-top: 8px;
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(11, 20, 36, 0.62);
  text-align: right;
}
.art-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 28px 0 8px;
  padding: 6px 2px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.art-carousel .art-slide {
  flex: 0 0 min(78%, 420px);
  margin: 0;
  scroll-snap-align: center;
}
.art-carousel .art-slide img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #f4f1ea;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(11, 20, 36, 0.08);
}
.art-carousel .art-slide figcaption {
  margin-top: 6px;
  font-size: 0.7rem;
  line-height: 1.5;
  color: rgba(11, 20, 36, 0.62);
}

/* 図版ライトボックス（美術史講座・静謐: 美術館の展示照明） */
.article-figure img,
.art-carousel .art-slide img {
  cursor: zoom-in;
}
.art-lightbox {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
  outline: none;
}
.art-lightbox::backdrop {
  background: rgba(11, 20, 36, 0.92);
}
.art-lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: zoom-out;
}
.art-lightbox figure img {
  max-width: min(94vw, 1280px);
  max-height: 82dvh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.art-lightbox figcaption {
  color: #e9f0f9;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  max-width: min(94vw, 720px);
}
.art-lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(233, 240, 249, 0.28);
  background: rgba(11, 20, 36, 0.6);
  color: #e9f0f9;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.art-lightbox-close:focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}
body:has(.art-lightbox[open]) {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .art-lightbox[open] {
    animation: art-lightbox-in 160ms ease-out;
  }
  .art-lightbox[open]::backdrop {
    animation: art-lightbox-fade 160ms ease-out;
  }
}
@keyframes art-lightbox-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes art-lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 初期仏教講座（bukkyo）: 経典引用と瞑想タイマー。レジスター=静謐、水一色・祝祭なし */
.prose .sutra-quote {
  margin: 2.2em 0;
  padding: 1.4rem 1.6rem;
  color: var(--app-ink, #0b1424);
  font-family: var(--display);
  background: linear-gradient(180deg, rgb(255 255 255 / 68%), rgb(238 245 251 / 68%));
  border: 1px solid var(--line);
  border-left: 2px solid var(--sky);
  border-radius: 0 12px 12px 0;
}

.prose .sutra-quote p {
  margin: 0;
  font-size: 1.02em;
  line-height: 2.05;
  letter-spacing: 0.03em;
}

.prose .sutra-quote p + p {
  margin-top: 0.9em;
}

.prose .sutra-quote cite {
  display: block;
  margin-top: 1rem;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.02em;
}

.prose .sutra-quote cite::before {
  content: "— ";
}

.prose .zazen-timer {
  max-width: 360px;
  margin: 2.6em auto;
  padding: 1.8rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--app-paper, rgb(255 255 255 / 72%));
  border: 1px solid var(--line);
  border-radius: 16px;
}

.zazen-timer__label {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.prose .zazen-timer__display {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 0 auto 1.3rem;
  color: var(--app-ink, #0b1424);
  font-family: var(--utility);
  font-size: 2.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff calc(100% - 4px), transparent calc(100% - 3px)),
    conic-gradient(var(--sky) calc(var(--zazen-progress, 100) * 1%), var(--line) 0);
}

.zazen-timer__presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 1rem;
}

.zazen-timer__presets button {
  min-width: 64px;
  padding: 0.6rem 1rem;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.86rem;
  background: rgb(255 255 255 / 85%);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.zazen-timer__presets button[aria-pressed='true'] {
  color: var(--sky);
  font-weight: 700;
  border-color: var(--sky);
}

.zazen-timer__presets button:disabled {
  opacity: 0.45;
  cursor: default;
}

.zazen-timer__start {
  min-width: 168px;
  padding: 0.85rem 1.4rem;
  color: #fff;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--sky);
  border: 1px solid var(--sky);
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.zazen-timer__start:hover {
  background: var(--sky-bright);
}

.zazen-timer__start[data-running='true'] {
  color: var(--sky);
  background: transparent;
}

.zazen-timer__start[data-running='true']:hover {
  background: var(--sky-pale);
}

.zazen-timer__presets button:focus-visible,
.zazen-timer__start:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.prose .zazen-timer__note {
  margin: 1rem 0 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

/* 文学史講座（bungaku）: 名文引用。原文＋現代語訳＋出典のblockquote。
   sutra-quote(bukkyo)を雛形に、質感は同じだが要素は<blockquote>のため
   基底の.prose blockquoteを上書きする複合セレクタで指定する。 */
.prose blockquote.meibun-quote {
  margin: 2.2em 0;
  padding: 1.4rem 1.6rem;
  color: var(--app-ink, #0b1424);
  font-family: var(--display);
  background: linear-gradient(180deg, rgb(255 255 255 / 68%), rgb(238 245 251 / 68%));
  border: 1px solid var(--line);
  border-left: 2px solid var(--sky);
  border-radius: 0 12px 12px 0;
}

.prose blockquote.meibun-quote p {
  margin: 0;
  font-size: 1.02em;
  line-height: 2.05;
  letter-spacing: 0.03em;
}

.prose blockquote.meibun-quote p + p {
  margin-top: 0.9em;
}

.prose blockquote.meibun-quote cite {
  display: block;
  margin-top: 1rem;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.02em;
}

.prose blockquote.meibun-quote cite::before {
  content: "— ";
}

/* 原文の直後に添える現代語訳（かっこ書き）。原文より控えめに。 */
.prose blockquote.meibun-quote p.quote-modern {
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.88em;
  line-height: 1.8;
}

/* 未購入ビュー(降格マスク)の告知帯。運用者のデバッグ中だけ出る固定ピル。
   マスク中であることを常に自覚できるよう、全ページ右下に静かに置く。 */
.view-mask-banner {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 16px;
  color: #e7f4ff;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  background: rgb(7 17 31 / 88%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgb(7 17 31 / 25%);
}

.view-mask-banner a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .view-mask-banner {
    right: 12px;
    bottom: 84px;
  }
}

/* 実験ウィジェット be-lab（行動経済学講座。DESIGN_DIRECTION.md「実験ウィジェット」） */
.be-lab {
  margin: 28px 0;
  padding: var(--app-panel-inset);
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--app-glass-border);
  border-radius: 16px;
}

.be-lab__kicker {
  margin: 0 0 12px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.be-lab__step + .be-lab__step {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--app-line);
}

.be-lab__q {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.9;
}

.be-lab__anchor {
  margin: 0 0 12px;
  color: var(--app-ink);
  font-size: 0.98rem;
  line-height: 1.9;
}

.be-lab__options {
  display: grid;
  gap: 10px;
}

.be-lab__option {
  min-height: 44px;
  padding: 12px 16px;
  color: var(--app-ink);
  font-family: var(--app-ui);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: left;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 180ms var(--app-ease), background 180ms var(--app-ease);
}

.be-lab__option:hover:not(:disabled) {
  border-color: var(--app-water);
  background: rgb(224 242 254 / 45%);
}

.be-lab__option:disabled {
  cursor: default;
  opacity: 0.45;
}

.be-lab__option.is-picked {
  opacity: 1;
  color: var(--app-water-dark);
  border-color: var(--app-water);
  background: rgb(224 242 254 / 78%);
}

.be-lab__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.be-lab__input {
  flex: 1;
  min-width: 130px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--app-ink);
  font-family: var(--app-utility);
  font-size: 1rem;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line-strong);
  border-radius: 12px;
}

.be-lab__input:focus-visible {
  outline: 2px solid var(--app-water);
  outline-offset: 1px;
}

.be-lab__unit {
  color: var(--app-muted);
  font-size: 0.87rem;
}

.be-lab__result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--app-water);
  border-radius: 12px;
  background: rgb(255 255 255 / 82%);
}

.be-lab__result-kicker {
  margin: 0 0 8px;
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.be-lab__verdict {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.8;
}

.be-lab__explain {
  margin: 0;
  color: var(--app-ink);
  font-size: 0.92rem;
  line-height: 1.9;
}

.be-lab__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.be-lab__stat {
  padding: 12px 14px;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line);
  border-radius: 10px;
}

.be-lab__stat-label {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.be-lab__stat-value {
  margin: 4px 0 0;
  font-family: var(--app-utility);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1;
}

.be-lab__note {
  margin: 12px 0 0;
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.8;
}

@media (max-width: 40rem) {
  .be-lab {
    padding: var(--app-panel-inset-mobile);
  }
}

/* α版の初回告知ダイアログ（正式版で撤去。DESIGN_DIRECTION.md シグネチャー） */
.alpha-notice {
  max-width: min(460px, calc(100vw - 40px));
  padding: 0;
  border: 1px solid var(--app-glass-border);
  border-radius: 24px;
  background: rgb(255 255 255 / 96%);
  box-shadow: var(--app-shadow);
  color: var(--app-ink);
}

.alpha-notice::backdrop {
  background: rgb(11 20 36 / 42%);
  backdrop-filter: blur(6px);
}

.alpha-notice__panel {
  display: grid;
  gap: 14px;
  padding: var(--app-panel-inset);
}

.alpha-notice__kicker {
  margin: 0;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.alpha-notice h2 {
  margin: 0;
  font-family: var(--app-reading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.alpha-notice p:not(.alpha-notice__kicker) {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.9;
}

.alpha-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 40rem) {
  .alpha-notice__panel {
    padding: var(--app-panel-inset-mobile);
  }
}

/* AI音声の読み間違い報告(site.js initVoiceReport)。導線はAI読み上げ注記と同じ
   静けさの一行、本体はalpha-noticeと同族の小ダイアログ。既存トークンのみ・祝祭なし */
/* 注記(.article-lecture__note)はmargin-bottom 30pxで並ぶが、報告リンクは注記の
   一員なので直前30pxを負マージンで8pxまで詰める(本文への下30pxは維持) */
.prose .article-lecture__note--report {
  margin-top: -22px;
}

.voice-report-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--app-muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.voice-report-open:hover,
.voice-report-open:focus-visible {
  color: var(--app-water-dark);
}

.voice-report {
  max-width: min(480px, calc(100vw - 40px));
}

.voice-report__target {
  color: var(--app-muted);
}

.voice-report__field {
  display: grid;
  gap: 6px;
}

.voice-report__field > span {
  color: var(--app-ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.voice-report__field em {
  margin-left: 8px;
  color: var(--danger);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.voice-report__field input,
.voice-report__field textarea {
  padding: 10px 12px;
  border: 1px solid var(--app-line-strong);
  border-radius: 10px;
  background: #ffffff;
  color: var(--app-ink);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.7;
}

.voice-report__field textarea {
  resize: vertical;
}

.voice-report__field input:focus-visible,
.voice-report__field textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* honeypot(bot対策)。displayでなく視覚外へ=自動入力botにはフォームの一部に見せる */
.voice-report__trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.voice-report__status {
  color: var(--app-ink-soft);
  font-size: 0.85rem;
}

.voice-report__status:empty {
  display: none;
}

/* =========================================================
   UI/UXデザイン基礎講座: 体験デモ部品(.uiux-demo系)
   正典: Desktop/main/uiux-course/demo/uiux-demos.css(開発正本)
   静謐レジスター準拠。疑似アプリ/様式見本の内側だけ教材として
   意図的に別世界の配色。インラインstyle禁止(CSP)・全て記事内HTML
   ========================================================= */
.uiux-demo {
  --demo-ink: #0b1424;
  --demo-water: #0369a1;
  --demo-gold: #a8842c;
  --demo-danger: #b4232a;
  --demo-line: rgba(11, 20, 36, 0.14);
  --demo-paper: #e9f0f9;
  margin: 32px 0;
  border: 1px solid var(--demo-line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--demo-ink);
}

.uiux-demo__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--demo-line);
  background: var(--demo-paper);
}

.uiux-demo__badge {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--demo-water);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.uiux-demo__title {
  font-family: "Shippori Mincho B1", serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.uiux-demo__body { padding: 20px; }

.uiux-demo__note {
  font-size: 12px;
  color: rgba(11, 20, 36, 0.55);
  margin: 12px 20px 16px;
}

/* ---------- 共通ボタン ---------- */

.uiux-demo .demo-btn {
  appearance: none;
  border: 1px solid var(--demo-water);
  background: #ffffff;
  color: var(--demo-water);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}

.uiux-demo .demo-btn:hover { background: rgba(3, 105, 161, 0.08); }
.uiux-demo .demo-btn:active { transform: translateY(1px); }

.uiux-demo .demo-btn--primary {
  background: var(--demo-water);
  color: #ffffff;
}

.uiux-demo .demo-btn--primary:hover { background: #024e78; }

.uiux-demo .demo-btn.is-selected {
  background: var(--demo-water);
  color: #ffffff;
}

/* =========================================================
   1. ビフォーアフター切替 .uiux-ba
   ========================================================= */

.uiux-ba__toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.uiux-ba__panel[hidden] { display: none; }

/* 題材: 通知カード(002余白用サンプル) */
.uiux-ba .sample-card {
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #ffffff;
  max-width: 420px;
}

.uiux-ba .sample-card__title { font-weight: 700; margin: 0; }
.uiux-ba .sample-card__text { margin: 0; font-size: 13.5px; line-height: 1.7; }
.uiux-ba .sample-card__meta { margin: 0; font-size: 11px; color: rgba(11, 20, 36, 0.5); }
.uiux-ba .sample-card__actions { display: flex; gap: 8px; }

.uiux-ba .sample-card--tight { padding: 6px; }
.uiux-ba .sample-card--tight .sample-card__title { margin-bottom: 2px; }
.uiux-ba .sample-card--tight .sample-card__text { margin-bottom: 2px; }
.uiux-ba .sample-card--tight .sample-card__meta { margin-bottom: 4px; }

.uiux-ba .sample-card--airy { padding: 24px; }
.uiux-ba .sample-card--airy .sample-card__title { margin-bottom: 10px; }
.uiux-ba .sample-card--airy .sample-card__text { margin-bottom: 16px; }
.uiux-ba .sample-card--airy .sample-card__meta { margin-bottom: 20px; }

/* 題材: 告知カード(004視覚階層用) */
.uiux-ba .sample-notice {
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #ffffff;
  max-width: 420px;
  padding: 20px;
}

.uiux-ba .sample-notice p { margin: 0 0 10px; }
.uiux-ba .sample-notice p:last-child { margin-bottom: 0; }

/* 全部主役版: 全要素が叫ぶ */
.sample-notice--shout .sample-notice__title {
  font-size: 19px; font-weight: 700; color: #b4232a;
}
.sample-notice--shout .sample-notice__body {
  font-size: 16px; font-weight: 700; color: #0369a1;
}
.sample-notice--shout .sample-notice__date {
  font-size: 16px; font-weight: 700; color: #b4232a; text-decoration: underline;
}
.sample-notice--shout .sample-notice__note {
  font-size: 15px; font-weight: 700; color: #a8842c;
}

/* 階層3段版: 主役1つ+脇役+その他 */
.sample-notice--calm .sample-notice__title {
  font-size: 17px; font-weight: 700; color: var(--demo-ink);
}
.sample-notice--calm .sample-notice__body {
  font-size: 13.5px; font-weight: 400; color: var(--demo-ink); line-height: 1.7;
}
.sample-notice--calm .sample-notice__date {
  font-size: 11px; font-weight: 400; color: rgba(11, 20, 36, 0.5);
}
.sample-notice--calm .sample-notice__note {
  font-size: 11px; font-weight: 400; color: rgba(11, 20, 36, 0.5);
}

/* 題材: 設定カード(006色用) */
.uiux-ba .sample-set {
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #ffffff;
  max-width: 420px;
  padding: 18px 20px;
}

.uiux-ba .sample-set__title { font-weight: 700; margin: 0 0 12px; }
.uiux-ba .sample-set__rows { list-style: none; margin: 0 0 14px; padding: 0; }
.uiux-ba .sample-set__rows li {
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.uiux-ba .sample-set__actions { display: flex; gap: 8px; }
.uiux-ba .sample-set__actions .demo-btn { font-size: 13px; padding: 8px 14px; }

/* カラフル版: 行ごとに色を塗り、削除が緑・保存が赤の事故つき */
.sample-set--rainbow .sample-set__title { color: #7f5af0; }
.sample-set--rainbow li:nth-child(1) { background: #ffe3ec; color: #b4236e; }
.sample-set--rainbow li:nth-child(2) { background: #e3f9e5; color: #1f7a2d; }
.sample-set--rainbow li:nth-child(3) { background: #fff3d6; color: #9a6b00; }
.sample-set--rainbow li:nth-child(4) { background: #e3edff; color: #2451b4; }
.sample-set--rainbow .demo-btn--save-red {
  background: #b4232a; border-color: #b4232a; color: #ffffff;
}
.sample-set--rainbow .demo-btn--delete-green {
  background: #1f7a2d; border-color: #1f7a2d; color: #ffffff;
}

/* 3色ルール版: 地は白・墨の文字・アクセントは保存の1箇所 */
.sample-set--triad li { background: #ffffff; border: 1px solid var(--demo-line); color: var(--demo-ink); }
.sample-set--triad .demo-btn--delete-quiet {
  border-color: var(--demo-danger); color: var(--demo-danger); background: #ffffff;
}

/* 題材: 空っぽ画面(017エンプティステート用) */
.uiux-ba .sample-empty {
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #ffffff;
  max-width: 420px;
  min-height: 220px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sample-empty--bare .sample-empty__msg {
  margin: 0;
  font-size: 12.5px;
  color: rgba(11, 20, 36, 0.45);
}

.sample-empty--guide .sample-empty__what {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 14.5px;
}

.sample-empty--guide .sample-empty__preview {
  width: 100%;
  max-width: 260px;
  border: 1px dashed rgba(11, 20, 36, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: 11.5px;
  color: rgba(11, 20, 36, 0.55);
  text-align: left;
}

.sample-empty--guide .sample-empty__preview p { margin: 0 0 4px; }
.sample-empty--guide .sample-empty__preview p:last-child { margin-bottom: 0; }

/* =========================================================
   2. クイズ .uiux-quiz
   ========================================================= */

.uiux-quiz__q {
  font-weight: 700;
  margin: 0 0 14px;
}

.uiux-quiz__choices {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.uiux-quiz__choice {
  text-align: left;
  border: 1px solid var(--demo-line);
  color: var(--demo-ink);
  background: #ffffff;
  font-weight: 400;
}

.uiux-quiz__choice:hover { background: rgba(3, 105, 161, 0.06); }

.uiux-quiz__choice.is-correct {
  border-color: var(--demo-water);
  background: rgba(3, 105, 161, 0.1);
  font-weight: 700;
}

.uiux-quiz__choice.is-wrong {
  border-color: var(--demo-danger);
  background: rgba(180, 35, 42, 0.07);
}

.uiux-quiz__explain {
  border-left: 3px solid var(--demo-gold);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.8;
  background: rgba(168, 132, 44, 0.06);
  border-radius: 0 8px 8px 0;
}

.uiux-quiz__explain[hidden] { display: none; }

/* =========================================================
   3. 疑似アプリ体験 .uiux-dark-demo(解約チャレンジ)
   疑似アプリの中だけ、意図的に俗な配色(教材)
   ========================================================= */

.uiux-dark-demo__stage {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: var(--demo-paper);
}

.fakeapp {
  width: 320px;
  border: 1px solid var(--demo-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(11, 20, 36, 0.12);
  overflow: hidden;
}

.fakeapp__bar {
  background: #e5304f;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fakeapp__bar-note {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.85;
}

.fakeapp__screen { padding: 16px; min-height: 300px; }
.fakeapp__screen[hidden] { display: none; }

.fakeapp__h { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.fakeapp__p { font-size: 12.5px; line-height: 1.7; margin: 0 0 12px; }
.fakeapp__small { font-size: 10.5px; color: #8a8f98; line-height: 1.6; margin: 0 0 12px; }

.fakeapp__hero {
  background: linear-gradient(135deg, #ff5f7a, #e5304f);
  color: #ffffff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 12px;
}

.fakeapp__hero-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.fakeapp__hero-sub { font-size: 11px; margin: 0; opacity: 0.9; }

.fakeapp__list { list-style: none; margin: 0; padding: 0; }

.fakeapp__row {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #eef0f3;
  font: inherit;
  font-size: 13px;
  padding: 13px 4px;
  cursor: pointer;
  color: #1c2430;
  display: flex;
  justify-content: space-between;
}

.fakeapp__row::after { content: "›"; color: #b0b6bf; }
.fakeapp__row:hover { background: #f7f8fa; }

/* 偽アプリのボタン語彙 */
.fakeapp .fbtn {
  appearance: none;
  border: none;
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  display: block;
  width: 100%;
  transition: transform 120ms ease-out, filter 120ms ease-out;
}

.fakeapp .fbtn:active { transform: translateY(1px); }

.fakeapp .fbtn--loud {
  background: #e5304f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
  margin-bottom: 10px;
}

.fakeapp .fbtn--loud:hover { filter: brightness(1.05); }

.fakeapp .fbtn--ghost {
  background: none;
  color: #9aa0a8;
  font-size: 11px;
  padding: 6px;
  text-decoration: underline;
}

.fakeapp .fbtn--honest {
  background: #0369a1;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
}

.fakeapp__choices { display: grid; gap: 8px; margin-bottom: 12px; }

.fakeapp label.fakeapp__radio {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.fakeapp__sad { font-size: 34px; text-align: center; margin: 4px 0 8px; }

/* カウンター+種明かし */
.uiux-dark-demo__meter {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 10px 16px;
  font-size: 12.5px;
  border-top: 1px solid var(--demo-line);
  background: #ffffff;
}

.uiux-dark-demo__meter strong { color: var(--demo-danger); }

.uiux-dark-demo__reveal {
  margin: 0 20px 20px;
  border-left: 3px solid var(--demo-gold);
  background: rgba(168, 132, 44, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
}

.uiux-dark-demo__reveal[hidden] { display: none; }

.uiux-dark-demo__reveal h4 {
  font-family: "Shippori Mincho B1", serif;
  font-size: 14px;
  margin: 0 0 8px;
}

.uiux-dark-demo__reveal ol {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.9;
}

.uiux-dark-demo__reveal p { font-size: 13px; margin: 0 0 10px; }

/* =========================================================
   4. スタイル図鑑 .uiux-style-demo
   同じ画面が6様式に着替える。様式ごとの見た目は教材として
   意図的に誇張気味に描く(サイト正典の枠外=体験の中身)
   ========================================================= */

.uiux-style-demo__toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.style-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 16px;
  border-radius: 10px;
  transition: background 160ms ease-out;
}

.sp-card {
  width: 264px;
  padding: 24px;
  text-align: center;
}

.sp-art {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.sp-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.sp-sub { font-size: 11.5px; margin: 0 0 16px; opacity: 0.7; }

.sp-bar {
  height: 6px;
  border-radius: 999px;
  margin-bottom: 18px;
  overflow: hidden;
}

.sp-fill {
  width: 40%;
  height: 100%;
  border-radius: 999px;
}

.sp-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.sp-side, .sp-play {
  appearance: none;
  border: none;
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.sp-side { width: 40px; height: 40px; border-radius: 50%; font-size: 13px; }
.sp-play { width: 56px; height: 56px; border-radius: 50%; font-size: 18px; }

/* --- 様式1: フラット --- */
.style--flat { background: #3f8fd4; }
.style--flat .sp-card { background: #ffffff; border-radius: 8px; color: #1e2a38; }
.style--flat .sp-art { background: #ff6b57; }
.style--flat .sp-bar { background: #e3e9f0; }
.style--flat .sp-fill { background: #3f8fd4; }
.style--flat .sp-side { background: #e3e9f0; color: #1e2a38; }
.style--flat .sp-play { background: #3f8fd4; color: #ffffff; }

/* --- 様式2: グラスモーフィズム --- */
.style--glass { background: linear-gradient(120deg, #7f5af0 0%, #2cb67d 100%); }
.style--glass .sp-card {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  color: #ffffff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.3);
}
.style--glass .sp-art { background: radial-gradient(circle at 30% 30%, #ffd76e, #ff6b9d); }
.style--glass .sp-bar { background: rgba(255, 255, 255, 0.25); }
.style--glass .sp-fill { background: #ffffff; }
.style--glass .sp-side { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
.style--glass .sp-play { background: rgba(255, 255, 255, 0.35); color: #ffffff; border: 1px solid rgba(255,255,255,.5); }

/* --- 様式3: ニューモーフィズム --- */
.style--neu { background: #e0e5ec; }
.style--neu .sp-card {
  background: #e0e5ec;
  border-radius: 24px;
  color: #5b6472;
  box-shadow: 9px 9px 18px #b8bec9, -9px -9px 18px #ffffff;
}
.style--neu .sp-art { background: #e0e5ec; box-shadow: inset 6px 6px 12px #b8bec9, inset -6px -6px 12px #ffffff; }
.style--neu .sp-bar { background: #e0e5ec; box-shadow: inset 3px 3px 6px #b8bec9, inset -3px -3px 6px #ffffff; }
.style--neu .sp-fill { background: #8fa1c0; }
.style--neu .sp-side,
.style--neu .sp-play { background: #e0e5ec; color: #5b6472; box-shadow: 5px 5px 10px #b8bec9, -5px -5px 10px #ffffff; }

/* --- 様式4: スキューモーフィズム --- */
.style--skeu { background: linear-gradient(180deg, #4a3428 0%, #2c1e16 100%); }
.style--skeu .sp-card {
  background: linear-gradient(180deg, #f7f3e8 0%, #d9d1bd 100%);
  border: 1px solid #b8ad92;
  border-radius: 14px;
  color: #3d3629;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 24px rgba(0, 0, 0, 0.5);
}
.style--skeu .sp-art {
  background: radial-gradient(circle, #f0e7d0 0 12%, #17130e 13% 40%, #2b241a 41% 55%, #17130e 56% 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}
.style--skeu .sp-bar { background: #b8ad92; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.3); }
.style--skeu .sp-fill { background: linear-gradient(180deg, #e0a33e, #b57a1c); }
.style--skeu .sp-side,
.style--skeu .sp-play {
  background: linear-gradient(180deg, #fdfaf2, #cfc5ab);
  border: 1px solid #a89c7e;
  color: #3d3629;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 6px rgba(0, 0, 0, 0.35);
}

/* --- 様式5: ブルータリズム --- */
.style--brutal { background: #ffe600; }
.style--brutal .sp-card {
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 0;
  color: #000000;
  box-shadow: 10px 10px 0 #000000;
}
.style--brutal .sp-title { text-transform: uppercase; letter-spacing: 0.04em; }
.style--brutal .sp-art { background: #ff3d00; border: 3px solid #000000; border-radius: 0; }
.style--brutal .sp-bar { background: #ffffff; border: 2px solid #000000; border-radius: 0; }
.style--brutal .sp-fill { background: #000000; border-radius: 0; }
.style--brutal .sp-side,
.style--brutal .sp-play { background: #ffffff; border: 3px solid #000000; border-radius: 0; color: #000000; }
.style--brutal .sp-play { background: #000000; color: #ffffff; }

/* --- 様式6: ミニマル --- */
.style--minimal { background: #f7f5f0; }
.style--minimal .sp-card { background: transparent; color: #26221c; }
.style--minimal .sp-title { font-family: "Shippori Mincho B1", serif; font-weight: 400; font-size: 18px; }
.style--minimal .sp-art { background: transparent; border: 1px solid #26221c; }
.style--minimal .sp-bar { background: rgba(38, 34, 28, 0.15); height: 2px; }
.style--minimal .sp-fill { background: #26221c; }
.style--minimal .sp-side { background: transparent; color: #26221c; }
.style--minimal .sp-play { background: transparent; border: 1px solid #26221c; color: #26221c; }

/* 様式キャプション */
.uiux-style-demo__caption { margin-top: 16px; }
.uiux-style-demo__caption [data-style-caption] {
  border-left: 3px solid var(--demo-gold);
  background: rgba(168, 132, 44, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.8;
}
.uiux-style-demo__caption [data-style-caption][hidden] { display: none; }

/* =========================================================
   5. 返事の体験 .uiux-fb(010フィードバック)
   ========================================================= */

.uiux-fb__row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.uiux-fb__cell {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.uiux-fb__label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(11, 20, 36, 0.6);
  margin: 0 0 12px;
}

.uiux-fb__btn { width: 100%; }

/* 返事なし版: hover/activeの反応も意図的に殺す(教材) */
.uiux-fb__btn--silent,
.uiux-fb__btn--silent:hover,
.uiux-fb__btn--silent:active {
  background: #ffffff;
  color: var(--demo-ink);
  border-color: var(--demo-line);
  transform: none;
  transition: none;
}

.uiux-fb__btn.is-busy {
  position: relative;
  color: transparent;
}

.uiux-fb__btn.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  animation: uiux-spin 700ms linear infinite;
}

@keyframes uiux-spin {
  to { transform: rotate(360deg); }
}

.uiux-fb__status {
  font-size: 12px;
  line-height: 1.7;
  margin: 10px 0 0;
  color: var(--demo-water);
  font-weight: 700;
}

.uiux-fb__status[hidden] { display: none; }

/* =========================================================
   6. 選択肢の体験 .uiux-choice(011ジャムの法則)
   ========================================================= */

.uiux-choice__mission {
  font-weight: 700;
  margin: 0 0 14px;
}

.uiux-choice__toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.uiux-choice__hint {
  font-size: 12.5px;
  color: rgba(11, 20, 36, 0.55);
  margin: 0;
}

.uiux-choice__hint[hidden] { display: none; }

.uiux-choice__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.uiux-choice__grid[hidden] { display: none; }

.uiux-choice .choice-item {
  appearance: none;
  border: 1px solid var(--demo-line);
  background: #ffffff;
  color: var(--demo-ink);
  font: inherit;
  font-size: 12px;
  border-radius: 8px;
  padding: 10px 6px;
  min-height: 44px;
  cursor: pointer;
  transition: background 160ms ease-out;
}

.uiux-choice .choice-item:hover { background: rgba(3, 105, 161, 0.06); }

.uiux-choice .choice-item.is-found {
  border-color: var(--demo-water);
  background: rgba(3, 105, 161, 0.1);
  font-weight: 700;
}

.uiux-choice__result {
  border-left: 3px solid var(--demo-gold);
  background: rgba(168, 132, 44, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.8;
  margin: 14px 0 0;
}

.uiux-choice__result[hidden] { display: none; }

/* =========================================================
   7. 違和感クイズ .pair-quiz(Webデザイン講座ichimai)
   2枚のミニカードから「プロっぽい方」を選ぶ。
   ミニモック(.pq-*)は無彩+水・金が正。色祭りの誤答例だけ、
   fakeapp同様に意図的な俗配色(教材)
   ========================================================= */

.pair-quiz__intro {
  font-size: 13.5px;
  line-height: 1.8;
  margin: 0 0 18px;
}

.pair-quiz__item { margin: 0 0 22px; }
.pair-quiz__item:last-of-type { margin-bottom: 0; }

.pair-quiz__q {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 0 10px;
}

.pair-quiz__no {
  color: var(--demo-water);
  margin-right: 8px;
  letter-spacing: 0.06em;
}

.pair-quiz__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pair-quiz__panel {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out;
}

.pair-quiz__panel:hover:not(:disabled) {
  border-color: var(--demo-water);
  box-shadow: 0 4px 14px rgba(11, 20, 36, 0.08);
}

.pair-quiz__panel:focus-visible {
  outline: 2px solid var(--demo-water);
  outline-offset: 2px;
}

.pair-quiz__panel:disabled { cursor: default; }

.pair-quiz__tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--demo-ink);
  opacity: 0.55;
  margin: 0 0 6px 2px;
}

/* 答え合わせ: プロの型=水の枠+札、外した方=沈める */
.pair-quiz__item.is-answered .pair-quiz__panel.is-pro {
  border-color: var(--demo-water);
  box-shadow: 0 0 0 1px var(--demo-water) inset;
}

.pair-quiz__item.is-answered .pair-quiz__panel.is-pro .pair-quiz__tag {
  color: var(--demo-water);
  opacity: 1;
}

.pair-quiz__item.is-answered .pair-quiz__panel.is-pro .pair-quiz__tag::after {
  content: " ─ プロの型";
  letter-spacing: 0.06em;
}

.pair-quiz__item.is-answered .pair-quiz__panel.is-miss { opacity: 0.45; }

.pair-quiz__explain {
  border-left: 3px solid var(--demo-gold);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.8;
  background: rgba(168, 132, 44, 0.06);
  border-radius: 0 8px 8px 0;
  margin-top: 10px;
}

.pair-quiz__explain[hidden] { display: none; }

.pair-quiz__score {
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: var(--demo-paper);
  font-size: 13.5px;
  font-weight: 700;
}

.pair-quiz__score[hidden] { display: none; }

/* ミニモック: 抽象化した告知カード。span積みで文字なし */
.pq-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid var(--demo-line);
  border-radius: 6px;
  background: var(--demo-paper);
  min-height: 96px;
  justify-content: center;
}

.pq-mock--tight { gap: 3px; padding: 8px 10px; }
.pq-mock--airy { gap: 11px; padding: 18px 14px; }

.pq-bar,
.pq-line,
.pq-btn { display: block; border-radius: 3px; }

.pq-bar { height: 9px; background: var(--demo-ink); }
.pq-line { height: 5px; background: rgba(11, 20, 36, 0.28); }
.pq-btn { height: 13px; background: var(--demo-water); border-radius: 999px; }
.pq-btn--gold { background: var(--demo-gold); }

/* 幅ユーティリティと置き方 */
.pq-w35 { width: 35%; }
.pq-w50 { width: 50%; }
.pq-w65 { width: 65%; }
.pq-w80 { width: 80%; }
.pq-w95 { width: 95%; }
.pq--c { align-self: center; }
.pq--in { margin-left: 18%; }

/* 色祭りの誤答例だけの俗配色(教材) */
.pq-line--red { background: #c04a52; }
.pq-line--green { background: #4a7c59; }
.pq-line--orange { background: #c07b3a; }
.pq-btn--pink { background: #c06a8a; }

/* レスポンシブ: 狭幅でも横溢れさせない */
@media (max-width: 400px) {
  .uiux-demo__body,
  .uiux-dark-demo__stage { padding: 12px; }
  .fakeapp { width: 100%; }
  .sp-card { width: 100%; }
  .pair-quiz__pair { gap: 8px; }
  .pq-mock { min-height: 78px; padding: 10px 8px; }
}

/* 法務フッター(全ページ共通)。静かに・小さく・中央。モバイルは固定下部ナビの上へ */
.site-legal {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 44px 20px 36px;
  font-size: 12px;
}
.site-legal a {
  color: var(--ink-faint);
  text-decoration: none;
}
.site-legal a:hover {
  color: var(--sky);
}
@media (max-width: 60rem) {
  .site-legal {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

/* 準備中カード(棚v4=コース制)。リンクなし・淡色・「準備中」チップだけの静かな札。
   基底の.course-cardより後ろ=カスケードで勝たせる(新しい上乗せ層は作らない掟の範囲内の追記) */
.course-card--soon {
  cursor: default;
}
.course-card--soon:hover,
.course-card--soon:focus-visible {
  transform: none;
  box-shadow: none;
  border-color: rgb(11 20 36 / 12%);
}
.course-card--soon .course-card__banner img {
  opacity: 0.55;
  filter: saturate(0.6);
}
.course-card--soon .course-card__body h3,
.course-card--soon .course-card__body p {
  color: rgb(11 20 36 / 55%);
}
.course-card__chip--soon {
  background: rgb(11 20 36 / 6%);
  border-color: rgb(11 20 36 / 14%);
  color: rgb(11 20 36 / 55%);
}
.guest-shelf__item--soon {
  cursor: default;
}
.guest-shelf__item--soon:hover {
  transform: none;
  box-shadow: none;
}
.guest-shelf__item--soon .guest-shelf__art img {
  opacity: 0.55;
  filter: saturate(0.6);
}
.guest-shelf__item--soon .guest-shelf__copy strong,
.guest-shelf__item--soon .guest-shelf__copy small,
.guest-shelf__item--soon .guest-shelf__fact b,
.guest-shelf__item--soon .guest-shelf__fact small {
  color: rgb(11 20 36 / 55%);
}

/* 実験ウィジェット st-lab（統計学講座。be-labの姉妹版。DESIGN_DIRECTION.md「実験ウィジェット」） */
.st-lab {
  margin: 28px 0;
  padding: var(--app-panel-inset);
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--app-glass-border);
  border-radius: 16px;
}

.st-lab__kicker {
  margin: 0 0 6px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.st-lab__title {
  margin: 0 0 14px;
  font-family: var(--app-reading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.st-lab__q {
  margin: 14px 0 10px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.9;
}

.st-lab__chart {
  display: block;
  width: 100%;
  height: auto;
  margin: 12px 0 4px;
}

.st-lab__axis {
  stroke: var(--app-line-strong);
  stroke-width: 1;
}

.st-lab__frame {
  fill: rgb(255 255 255 / 65%);
  stroke: var(--app-line);
}

.st-lab__guide {
  stroke: var(--app-line-strong);
  stroke-dasharray: 4 4;
}

.st-lab__line {
  fill: none;
  stroke: var(--app-water-dark);
  stroke-width: 2;
  stroke-linejoin: round;
}

.st-lab__dot {
  fill: var(--app-water-dark);
  opacity: 0.82;
}

.st-lab__dot--plain {
  fill: #64748b;
}

.st-lab__dot--hot {
  fill: #b45309;
}

.st-lab__dot--winter { fill: #2563eb; }
.st-lab__dot--spring { fill: #059669; }
.st-lab__dot--summer { fill: #dc2626; }
.st-lab__dot--autumn { fill: #d97706; }

.st-lab__marker--mean {
  stroke: var(--app-water-dark);
  stroke-width: 2;
}

.st-lab__marker--median {
  stroke: #059669;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}

.st-lab__mark {
  stroke: var(--app-water-dark);
  stroke-width: 1.5;
  opacity: 0.6;
}

.st-lab__mark--hit {
  stroke: #dc2626;
  stroke-width: 2.5;
  opacity: 1;
}

.st-lab__tick {
  fill: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 10px;
}

.st-lab__tick--mean { fill: var(--app-water-dark); font-weight: 700; }
.st-lab__tick--median { fill: #059669; font-weight: 700; }
.st-lab__tick--hot { fill: #b45309; }

.st-lab__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}

.st-lab__chip {
  min-height: 38px;
  padding: 8px 14px;
  color: var(--app-ink);
  font-family: var(--app-ui);
  font-size: 0.87rem;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 180ms var(--app-ease), background 180ms var(--app-ease);
}

.st-lab__chip:hover {
  border-color: var(--app-water);
}

.st-lab__chip.is-active {
  color: var(--app-water-dark);
  border-color: var(--app-water);
  background: rgb(224 242 254 / 78%);
}

.st-lab__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.st-lab__ghost {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--app-muted);
  font-family: var(--app-ui);
  font-size: 0.85rem;
  background: transparent;
  border: 1px dashed var(--app-line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 180ms var(--app-ease), color 180ms var(--app-ease);
}

.st-lab__ghost:hover {
  color: var(--app-water-dark);
  border-color: var(--app-water);
}

.st-lab__doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.st-lab__door {
  min-height: 78px;
  padding: 10px;
  color: var(--app-ink);
  font-family: var(--app-ui);
  font-size: 0.92rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgb(255 255 255 / 92%), rgb(224 242 254 / 40%));
  border: 1px solid var(--app-line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 180ms var(--app-ease), transform 180ms var(--app-ease);
}

.st-lab__door:hover:not(:disabled) {
  border-color: var(--app-water);
  transform: translateY(-2px);
}

.st-lab__door:disabled {
  cursor: default;
  opacity: 0.55;
}

.st-lab__door.is-open {
  opacity: 0.35;
  border-style: dashed;
}

.st-lab__door.is-picked {
  opacity: 1;
  color: var(--app-water-dark);
  border-color: var(--app-water);
  background: rgb(224 242 254 / 78%);
}

.st-lab__slider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.st-lab__slider input[type='range'] {
  flex: 1;
  min-width: 150px;
  accent-color: var(--app-water-dark);
}

.st-lab__slider-label {
  flex-basis: 100%;
  color: var(--app-ink);
  font-size: 0.87rem;
}

.st-lab__slider-value {
  min-width: 64px;
  font-family: var(--app-utility);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: right;
}

.st-lab__bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.st-lab__bar-label {
  flex: 0 0 130px;
  color: var(--app-ink);
  font-size: 0.83rem;
}

.st-lab__bar-track {
  flex: 1;
  height: 14px;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  overflow: hidden;
}

.st-lab__bar-fill {
  height: 100%;
  background: var(--app-water-dark);
  border-radius: 999px;
  transition: width 300ms var(--app-ease);
}

.st-lab__bar-pct {
  flex: 0 0 44px;
  font-family: var(--app-utility);
  font-size: 0.87rem;
  font-weight: 600;
  text-align: right;
}

.st-lab__group {
  margin: 12px 0;
  padding: 12px 14px;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line);
  border-radius: 12px;
}

.st-lab__group .st-lab__q {
  margin: 0 0 8px;
}

.st-lab__posbar {
  display: flex;
  height: 22px;
  margin: 14px 0 8px;
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
  overflow: hidden;
}

.st-lab__posbar-tp {
  background: var(--app-water-dark);
  transition: width 300ms var(--app-ease);
}

.st-lab__posbar-fp {
  flex: 1;
  background: #fbbf24;
}

.st-lab__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
}

.st-lab__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.st-lab__legend-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #64748b;
}

.st-lab__legend-item--winter::before { background: #2563eb; }
.st-lab__legend-item--spring::before { background: #059669; }
.st-lab__legend-item--summer::before { background: #dc2626; }
.st-lab__legend-item--autumn::before { background: #d97706; }
.st-lab__legend-item--tp::before { background: var(--app-water-dark); }
.st-lab__legend-item--fp::before { background: #fbbf24; }

.st-lab__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.st-lab__stat {
  padding: 12px 14px;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line);
  border-radius: 10px;
}

.st-lab__stat-label {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.st-lab__stat-value {
  margin: 4px 0 0;
  font-family: var(--app-utility);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
}

.st-lab__caption {
  margin: 10px 0 0;
  color: var(--app-ink);
  font-size: 0.9rem;
  line-height: 1.9;
}

.st-lab__verdict {
  margin: 10px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
}

.st-lab__result {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--app-water);
  border-radius: 12px;
  background: rgb(255 255 255 / 82%);
}

.st-lab__result-kicker {
  margin: 0 0 8px;
  color: var(--app-water-dark);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.st-lab__explain {
  margin: 0 0 4px;
  color: var(--app-ink);
  font-size: 0.9rem;
  line-height: 1.9;
}

.st-lab__bignum {
  margin: 8px 0 0;
  font-family: var(--app-utility);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--app-water-dark);
}

.st-lab__history {
  margin: 8px 0;
}

.st-lab__history-item {
  margin: 3px 0;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.85rem;
  line-height: 1.7;
}

.st-lab__history-item:first-child {
  color: var(--app-ink);
  font-weight: 600;
}

.st-lab__note {
  margin: 12px 0 0;
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.8;
}

.st-lab__recap {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.st-lab__recap-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 9px 14px;
  color: var(--app-ink);
  text-decoration: none;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  transition: border-color 180ms var(--app-ease);
}

.st-lab__recap-item:hover {
  border-color: var(--app-water);
}

.st-lab__recap-ep {
  flex: 0 0 56px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.78rem;
}

.st-lab__recap-label {
  font-size: 0.92rem;
  font-weight: 500;
}

.st-lab__stage {
  margin: 6px 0;
}

@media (max-width: 40rem) {
  .st-lab {
    padding: var(--app-panel-inset-mobile);
  }

  .st-lab__bar-label {
    flex-basis: 96px;
  }
}

/* 量子実験室 qm-lab(量子力学講座ryoshi)。st-labの姉妹版 */
.qm-lab {
  margin: 28px 0;
  padding: var(--app-panel-inset);
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--app-glass-border);
  border-radius: 16px;
}

.qm-lab__kicker {
  margin: 0 0 6px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.qm-lab__title {
  margin: 0 0 14px;
  font-family: var(--app-reading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.qm-lab__q {
  margin: 14px 0 10px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.9;
}

.qm-lab__canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 12px 0 4px;
  border-radius: 12px;
}

.qm-lab__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.qm-lab__ghost {
  padding: 8px 14px;
  color: var(--app-muted);
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  cursor: pointer;
}

.qm-lab__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.qm-lab__chip {
  padding: 7px 14px;
  color: var(--app-muted);
  font-size: 0.85rem;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 180ms var(--app-ease), color 180ms var(--app-ease);
}

.qm-lab__chip.is-active {
  color: var(--app-ink);
  font-weight: 600;
  border-color: var(--app-water);
}

.qm-lab__panels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 4px;
}

.qm-lab__panel {
  flex: 1 1 220px;
  padding: 12px;
  text-align: center;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--app-line);
  border-radius: 12px;
}

.qm-lab__panel-label {
  margin: 0 0 8px;
  color: var(--app-muted);
  font-family: var(--app-utility);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.qm-lab__coin {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 6px auto 12px;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--app-muted);
  background: rgb(16 24 40 / 5%);
  border: 1px dashed var(--app-line);
  border-radius: 999px;
  transition: border-color 180ms var(--app-ease), background 180ms var(--app-ease);
}

.qm-lab__coin.is-measured {
  color: var(--app-ink);
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--app-water);
}

.qm-lab__slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
}

.qm-lab__slider {
  flex: 1 1 auto;
}

.qm-lab__slider-cap {
  color: var(--app-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.qm-lab__stat-line {
  margin: 8px 0 0;
  font-family: var(--app-utility);
  font-size: 0.85rem;
  color: var(--app-ink);
}

.qm-lab__note {
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.85rem;
  line-height: 1.9;
}

@media (max-width: 40rem) {
  .qm-lab {
    padding: var(--app-panel-inset-mobile);
  }
}

/* ── 計測の間(管理者アクセス解析) ────────────────────────
   精密レジスター: データ密度・等幅数字・装飾なし。金は使わない(ロック/限定専用)。 */

.analytics-main {
  display: grid;
  gap: 28px;
}

.an-lede {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.an-range {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.an-range__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 120ms ease-out, color 120ms ease-out;
}

.an-range__link:hover {
  border-color: var(--sky);
  color: var(--sky);
}

.an-range__link[aria-current='page'] {
  border-color: var(--sky);
  background: var(--sky-pale);
  color: var(--sky);
  font-weight: 600;
}

.an-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.an-stat {
  display: grid;
  gap: 6px;
  padding: var(--app-panel-inset-narrow, 18px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.an-stat__label {
  color: var(--ink-faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.an-stat__value {
  font-family: var(--utility);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.an-panel {
  padding: var(--app-panel-inset, 30px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.an-heading {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
}

.an-trend svg {
  display: block;
  width: 100%;
  height: 120px;
}

.an-trend {
  margin: 0;
}

.an-trend__range {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--ink-faint);
  font-family: var(--utility);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.an-scroll {
  overflow-x: auto;
}

.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.an-table th,
.an-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.an-table thead th {
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.an-table tbody th {
  font-weight: 500;
  color: var(--ink);
}

.an-table tbody tr:last-child th,
.an-table tbody tr:last-child td {
  border-bottom: 0;
}

.an-table tbody tr:hover th,
.an-table tbody tr:hover td {
  background: var(--paper-cool);
}

.an-num {
  text-align: right;
  font-family: var(--utility);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.an-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.an-note {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.an-empty {
  color: var(--ink-faint);
  font-size: 0.88rem;
}

@media (max-width: 46rem) {
  .an-summary {
    grid-template-columns: 1fr;
  }

  .an-panel {
    padding: var(--app-panel-inset-mobile, 22px);
  }
}
