:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --ink: #16362e;
  --muted: #50685e;
  --paper: #f7faf4;
  --white: #fff;
  --line: #dfe8dd;
  --green: #20624b;
  --accent: #d8f08d;
  --error: #963c31;
  --header-height: 78px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { position: relative; isolation: isolate; min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1.6; }
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: var(--header-height) 0 auto;
  height: min(calc(100% - var(--header-height)), clamp(640px, 56.3vw, 960px));
  background: url("/camp-background.webp") center / cover no-repeat;
  mask-image: linear-gradient(#000 0% 83%, transparent);
  pointer-events: none;
}
button, textarea, input { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #7b4cce; outline-offset: 3px; }
h1, h2, figure, p { margin: 0; }
a { color: inherit; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner, .shell { width: min(1220px, 100% - 48px); margin-inline: auto; }
.masthead-inner { min-height: var(--header-height); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand, .profile { display: flex; align-items: center; gap: 12px; line-height: 1.25; }
.brand { text-decoration: none; font-size: 1.05rem; }
.brand-mark { display: block; flex: none; width: 78px; height: auto; object-fit: contain; }
.avatar { display: grid; place-items: center; flex: none; background: #e8f2d4; color: var(--green); width: 38px; height: 38px; border-radius: 50%; font-weight: 700; }
.brand small, .profile small { display: block; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.profile { font-size: .95rem; overflow-wrap: anywhere; }
.shell { padding-bottom: 56px; }
.loading { padding: 64px 0; color: var(--muted); }
.entry { display: grid; grid-template-columns: .83fr 1.17fr; align-items: center; gap: clamp(28px, 6vw, 92px); min-height: 650px; padding: 55px 0 24px; }
.entry h1 { font-weight: 900; letter-spacing: -.075em; line-height: 1.1; font-size: clamp(3.45rem, 7vw, 6.2rem); }
.entry h1 span { color: var(--green); }
.lead { font-size: clamp(1.04rem, 2vw, 1.27rem); color: var(--muted); margin: 24px 0 28px; line-height: 1.75; }
.entry-form { display: grid; gap: 14px; }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entry-form label { display: block; font-weight: 700; font-size: .94rem; }
.entry-form input { display: block; width: 100%; margin-top: 6px; }
.entry-form .primary { justify-self: start; min-width: 150px; }
.entry-art { position: relative; padding: 12px; border-radius: 28px; background: #e4eed4; }
.entry-art img { width: 100%; height: clamp(340px, 48vw, 540px); object-fit: cover; display: block; border-radius: 19px; background: #e8edcf; }
.entry-art figcaption { position: absolute; bottom: 28px; left: 26px; font-size: .9rem; font-weight: 750; background: #fffaf0; padding: 8px 13px; border-radius: 40px; box-shadow: 0 2px 12px #16362e20; }
.entry-art figcaption span { color: var(--green); margin-right: 4px; }
.workspace-nav { display: flex; gap: 5px; width: fit-content; margin: 32px 0 25px; border: 1px solid var(--line); background: #edf2e8; border-radius: 14px; padding: 5px; }
.nav-item { padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 720; white-space: nowrap; }
.nav-item span { margin-right: 5px; color: var(--green); }
.nav-item.active { background: #fff; border-color: var(--line); color: var(--ink); }
.section-head { margin-bottom: 23px; }
.section-head h1 { font-size: clamp(2.45rem, 4vw, 3.55rem); line-height: 1.18; letter-spacing: -.05em; font-weight: 880; }
.section-head p { color: var(--muted); margin-top: 9px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, .81fr) minmax(0, 1.19fr); gap: 20px; align-items: start; }
.panel { min-width: 0; border-radius: 20px; background: var(--white); border: 1px solid var(--line); padding: clamp(16px, 2vw, 24px); }
.label { display: block; font-weight: 750; margin-bottom: 8px; }
input, textarea { border: 1px solid #cfdacf; border-radius: 11px; padding: 11px 13px; color: var(--ink); background: #fcfdfb; }
textarea { display: block; width: 100%; resize: vertical; min-height: 60px; }
textarea::placeholder, input::placeholder { color: #60736b; }
.reference-label { margin-top: 18px; }
.reference-label span { margin-left: 6px; font-size: .86rem; color: var(--muted); font-weight: 500; }
.drop-zone { border: 1.5px dashed #a0bda4; border-radius: 14px; background: #f2f8ec; overflow: hidden; }
.drop-zone.drag { background: #e4f5bc; border-color: var(--green); }
.drop-button { display: grid; justify-items: center; gap: 3px; padding: 14px 12px; width: 100%; border: 0; color: var(--ink); background: none; }
.drop-button > span:last-child { color: var(--muted); font-size: .88rem; }
.drop-icon { font-size: 1.15rem; border-radius: 10px; background: #ddedc5; color: var(--green); font-weight: 800; padding: 0 7px; }
.reference-preview { display: flex; gap: 12px; padding: 12px; align-items: center; }
.reference-preview img { flex: none; width: 62px; height: 54px; border-radius: 8px; object-fit: cover; }
.reference-preview > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint, .muted { color: var(--muted); font-size: .9rem; }
.hint { margin: 8px 0 17px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; text-decoration: none; font-weight: 750; min-height: 44px; }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: #184e3b; }
.primary span { color: var(--accent); }
.secondary { background: #eef5e8; color: var(--green); border-color: #dce9d3; }
.secondary:hover, .subtle:hover { background: #e2efda; }
.subtle { display: inline-block; padding: 6px 9px; color: var(--green); background: transparent; border: 0; border-radius: 8px; font-size: .92rem; font-weight: 700; white-space: nowrap; }
.panel-head, .action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-head { justify-content: space-between; margin-bottom: 14px; }
.panel-head h2, .history h2 { font-size: 1.21rem; line-height: 1.4; }
.art-state { font-size: .85rem; background: #edf2e8; padding: 4px 9px; border-radius: 20px; color: #365e4f; }
.canvas { aspect-ratio: 4 / 3; background: #edf3e9; border-radius: 13px; overflow: hidden; }
.canvas img { height: 100%; width: 100%; display: block; object-fit: contain; }
.canvas img[src="/showcase.jpg"] { object-fit: cover; }
.action-row { margin-top: 13px; }
.feedback { color: var(--muted); font-size: .92rem; margin-top: 9px; }
.feedback.error { color: var(--error); }
.history { margin-top: 30px; }
.history h2 { margin-bottom: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); gap: 11px; }
.thumbnail { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; padding: 6px; color: var(--ink); }
.thumbnail img { display: block; width: 100%; aspect-ratio: 1.52; object-fit: cover; border-radius: 7px; }
.thumbnail span { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; padding: 4px; }
.website-prompt { margin-bottom: 18px; }
.prompt-row { display: flex; gap: 10px; align-items: start; }
.prompt-row button { flex-shrink: 0; }
.shell:has(#website-studio:not([hidden])) { width: calc(100% - 32px); }
.website-preview { overflow: hidden; padding: 0; }
.website-preview > .panel-head { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.website-preview .action-row { margin: 0; }
.website-preview > .feedback { margin: 0; padding: 8px 16px; }
.art-styles { margin: 14px 0 16px; }
.art-styles .label span { margin-left: 5px; font-size: .8rem; font-weight: 500; }
.art-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.art-style-grid button { min-width: 0; padding: 4px 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfb; color: var(--ink); font-size: .83rem; }
.art-style-grid button:hover, .art-style-grid button[aria-pressed="true"] { border-color: var(--green); background: #e4f2dd; }
.art-style-grid button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--green); font-weight: 750; }
.style-sample { display: block; aspect-ratio: 1; max-width: 80px; margin: 0 auto 4px; border-radius: 5px; background: url("/art-style-examples.webp") var(--art-position, 0% 0%) / 300% 200% no-repeat; }
[data-art-style="pixel"] { --art-position: 50% 0%; }
[data-art-style="clay"] { --art-position: 100% 0%; }
[data-art-style="paper"] { --art-position: 0% 100%; }
[data-art-style="comic"] { --art-position: 50% 100%; }
[data-art-style="flat"] { --art-position: 100% 100%; }
.realistic-style .style-sample { background-image: url("/art-realistic-examples.webp"); background-size: 300% 100%; }
[data-art-style="film"] { --art-position: 50% 0%; }
[data-art-style="cinematic"] { --art-position: 100% 0%; }
.website-revision { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 20px; align-items: start; padding: 14px 16px 16px; background: #f0f6ed; border-bottom: 1px solid var(--line); }
.website-revision .prompt-row { max-width: 61rem; }
.revision-ideas { padding: 8px 12px; background: #fcfdfb; border: 1px solid var(--line); border-radius: 10px; }
.revision-ideas h3 { margin: 0; font-size: .94rem; }
.revision-ideas ul { list-style: none; padding: 0; margin: 4px 0 0; }
.revision-ideas li { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .87rem; }
.revision-ideas li + li { border-top: 1px solid var(--line); }
.copy-idea { flex-shrink: 0; min-width: 52px; padding-inline: 4px; }
.session-tag { font-weight: 650; color: var(--green); white-space: nowrap; }
.session-tag.offline { color: var(--muted); }
.website-version-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; }
.website-version-choice select { max-width: min(36vw, 23rem); min-height: 42px; padding: 5px 8px; font: inherit; color: var(--ink); background: #fcfdfb; border: 1px solid var(--line); border-radius: 9px; }
.website-preview iframe { display: block; width: 100%; min-height: max(640px, 82dvh); background: #fcfdfb; border: 0; }
.teacher-shell { padding-top: 34px; }
.teacher-head, .teacher-connection { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.teacher-connection h2, .teacher-queue h2 { font-size: 1.16rem; }
.teacher-connection p { color: var(--muted); font-size: .92rem; margin-top: 3px; }
.teacher-status { color: var(--muted); background: #edf2e8; padding: 6px 12px; border-radius: 24px; font-size: .9rem; font-weight: 700; }
.teacher-status.ready { color: #1e5e3f; background: #e3f3da; }
.teacher-status.unavailable { color: var(--error); background: #f9ede8; }
.teacher-queue { margin-top: 14px; }
.teacher-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 12px; margin: 12px 0 0; }
.teacher-metrics div { padding: 10px 12px; border-radius: 12px; background: #f0f6ed; }
.teacher-metrics dt { color: var(--muted); font-size: .9rem; }
.teacher-metrics dd { margin: 0; font-size: 1.3rem; font-weight: 750; }
.teacher-metrics small { font-size: .8rem; font-weight: 500; }
.teacher-work { margin-top: 23px; }
.teacher-table-scroll { overflow-x: auto; }
.teacher-roster table { border-collapse: collapse; width: 100%; text-align: left; }
.teacher-roster th, .teacher-roster td { padding: 10px 12px; }
.teacher-roster thead { color: var(--muted); background: #f0f6ed; font-size: .92rem; }
.teacher-roster tbody tr + tr { border-top: 1px solid var(--line); }
.teacher-roster td:first-child, .teacher-roster td:nth-child(2) { min-width: 94px; overflow-wrap: anywhere; }
.teacher-roster td:nth-child(3) { white-space: nowrap; }
.teacher-roster td:nth-child(4), .teacher-roster td:last-child { min-width: 120px; }
.teacher-site-action { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.teacher-images summary { cursor: pointer; padding: 8px 0; color: var(--green); }
.teacher-images summary h2 { display: inline; margin-left: 6px; font-size: 1.2rem; color: var(--ink); }
.teacher-images-content { padding-top: 4px; }
.teacher-images-content .teacher-image-filter { margin-bottom: 12px; }
.teacher-website { width: calc(100vw - 32px); margin: 18px 0 0 50%; transform: translateX(-50%); padding: clamp(10px, 1.25vw, 18px); }
.teacher-website h3, .teacher-website .action-row { margin: 0; }
.teacher-website-choice, .teacher-image-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .92rem; }
.teacher-website-choice { margin: 0 0 12px; }
.teacher-website-choice select { max-width: min(100%, 40rem); }
.teacher-website-choice select, .teacher-image-filter select {
  font: inherit; color: var(--ink); border: 1px solid #cfdacf; border-radius: 9px; padding: 7px 9px; background: #fcfdfb;
}
.teacher-image-filter select { max-width: min(100%, 18rem); }
.teacher-image-filter select:focus-visible, .teacher-website-choice select:focus-visible { outline-offset: 2px; }
.teacher-website iframe { display: block; width: 100%; min-height: max(660px, 82dvh); border: 1px solid var(--line); border-radius: 12px; }
.teacher-website > .feedback { margin: 0 0 9px; }
.teacher-prompt { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #f0f6ed; font-size: .92rem; }
.teacher-prompt dt { font-weight: 700; }
.teacher-prompt dd { margin: 3px 0 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 277px), 1fr)); gap: 14px; }
.teacher-card { padding: 12px; }
.teacher-image { display: flex; align-items: center; overflow: hidden; border-radius: 12px; aspect-ratio: 3 / 2; background: #edf3e9; }
.teacher-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.teacher-card-details { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.teacher-card-details div { min-width: 0; overflow-wrap: anywhere; }
.teacher-name { margin: 0; font-size: 1.05rem; }
.teacher-team { color: var(--muted); font-size: .9rem; }
.teacher-copy { padding: 6px 9px; font-size: .88rem; min-height: 39px; }
.teacher-image-time { display: block; margin-top: 5px; }
.teacher-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 850px) {
  .entry { gap: 26px; grid-template-columns: .95fr 1.05fr; min-height: 0; }
  .studio-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 660px) {
  :root { --header-height: 66px; }
  body::before { background-position: 73% center; }
  .masthead-inner, .shell { width: calc(100% - 28px); }
  .brand-mark { width: 62px; }
  .entry, .studio-layout { grid-template-columns: 1fr; }
  .entry { padding-top: 36px; }
  .entry-art img { height: auto; aspect-ratio: 1.35; }
  .lead { margin: 15px 0 22px; }
  .workspace-nav { margin-top: 19px; }
  .prompt-row { display: grid; }
  .prompt-row .primary { justify-self: start; }
  .shell:has(#website-studio:not([hidden])) { width: calc(100% - 16px); }
  .website-preview > .panel-head { padding: 10px 12px; }
  .website-revision { grid-template-columns: 1fr; gap: 12px; padding-inline: 12px; }
  .website-version-choice select { max-width: min(64vw, 23rem); }
  .website-preview iframe { min-height: max(560px, 80dvh); }
}
