:root {
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-strong: #f8fbfa;
  --ink: #17221f;
  --muted: #60706b;
  --line: #dbe7e2;
  --teal: #0f766e;
  --teal-dark: #0b4f49;
  --mint: #dff5ec;
  --yellow: #ffd166;
  --coral: #f9735b;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(15, 78, 72, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, 0.08), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(249, 115, 91, 0.09), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(219, 231, 226, 0.9);
  background: rgba(244, 248, 246, 0.92);
  backdrop-filter: blur(18px);
}

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

.brand img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

.primary-button {
  border: 1px solid var(--teal-dark);
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--teal-dark);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero-panel,
.dashboard,
.membership-panel {
  display: grid;
  gap: 20px;
}

.hero-panel {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  align-items: stretch;
}

.hero-copy,
.status-board,
.news-panel,
.progress-panel,
.guide-panel,
.membership-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 340px;
  padding: clamp(26px, 5vw, 54px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
}

.status-board {
  display: grid;
  align-content: space-between;
  padding: 22px;
}

.cat-frame {
  display: grid;
  min-height: 210px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.38), transparent 55%),
    var(--mint);
}

.cat-frame img {
  width: min(210px, 76%);
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(23, 34, 31, 0.16));
}

.status-board dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.status-board div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.status-board dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-board dd {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.quick-card {
  display: grid;
  min-height: 142px;
  align-content: end;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 78, 72, 0.08);
}

.quick-card.public {
  border-top: 5px solid var(--teal);
}

.quick-card.member {
  border-top: 5px solid var(--coral);
}

.quick-card.book {
  border-top: 5px solid var(--yellow);
}

.quick-card.archive {
  border-top: 5px solid var(--blue);
}

.card-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.quick-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.quick-card small {
  color: var(--muted);
  font-weight: 700;
}

.dashboard {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.membership-ribbon,
.theme-panel,
.apps-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.membership-ribbon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 20px 0;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(249, 115, 91, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(255, 209, 102, 0.24), transparent 72%),
    var(--surface);
}

.membership-ribbon h2 {
  max-width: 860px;
  margin-bottom: 8px;
  font-size: clamp(22px, 3vw, 30px);
}

.membership-ribbon p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.theme-panel,
.apps-panel {
  margin-top: 20px;
  padding: 22px;
}

.theme-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.theme-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--teal-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 13px;
  white-space: nowrap;
}

.theme-tabs button.is-active {
  border-color: var(--teal-dark);
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.16);
}

.theme-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
}

.theme-copy,
.theme-member-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-strong);
}

.theme-copy h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.theme-copy p:not(.eyebrow),
.theme-member-cta p {
  color: var(--muted);
}

.theme-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.theme-stats span,
.mini-apps span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.theme-member-cta {
  display: grid;
  align-content: start;
  gap: 12px;
  border-color: rgba(249, 115, 91, 0.36);
  background: #fff5f2;
}

.theme-member-cta strong {
  color: #9f2d1a;
  font-size: 18px;
}

.mini-apps {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.mini-apps span {
  background: white;
  color: #9f2d1a;
}

.theme-video-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 146px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-strong);
}

.video-card.is-public {
  border-top: 5px solid var(--teal);
}

.video-card.is-tool {
  border-top: 5px solid var(--blue);
  background: #f5f8ff;
}

.video-card.is-member {
  border: 2px solid var(--coral);
  border-top-width: 7px;
  background:
    linear-gradient(135deg, rgba(249, 115, 91, 0.12), transparent 64%),
    #fff5f2;
  box-shadow: 0 14px 30px rgba(249, 115, 91, 0.14);
}

.video-kind {
  justify-self: start;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.video-card.is-member .video-kind {
  background: var(--coral);
  color: white;
}

.video-card.is-tool .video-kind {
  background: #dbeafe;
  color: #1e3a8a;
}

.video-card strong {
  font-size: 17px;
  line-height: 1.35;
}

.video-card small {
  color: var(--muted);
  font-weight: 800;
}

.video-card em {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #9f2d1a;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.app-card {
  display: grid;
  gap: 10px;
  min-height: 188px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-strong);
}

