:root {
  color-scheme: light;
  --bg: #fff9f0;
  --paper: #ffffff;
  --ink: #2d2a26;
  --muted: #8a8682;
  --line: #eee5d8;
  --coral: #ff6b6b;
  --orange: #ff8e53;
  --yellow: #ffd93d;
  --green: #51a66a;
  --blue: #4f8cff;
  --rose: #d56a88;
  --gold: #d99b47;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Nunito", "Noto Sans TC", sans-serif;
}

h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  line-height: 0.96;
}

h2 {
  font-size: 20px;
  font-weight: 800;
}

h3 {
  font-size: 15px;
  margin-top: 18px;
}

h4 {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px clamp(18px, 5vw, 64px) 44px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--orange) 42%, var(--yellow) 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 24px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
}

.app-header > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtle {
  color: var(--muted);
  line-height: 1.5;
}

.app-header .subtle {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-actions a,
.link-grid a,
.guide-nav a,
.task-guide,
button {
  min-height: 38px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.top-actions a {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.75);
  text-shadow: none;
}

.secondary-button {
  background: #f7f4ed;
  color: var(--ink);
  border-color: #e6ddcf;
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px) 48px;
}

.geometry-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px) 48px;
}

.geometry-panel,
.workspace-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.geometry-panel { border-top: 5px solid var(--blue); }
.workspace-panel { border-top: 5px solid var(--green); min-width: 0; }
.panel-kicker { color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.question-picker { display: grid; gap: 7px; margin: 18px 0 10px; font-size: 13px; font-weight: 800; }
.question-picker select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffdf9; padding: 10px; color: var(--ink); }
.skill-tag { display: inline-block; margin: 6px 0 12px; color: #2469c8; font-size: 12px; font-weight: 800; }
.problem-prompt, .tool-note p, .board-caption { line-height: 1.65; }
.hint-box { margin-top: 18px; border: 1px solid #f0dba8; border-radius: var(--radius-sm); background: #fff9e9; padding: 12px; }
.hint-box summary { cursor: pointer; color: #8d5c11; font-weight: 800; }
.hint-box ol { margin: 12px 0 0; padding-left: 22px; line-height: 1.65; }
.tool-note { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); background: #eef6ff; }
.tool-note h3 { margin: 0 0 7px; color: #2469c8; }
.tool-note p { margin: 0; font-size: 13px; }
.problem-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pink-button { background: #d8637c; border-color: #d8637c; }
.result-note { margin-top: 14px; padding: 11px 12px; border-radius: var(--radius-sm); background: #fff2e9; color: #925038; line-height: 1.55; font-size: 13px; font-weight: 700; }
.result-note.success { background: #e9f8ed; color: #267344; }
.checklist { display: grid; gap: 9px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.checklist label, .completion-row { display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; font-size: 13px; }
.completion-row { margin-top: 16px; font-weight: 800; }
.workspace-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 16px; }
.workspace-head h2 { margin-top: 5px; }
.geogebra-board { height: min(68vh, 700px); min-height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.board-caption { margin-top: 10px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .geometry-layout { grid-template-columns: 1fr; }
  .geogebra-board { height: 520px; min-height: 0; }
}


[hidden] { display:none !important; }
button:disabled{opacity:.5;cursor:default} .geometry-layout{max-width:1600px;margin:auto} .app-header h1{font-size:clamp(28px,4vw,42px);line-height:1.2}.geometry-panel{min-width:0}.question-picker select{min-width:0;max-width:100%}.ggb-status{font-size:13px;line-height:1.6;margin:12px 0;color:var(--muted)}.app-header{align-items:center}.save-note{font-size:13px;line-height:1.5;margin-top:12px;color:var(--muted)}.tool-note a{color:#2469c8}.geogebra-board{height:560px;min-height:0;width:100%}.workspace-head{flex-wrap:wrap}.workspace-head h2{line-height:1.5;font-size:17px}@media(max-width:600px){.app-header{align-items:start;flex-direction:column;padding:24px 16px 36px}.geometry-layout{padding:12px 12px 28px}.geometry-panel,.workspace-panel{padding:16px}.geogebra-board{height:450px}.question-picker select{font-size:12px}.problem-actions button{flex:1 1 130px}}
