:root {
  --bg: #edf2f8;
  --paper: #fbfdff;
  --card: #ffffff;
  --text: #0f1f33;
  --muted: #5c6d82;
  --line: #d4deea;
  --brand: #123e7a;
  --brand-2: #0b2f60;
  --accent: #1d6a9f;
  --ok: #1e7d58;
  --bad: #b43737;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Source Sans 3", "Noto Sans SC", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, #d8e6f8 0, transparent 30%),
    radial-gradient(circle at 86% 8%, #dceff2 0, transparent 28%),
    linear-gradient(165deg, #f1f5fb 0%, #e9f0f8 45%, #edf3f9 100%);
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 14px 28px;
  display: grid;
  gap: 14px;
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 14px 34px rgba(14, 48, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-card {
  border-color: #c7d6ea;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-logo {
  width: min(42vw, 220px);
  min-width: 130px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #d4deea;
  box-shadow: 0 6px 16px rgba(14, 48, 92, 0.12);
  background: #fff;
  object-fit: contain;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f6fbff;
  background: linear-gradient(120deg, var(--brand) 0%, var(--accent) 100%);
}

.badge-soft {
  color: var(--brand);
  background: #e5eefb;
  border: 1px solid #c9dbf3;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", "Times New Roman", "STSong", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: #112d56;
}

.sub {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.section-head {
  margin-top: 12px;
  margin-bottom: 10px;
  color: #29476c;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: #3f5774;
  font-size: 13px;
  font-weight: 600;
}

select,
input,
button {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

select:focus,
input:focus,
button:focus {
  outline: 2px solid #c9dbf3;
  outline-offset: 1px;
}

button {
  cursor: pointer;
}

.btn {
  border-color: #bed0e6;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
}

.btn:active,
.primary:active {
  transform: translateY(1px);
}

.primary {
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(120deg, var(--brand) 0%, var(--accent) 100%);
  border: 1px solid #164d86;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.primary:hover {
  background: linear-gradient(120deg, #103769 0%, #155c89 100%);
}

.tip {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff5e8;
  color: #8e5a09;
  border: 1px solid #f1d39f;
  font-size: 13px;
}

.note {
  margin-top: 10px;
  background: #eaf3ff;
  color: #16457a;
  border-color: #bdd4f2;
}

.switch-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #34506f;
}

.switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.hidden {
  display: none !important;
}

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

.space {
  justify-content: space-between;
}

.mode-title {
  font-size: 18px;
  color: #173860;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ebf2fc;
  border: 1px solid #c9dbf3;
  color: #295584;
  font-weight: 600;
  font-size: 13px;
}

.prompt {
  margin: 12px 0;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%),
    repeating-linear-gradient(0deg, transparent 0, transparent 30px, rgba(18, 62, 122, 0.05) 30px, rgba(18, 62, 122, 0.05) 31px);
  border: 1px dashed #b7cae4;
  min-height: 96px;
  display: flex;
  align-items: center;
  font-family: "Crimson Text", "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.35;
  color: #11355f;
}

.input-area {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
}

.feedback {
  min-height: 24px;
  margin-top: 10px;
  font-size: 14px;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.bad {
  color: var(--bad);
}

.summary {
  margin-top: 10px;
  font-size: 16px;
  color: #1f3f66;
  font-weight: 600;
}

.wrong-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.wrong-item {
  border: 1px solid #f1c4c4;
  background: #fff7f7;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .app {
    padding-top: 12px;
  }

  .hero-brand-row {
    align-items: center;
  }

  h1 {
    font-size: 30px;
  }

  .prompt {
    font-size: 22px;
  }

  .input-area {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hero-brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: min(72vw, 260px);
    min-width: 0;
  }

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

  .input-area {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .prompt {
    font-size: 20px;
    min-height: 88px;
  }
}
