:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --mist: #dbeaf3;
  --mist-deep: #7eb0c8;
  --line: #e4e9ee;
  --accent: #6a9fb8;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  background: var(--bg);
  color: #000;
  padding-bottom: 48px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 8px;
  backdrop-filter: blur(10px);
}

.hdr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.hdr-brand {
  min-width: 160px;
}

.hdr-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.hdr-sub {
  display: block;
  font-size: 12px;
  color: #000;
  margin-top: 2px;
}

.hdr-mid {
  text-align: right;
  flex: 1;
}

.hdr-stage {
  display: block;
  font-size: 12px;
  color: #000;
}

.hdr-day {
  font-size: 13px;
  font-weight: 600;
}

.hdr-icons {
  display: flex;
  gap: 6px;
}

.hdr-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: var(--mist);
  cursor: pointer;
  font-size: 18px;
}

.hdr-progress-wrap {
  height: 6px;
  background: #e8edf2;
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}

.hdr-progress-wrap.inner {
  margin-top: 6px;
}

.hdr-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mist-deep), var(--accent));
  border-radius: 99px;
  transition: width 0.35s ease;
}

.hdr-progress-text {
  margin: 6px 0 0;
  font-size: 12px;
  color: #000;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}

.sheet {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.p0-title {
  font-size: 22px;
  margin: 0 0 6px;
}

.p0-sub {
  margin: 0 0 16px;
  color: var(--muted);
}

.section-kicker {
  font-size: 15px;
  margin: 18px 0 10px;
}

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

.dir-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.dir-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dir-done {
  border-color: #c5e6d4;
  background: #f4fbf7;
}

.dir-current {
  border-color: var(--mist-deep);
  background: var(--mist);
}

.dir-day {
  font-weight: 700;
  min-width: 52px;
}

.dir-title {
  flex: 1;
  font-size: 14px;
}

.dir-state {
  min-width: 64px;
  text-align: right;
  color: #000;
  font-size: 12px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 15px;
}

.btn-secondary {
  background: #d6dde5;
  color: #000;
  font-weight: 500;
}

button:focus-visible,
.chip:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2f6f97;
  outline-offset: 2px;
}

.plate-a {
  background: var(--mist);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
}

.plate-label {
  font-size: 14px;
  margin: 16px 0 8px;
  color: #000;
}

.otter-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.otter-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
  border: 1px solid #c5dce8;
}

.otter-img.sm {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.otter-txt {
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
}

.quote {
  font-style: normal;
}

.read-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.read-time {
  margin: 0 0 12px;
  font-size: 13px;
  color: #000;
}

.read-body {
  font-size: 15px;
  line-height: 1.7;
}

.quiz-q {
  margin-bottom: 12px;
}

.quiz-prompt {
  font-weight: 600;
  margin: 0 0 10px;
}

.quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-opt {
  text-align: left;
  background: #f0f4f8;
  color: var(--ink);
  font-weight: 400;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.quiz-opt.is-on {
  border-color: var(--mist-deep);
  background: var(--mist);
}

.quiz-opt.is-correct {
  background: #eaf8f0 !important;
  border-color: #5eb98d !important;
  color: #000 !important;
}

.quiz-opt.is-wrong {
  background: #fdeeee !important;
  border-color: #d85f5f !important;
  color: #000 !important;
}

.quiz-opt.is-dim {
  opacity: 0.45;
}

.quiz-feedback {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
}

.micro {
  background: #eef6fb;
  border-color: #d4e6f0;
}

.row-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.stack-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.stack-btns button {
  width: 100%;
}

.app-guide {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f6fa;
  color: #2f3f4f;
  line-height: 1.65;
  font-size: 14px;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}

.fld textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px;
  font: inherit;
  resize: vertical;
}

.fld input {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px;
  font: inherit;
  color: #1f2d3a;
  background: #fff;
}

.muted {
  color: #000;
}

.small {
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #eef4f8;
  color: #1f2b37;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-root.hidden {
  display: none;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 40, 50, 0.45);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 8px 0 20px;
  animation: slideUp 0.28s ease;
}

.cooldown-wrap {
  background: #eef6fb;
  border: 1px solid #d8e8f3;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.text-link {
  border: 0;
  background: transparent;
  color: #000;
  text-decoration: underline;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

small {
  color: #000;
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0.8;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.modal-body {
  padding: 12px 18px 8px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.btn-x {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2f6;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.chip {
  border-radius: 99px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.chip.is-on {
  background: var(--mist);
  border-color: var(--mist-deep);
}

.shell-wrap {
  text-align: center;
  padding: 20px 0;
}

.shell-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  font-size: 48px;
  background: linear-gradient(180deg, #e8f4fa, #d0e8f4);
  border: 2px solid #b8d4e4;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.shell-btn.glow {
  box-shadow: 0 0 24px rgba(110, 170, 200, 0.65);
  transform: scale(1.02);
}

.plate-gen-body {
  font-size: 14px;
  line-height: 1.65;
}

.plate-sub {
  margin: 1.1rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}

.sep-soft {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

.match-row select {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  border: 1px solid #c4d2df;
  color: #1f2d3a;
  background: #fff;
  padding: 9px 10px;
  border-radius: 8px;
}

.timer-box {
  text-align: center;
  border: 1px dashed #bfd0dd;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbfe;
}

.timer-main {
  font-size: 28px;
  font-weight: 700;
  margin: 4px 0;
}

.shell-guide {
  font-size: 14px;
  color: #345066;
}

.aidkit {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.7;
  color: #253646;
}
