/* ============================================================
   Rino 英検3級 Writing Bootcamp — Standalone Stylesheet
   Pink / rose theme (distinct from existing beige 英検 Practice)
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --rwb-bg-1: #fff5fb;
  --rwb-bg-2: #fce7f3;
  --rwb-pink-50:  #fdf2f8;
  --rwb-pink-100: #fce7f3;
  --rwb-pink-200: #fbcfe8;
  --rwb-pink-300: #f9a8d4;
  --rwb-pink-400: #f472b6;
  --rwb-pink-500: #ec4899;
  --rwb-pink-600: #db2777;
  --rwb-pink-700: #be185d;
  --rwb-pink-800: #9d174d;
  --rwb-pink-900: #831843;
  --rwb-ok: #059669;
  --rwb-ng: #be185d;
}
body {
  font-family: 'Hiragino Maru Gothic ProN', 'Hiragino Kaku Gothic ProN', 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(180deg, var(--rwb-bg-1), var(--rwb-bg-2) 70%);
  color: #2b0f24;
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}

/* ── header ── */
.rwb-hd {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(90deg, var(--rwb-pink-700), var(--rwb-pink-500));
  color: #fff;
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 14px rgba(190,24,93,.30);
}
.rwb-hd-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rwb-hd h1 { font-size: 1.1rem; font-weight: 900; }
.rwb-tag {
  font-size: .72rem;
  background: rgba(255,255,255,.22);
  padding: 3px 9px; border-radius: 999px;
}
.rwb-back {
  font-size: .92rem; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.18);
  padding: 6px 12px; border-radius: 999px; font-weight: 800;
}
.rwb-back:hover { background: rgba(255,255,255,.28); }
.rwb-date { font-size: .82rem; opacity: .9; white-space: nowrap; }

main { max-width: 760px; margin: 0 auto; padding: 22px 16px 100px; }

/* ── welcome hero ── */
.rwb-hero {
  background: #fff;
  border: 3px solid var(--rwb-pink-300);
  border-radius: 22px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(190,24,93,.10);
  margin-bottom: 16px;
}
.rwb-hero-emoji { font-size: 3rem; line-height: 1; margin-bottom: 4px; }
.rwb-hero h2 {
  font-size: 1.45rem; color: var(--rwb-pink-700);
  font-weight: 900; margin-bottom: 4px;
}
.rwb-hero-sub {
  color: var(--rwb-pink-700); font-size: .98rem;
  font-weight: 700; margin-bottom: 12px;
}

