/*
 * /courses と /courses/thanks。このページ専用。
 * 公式サイトの緑（#166534）に合わせ、ライトとダークの両方で読めるようにする。
 */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #1e293b;
  --muted: #334155;
  --surface: #f1f3f5;
  --border: #e2e8f0;
  --green: #166534;
  --green-text: #166534;
  --on-green: #ffffff;
  --focus: #0284c7;
  --danger: #991b1b;
  --banner-bg: #fff7ed;
  --banner-text: #9a3412;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f172a;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --surface: #1e293b;
    --border: #334155;
    --green: #166534;
    --green-text: #86efac;
    --on-green: #ffffff;
    --focus: #7dd3fc;
    --danger: #fecaca;
    --banner-bg: #431407;
    --banner-text: #ffedd5;
  }

  .callout {
    border-color: #86efac;
    background: #052e16;
    color: #dcfce7;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  touch-action: manipulation;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page {
  width: min(100%, 32rem);
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.brand {
  margin: 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
  color: var(--green-text);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

h1 {
  margin: 4px 0 16px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin: 8px 0 4px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.back[hidden] {
  display: none;
}

.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px 4px 4px 12px;
  border-radius: 12px;
  background: var(--banner-bg);
  color: var(--banner-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.banner[hidden] {
  display: none;
}

.banner p {
  margin: 0;
  flex: 1;
}

.banner-close {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  margin: 0;
}

.message.is-error,
.is-error {
  color: var(--danger);
}

#join-error:empty {
  display: none;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

button.card {
  cursor: pointer;
  appearance: none;
}

article.card {
  cursor: default;
}

.card-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
}

.card-line {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.card-meta {
  color: var(--text);
  font-weight: 700;
}

.card-about {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}

.card-yen {
  margin: 4px 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-go,
.join,
.retry,
.go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: var(--on-green);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.card-go {
  margin-top: 8px;
  pointer-events: none;
}

.lead p {
  margin: 0 0 8px;
}

.after {
  margin-top: 28px;
}

.after h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.after ul,
.after ol {
  margin: 0 0 8px;
  padding-left: 1.4em;
}

.after li {
  margin: 0 0 4px;
}

.after p {
  margin: 0 0 8px;
}

.after a,
.foot a,
.thanks .note a {
  text-decoration: underline;
}

.after a {
  color: var(--green-text);
}

.callout {
  margin: 0;
  padding: 16px;
  border: 2px solid #166534;
  border-radius: 16px;
  background: #f0fdf4;
  color: #14532d;
}

.callout p {
  margin: 0 0 8px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.callout-price {
  font-size: 1.2rem;
  font-weight: 700;
}

.refund-note {
  margin: 0 0 12px;
  padding: 16px;
  border: 2px solid var(--banner-text);
  border-radius: 16px;
  background: var(--banner-bg);
  color: var(--banner-text);
  font-weight: 700;
}

.refund-note p {
  margin: 0 0 8px;
}

.refund-note p:last-child {
  margin-bottom: 0;
  font-weight: 500;
}

.refund-note a,
.doc-links a {
  color: inherit;
  text-decoration: underline;
}

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.doc-links a {
  color: var(--green-text);
}

.join:disabled,
.retry:disabled,
button.card:disabled {
  opacity: 0.65;
  cursor: progress;
}

.thanks p {
  margin: 0 0 16px;
  font-size: 1.125rem;
}

.thanks .note {
  color: var(--muted);
  font-size: 0.875rem;
}

.thanks .go {
  margin-top: 8px;
}

section[hidden] {
  display: none;
}

@media (hover: hover) {
  button.card:hover {
    border-color: var(--green-text);
  }

  .join:hover,
  .retry:hover,
  .go:hover {
    background: #14532d;
  }
}

/* 返金・キャンセルポリシーへの案内（ページの一番下） */
.foot {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 18%, transparent);
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
}
.foot p { margin: 0 0 8px; }
.foot a, .thanks .note a { color: inherit; }
