:root {
  --bg: #f6ead8;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffdf9;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(92, 77, 60, 0.15);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --gold: #d97706;
  --rose: #be123c;
  --shadow: 0 24px 50px rgba(91, 73, 54, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(180deg, #f9f0e2 0%, #f4e5cf 100%);
  min-height: 100vh;
}

button,
select,
textarea {
  font: inherit;
}

.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.hero {
  display: grid;
  gap: 20px;
  padding: 20px 4px 12px;
}

.eyebrow,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent-strong);
  margin: 0 0 8px;
}

.hero h1,
.panel h2 {
  margin: 0;
  line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  max-width: 10ch;
}

.lead,
.muted {
  color: var(--muted);
}

.lead {
  max-width: 44rem;
  line-height: 1.7;
}

.hero-status,
.quick-actions,
.feedback-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.85rem;
}

.pill.soft,
.chip.soft {
  color: var(--gold);
}

.layout {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-header p {
  margin-top: 6px;
}

.session-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.session-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

select,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 14px 16px;
}

textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}

.action {
  border: 1px solid var(--line);
  background: #fff9f0;
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.action:hover,
.record-button:hover {
  transform: translateY(-1px);
}

.action.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.action.soft {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.action.wide {
  width: 100%;
  justify-content: center;
}

.stats-grid,
.summary-grid,
.score-row {
  display: grid;
  gap: 12px;
}

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

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.score-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.summary-score,
.summary-block,
.question-card,
.feedback-card,
.review-item {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-card strong,
.summary-score strong,
.score-row strong {
  font-size: 1.8rem;
  font-family: Georgia, "Times New Roman", serif;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.review-title,
.review-meta,
.prompt-ja,
.feedback-line {
  margin: 0;
}

.review-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.review-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.question-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.prompt-ja {
  font-size: clamp(1.35rem, 4vw, 2.1rem);
  line-height: 1.45;
  margin-bottom: 14px;
}

.hint-box {
  color: var(--muted);
}

.hint-box summary {
  cursor: pointer;
  font-weight: 700;
}

.recorder-zone {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.record-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.record-button {
  border: none;
  background: linear-gradient(135deg, #d97706, #be123c);
  color: white;
  border-radius: 999px;
  padding: 16px 24px;
  font-weight: 800;
  cursor: pointer;
  min-width: 160px;
}

.feedback-card {
  margin-top: 18px;
}

.feedback-line {
  line-height: 1.7;
  margin-top: 10px;
}

.alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.alt-pill {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.summary-block ul,
.summary-block li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-block ul {
  display: grid;
  gap: 8px;
}

.summary-block li::before {
  content: "• ";
  color: var(--accent);
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .app-shell {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .panel-header {
    flex-direction: column;
  }

  .stats-grid,
  .score-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-controls,
  .quick-actions,
  .feedback-actions {
    flex-direction: column;
  }

  .action,
  .record-button {
    width: 100%;
  }
}