.app-card img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.app-card strong {
  font-size: 18px;
}

.app-card small {
  color: var(--muted);
  font-weight: 700;
}

.news-panel,
.progress-panel,
.guide-panel {
  padding: 22px;
}

.section-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.news-tabs,
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.news-tabs button,
.filter-row button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 12px;
}

.news-tabs button.is-active,
.filter-row button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.news-list {
  display: grid;
  gap: 10px;
}

.news-item {
  display: grid;
  grid-template-columns: 48px 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
}

.news-item time,
.news-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.news-item span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-dark);
}

.progress-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 2px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--mint);
}

.progress-summary strong {
  color: var(--teal-dark);
  font-size: 30px;
  line-height: 1;
}

.progress-summary span {
  color: var(--teal-dark);
  font-weight: 900;
}

.lesson-list {
  display: grid;
  gap: 12px;
}

.lesson-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-strong);
}

.lesson-card.is-done {
  border-color: rgba(15, 118, 110, 0.42);
  background: #eefaf5;
}

.lesson-check {
  width: 26px;
  height: 26px;
  accent-color: var(--teal);
  margin-top: 3px;
}

.lesson-main {
  min-width: 0;
}

.lesson-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.pill.public {
  background: var(--mint);
  color: var(--teal-dark);
}

.pill.member {
  background: #ffe8e2;
  color: #9f2d1a;
}

.pill.topic {
  background: #eef2ff;
  color: #1e3a8a;
}

.lesson-title {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.35;
}

.lesson-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lesson-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.watch-button,
.save-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.watch-button {
  border: 1px solid var(--teal);
  background: white;
  color: var(--teal-dark);
  padding: 8px 12px;
}

.save-button {
  width: 36px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.save-button.is-saved {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #3c2c00;
}

.book-panel,
.guide-panel {
  margin-top: 20px;
}

.book-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.book-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.book-total {
  display: inline-flex;
  min-width: 96px;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--yellow);
  color: #3c2c00;
  font-weight: 900;
}

.book-total strong {
  font-size: 42px;
  line-height: 1;
}

.book-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.book-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.book-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
  min-height: 122px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
}

.book-card.is-member {
  border-color: rgba(249, 115, 91, 0.36);
  background: #fff5f2;
}

.book-number,
.book-kind {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.book-number {
  background: var(--ink);
  color: white;
}

.book-kind {
  background: var(--mint);
  color: var(--teal-dark);
}

.book-card.is-member .book-kind {
  background: #ffe8e2;
  color: #9f2d1a;
}

.book-card strong,
.book-card small {
  grid-column: 1 / -1;
}

.book-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.book-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.guide-grid a {
  display: grid;
  gap: 6px;
  min-height: 130px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-strong);
}

.guide-grid span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.guide-grid strong {
  font-size: 18px;
}

.guide-grid small {
  color: var(--muted);
  font-weight: 700;
}

.membership-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 20px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.28), transparent 38%),
    var(--surface);
}

.membership-panel p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer strong {
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions a,
  .hero-actions a,
  .membership-panel a {
    flex: 1;
  }

  .hero-panel,
  .dashboard,
  .membership-panel,
  .membership-ribbon,
  .theme-detail {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .theme-video-grid,
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-heading {
    flex-direction: column;
  }

  .book-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lesson-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .brand strong {
    white-space: normal;
  }

  .hero-copy,
  .status-board,
  .news-panel,
  .progress-panel,
  .guide-panel,
  .membership-panel {
    padding: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .news-item {
    grid-template-columns: 42px 42px minmax(0, 1fr);
  }

  .book-list {
    grid-template-columns: 1fr;
  }

  .theme-video-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }
}
