:root {
  --ink: #1e293b;
  --teal: #028090;
  --mint: #02c39a;
  --paper: #f8fafb;
  --line: #d9e4e6;
  --soft: #eaf7f4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
.wrap { width: min(1040px, calc(100% - 40px)); margin-inline: auto; }
.page-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 48px);
  padding: 14px 20px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
.page-nav a { color: var(--teal); font-weight: 700; text-decoration: none; }
.hero { padding: 64px 0 54px; color: white; background: var(--teal); }
.hero h1 { max-width: 850px; margin: 8px 0 18px; font-size: clamp(30px, 5vw, 48px); line-height: 1.35; }
.hero h1 span { white-space: nowrap; }
.hero p { max-width: 800px; margin-bottom: 0; }
.eyebrow { font-weight: 700; letter-spacing: .06em; }
.exercise { padding: 68px 0 30px; }
.section-kicker { margin: 0; color: var(--teal); font-weight: 700; }
h2 { margin: 2px 0 14px; color: var(--teal); font-size: clamp(27px, 4vw, 38px); line-height: 1.4; }
h3 { margin-top: 42px; font-size: 24px; }
h4 { margin: 0; font-size: 19px; }
.lead { max-width: 900px; font-size: 18px; }
.steps { padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; margin: 12px 0; }
.steps label { display: grid; grid-template-columns: 34px 34px 1fr; align-items: start; gap: 8px; }
.steps label::before {
  content: counter(step);
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.steps input { width: 22px; height: 22px; margin-top: 5px; accent-color: var(--mint); }
.goal, .notice {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--soft);
  border: 1px solid #b9dfd6;
  border-left: 5px solid var(--mint);
}
.goal strong { display: block; color: var(--teal); }
.text-panel, .download-panel, form, .admin-panel {
  margin: 20px 0;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 3px 14px rgba(30, 41, 59, .05);
}
.prompt-card { border-top: 4px solid var(--teal); }
.panel-head, .download-panel, .list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
pre {
  max-width: 100%;
  margin: 20px 0 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f3f7f8;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 16px;
}
.copy-button, #refresh-button {
  flex: none;
  padding: 8px 18px;
  color: var(--teal);
  background: white;
  border: 2px solid var(--teal);
  font-weight: 700;
}
.button {
  display: inline-block;
  padding: 12px 22px;
  color: white;
  background: var(--teal);
  border: 0;
  font-weight: 700;
  text-decoration: none;
}
details { margin: 20px 0; }
summary { color: var(--teal); font-weight: 700; cursor: pointer; }
form > label { display: block; margin: 20px 0; font-weight: 700; }
label > span { font-weight: 400; }
input[type="text"], input[type="password"], input:not([type]), textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #97aab0;
  border-radius: 0;
}
textarea { resize: vertical; }
fieldset { padding: 12px 16px; border: 1px solid var(--line); }
fieldset label { display: inline-block; margin-right: 20px; }
.message { min-height: 1.7em; color: #a13b2b; font-weight: 700; }
.message.success { color: #08735d; }
.list-tools { margin: 34px 0 12px; }
.list-tools fieldset { border: 0; padding: 0; }
.submission-card {
  margin: 16px 0;
  padding: 22px;
  background: white;
  border-left: 5px solid var(--mint);
  box-shadow: 0 3px 14px rgba(30, 41, 59, .06);
}
.submission-head { display: flex; justify-content: space-between; gap: 15px; }
.submission-meta { color: #52636c; font-size: 14px; }
.submission-comment { font-weight: 700; }
.submission-body {
  white-space: pre-wrap;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}
.submission-body.expanded { display: block; }
.card-actions { display: flex; gap: 12px; margin-top: 14px; }
.card-actions button { padding: 7px 14px; color: var(--teal); background: white; border: 1px solid var(--teal); }
footer { margin-top: 55px; padding: 32px 20px; color: white; text-align: center; background: var(--ink); }

@media (max-width: 600px) {
  .wrap { width: min(100% - 28px, 1040px); }
  .page-nav { justify-content: flex-start; gap: 18px; overflow-x: auto; font-size: 14px; white-space: nowrap; }
  .hero { padding: 42px 0; }
  .hero h1 span { white-space: normal; }
  .exercise { padding-top: 52px; }
  .steps label { grid-template-columns: 32px 28px minmax(0, 1fr); gap: 5px; }
  .text-panel, .download-panel, form, .admin-panel { padding: 17px; }
  .panel-head, .download-panel, .list-tools, .submission-head { align-items: flex-start; flex-direction: column; }
  .panel-head .copy-button { align-self: flex-start; }
  pre { padding: 13px; font-size: 15px; }
  fieldset label { display: block; margin: 7px 0; }
}