/* ── tab switcher ── */
.rwb-tabs {
  display: flex; gap: 0;
  background: #fff;
  border: 2px solid var(--rwb-pink-300);
  border-radius: 999px;
  padding: 4px;
  max-width: 360px;
  margin: 0 auto 18px;
  box-shadow: 0 2px 10px rgba(190,24,93,.10);
}
.rwb-tab {
  flex: 1; border: none; background: transparent;
  padding: 11px 16px;
  font-family: inherit; font-weight: 900; font-size: 1rem;
  color: var(--rwb-pink-700);
  cursor: pointer;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.rwb-tab.rwb-tab-active {
  background: linear-gradient(135deg, var(--rwb-pink-700), var(--rwb-pink-400));
  color: #fff;
  box-shadow: 0 3px 10px rgba(190,24,93,.30);
}

/* ── screens ── */
.rwb-screen { display: none; }
.rwb-screen.rwb-active { display: block; animation: rwb-fade .25s ease; }
@keyframes rwb-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── review banner ── */
.rwb-review-banner {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; align-items: center;
  background: #fff7ed;
  border: 2px solid #fdba74;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.rwb-banner-text { color: #7c2d12; font-weight: 700; font-size: .95rem; flex: 1; min-width: 0; }
.rwb-banner-text strong { color: #c2410c; }
.rwb-banner-actions { display: flex; gap: 8px; }

/* ── topic card ── */
.rwb-card {
  background: #fff;
  border: 3px solid var(--rwb-pink-300);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(190,24,93,.10);
  margin-bottom: 14px;
}
.rwb-label {
  font-size: .78rem; font-weight: 900;
  color: var(--rwb-pink-700);
  letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: 6px;
}
.rwb-email-from {
  background: var(--rwb-pink-50);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-weight: 800; color: var(--rwb-pink-800);
}
.rwb-email-body {
  font-size: 1.05rem;
  line-height: 1.7;
  background: var(--rwb-pink-50);
  border-radius: 12px;
  padding: 12px 16px;
  color: #2b0f24;
  margin-bottom: 6px;
}
.rwb-email-body-ja {
  font-size: .85rem;
  color: #9d4886;
  background: #fffdf7;
  border-left: 3px solid var(--rwb-pink-300);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.rwb-points {
  background: #fff;
  border: 1px dashed var(--rwb-pink-300);
  border-radius: 12px;
  padding: 10px 16px 10px 32px;
  margin-bottom: 6px;
}
.rwb-points li {
  font-size: .98rem;
  color: var(--rwb-pink-800);
  padding: 2px 0;
  font-weight: 700;
}
.rwb-q {
  font-size: 1.3rem; font-weight: 900;
  color: var(--rwb-pink-800);
  line-height: 1.5;
  margin-bottom: 6px;
}
.rwb-q-ja {
  font-size: .96rem;
  color: var(--rwb-pink-700);
  font-weight: 700;
  margin-bottom: 10px;
}
.rwb-hint {
  background: #fffbeb;
  border-left: 3px solid #fcd34d;
  border-radius: 0 10px 10px 0;
  padding: 8px 12px;
  color: #7c2d12;
  font-size: .9rem;
  margin-bottom: 12px;
}

/* ── essay/email textarea ── */
.rwb-answer {
  width: 100%;
  border: 2px solid var(--rwb-pink-200);
  border-radius: 14px;
  padding: 14px 14px;
  font-family: -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 200px;
  background: #fffdf7;
}
.rwb-answer:focus {
  outline: 2px solid var(--rwb-pink-500);
  border-color: var(--rwb-pink-500);
  background: #fff;
}
.rwb-counter {
  margin-top: 8px;
  font-weight: 800;
  font-size: 1rem;
  text-align: right;
  transition: color .2s;
}

/* ── buttons ── */
.rwb-btn-row {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-top: 14px;
}
.rwb-btn {
  display: inline-block; cursor: pointer; user-select: none;
  background: linear-gradient(135deg, var(--rwb-pink-700), var(--rwb-pink-400));
  color: #fff; border: none; padding: 14px 28px;
  border-radius: 999px; font-weight: 900; font-size: 1.05rem;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(190,24,93,.32);
  transition: transform .12s, box-shadow .12s;
  text-decoration: none;
}
.rwb-btn:hover { box-shadow: 0 6px 18px rgba(190,24,93,.42); transform: translateY(-1px); }
.rwb-btn:active { transform: scale(.97); }
.rwb-btn.rwb-ghost {
  background: #fff; color: var(--rwb-pink-800);
  border: 2px solid var(--rwb-pink-300);
  box-shadow: none;
}
.rwb-btn.rwb-ghost:hover { background: var(--rwb-pink-50); }
.rwb-btn.rwb-small { padding: 10px 18px; font-size: .92rem; }

/* ── result ── */
.rwb-result-stat {
  background: var(--rwb-pink-50);
  border: 2px solid var(--rwb-pink-200);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
}
.rwb-result-stat-v {
  font-size: 1.5rem; font-weight: 900;
  color: var(--rwb-pink-700); line-height: 1.1;
}
.rwb-result-stat-l {
  font-size: .82rem; font-weight: 800;
  color: var(--rwb-pink-700); margin-top: 4px;
}
.rwb-result-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 14px;
}
.rwb-result-status {
  text-align: center; font-weight: 900; font-size: 1.05rem;
  margin-bottom: 10px;
}
.rwb-readonly {
  background: #fffdf7;
  border: 1px solid var(--rwb-pink-200);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #2b0f24;
  max-height: 300px;
  overflow-y: auto;
}

.rwb-axes {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.rwb-axis-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff;
  border: 2px solid var(--rwb-pink-200);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 700; font-size: .9rem;
  color: var(--rwb-pink-800);
}
.rwb-axis-chip:has(input:checked) {
  background: var(--rwb-pink-700); color: #fff;
  border-color: var(--rwb-pink-700);
}
.rwb-axis-chip input { accent-color: var(--rwb-pink-700); cursor: pointer; }

.rwb-weak-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rwb-weak-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--rwb-pink-100);
  color: var(--rwb-pink-800);
  border: 1px solid var(--rwb-pink-200);
  padding: 6px 12px; border-radius: 999px;
  font-weight: 800; font-size: .88rem;
}
.rwb-weak-count {
  background: var(--rwb-pink-700); color: #fff;
  padding: 1px 7px; border-radius: 999px;
  font-size: .75rem;
}
.rwb-empty {
  text-align: center; color: var(--rwb-pink-700);
  font-weight: 800; padding: 6px 0;
}
.rwb-section h3 {
  color: var(--rwb-pink-800);
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 10px;
}
.rwb-section { margin-bottom: 14px; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .rwb-q { font-size: 1.15rem; }
  .rwb-email-body { font-size: 1rem; }
}
@media (min-width: 768px) {
  body { font-size: 19px; }
  main { max-width: 820px; padding: 30px 22px 120px; }
}
