:root{
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  color: #263e38;
  background: #f7f8f2;
  font-synthesis: none;
  --ink: #263e38;
  --green: #236d56;
  --lime: #def299;
  --line: #dfe5d9;
}
*{
  box-sizing: border-box;
}
body{
  margin: 0;
}
button,
input,
select,
textarea{
  font: inherit;
}
button,
a,
input,
select,
textarea{
  touch-action: manipulation;
}
button{
  cursor: pointer;
}
button:disabled{
  opacity: 0.45;
  cursor: default;
}
a{
  color: inherit;
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible{
  outline: 3px solid #e5a223;
  outline-offset: 4px;
}
h1,
h2,
p{
  margin-top: 0;
}
h1{
  font-size: clamp(32px, 4.3vw, 58px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}
h2{
  font-size: 21px;
  letter-spacing: -0.03em;
}
.topbar{
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4vw;
  background: #fbfcf7;
}
.topbar > a:first-child{
  font-size: 23px;
  font-weight: 850;
  text-decoration: none;
}
.topbar span{
  font-size: 11px;
  letter-spacing: 2px;
  background: var(--lime);
  border-radius: 6px;
  padding: 5px;
}
.topbar > a:last-child{
  font-size: 13px;
}
.hub{
  max-width: 1000px;
  padding: 52px 24px 80px;
  margin: auto;
}
.eyebrow{
  font-size: 12px;
  letter-spacing: 0.17em;
  font-weight: 750;
  color: #668474;
  margin-bottom: 18px;
}
.panel{
  padding: 28px;
  border: 1px solid var(--line);
  background: #fffef9;
  border-radius: 22px;
  margin-bottom: 24px;
}
.section-title{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.section-title h2{
  margin: 0;
  flex: 1;
}
.primary,
.secondary,
.quiet{
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 700;
  min-height: 44px;
}
.primary{
  background: var(--green);
  color: white;
  box-shadow: 0 4px 0 #164b3b;
}
.secondary{
  background: #eff2e9;
  color: var(--ink);
  border: 1px solid #dce3d5;
}
.quiet{
  background: transparent;
  color: #526b60;
  padding: 9px 12px;
}
.set-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
  max-height: 220px;
  overflow: auto;
}
.set-card{
  padding: 16px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.set-card:has(:checked){
  background: #eff7df;
  border-color: #4b865e;
}
.set-card small{
  display: block;
  margin-top: 5px;
  color: #70816f;
  font-size: 12px;
}
label{
  display: block;
  font-size: 14px;
  font-weight: 650;
}
input:not([type="radio"]):not([type="checkbox"]),
select,
textarea{
  width: 100%;
  padding: 12px;
  border: 1px solid #ccd7c7;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  margin-top: 8px;
}
input[type="radio"],
input[type="checkbox"]{
  accent-color: var(--green);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.check{
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 45px;
}
.muted{
  color: #758174;
  font-size: 13px;
  line-height: 1.7;
}
.error{
  padding: 16px;
  background: #fff0ea;
  color: #9a3c29;
  border-radius: 12px;
  margin-bottom: 20px;
}
summary{
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0 16px;
}
details details{
  margin: 22px 0;
}
fieldset{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 20px 0;
}
.recent{
  display: flex;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.recent > a:first-child{
  flex: 1;
}
.join-screen{
  max-width: 640px;
  margin: 14vh auto 40px;
  padding: 24px;
  text-align: center;
}
.join-screen input{
  font-size: 36px;
  letter-spacing: 0.3em;
  text-align: center;
}
.join-screen button{
  width: 100%;
  margin-top: 24px;
}
.join-screen label{
  text-align: left;
}
#world{
  position: absolute;
  inset: 0;
}
#world canvas{
  width: 100%;
  height: 100%;
  display: block;
}
#world-caption{
  position: absolute;
  bottom: 67px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}
#render-message{
  position: absolute;
  bottom: 100px;
  left: 20px;
  right: 20px;
  text-align: center;
  font-size: 12px;
  background: #fffbe7;
  border-radius: 10px;
}
#content > h2{
  font-size: 29px;
  line-height: 1.45;
  letter-spacing: -0.04em;
}
#content > p{
  color: #6d7d70;
  line-height: 1.8;
  font-size: 14px;
}
#content .eyebrow{
  color: #558c6b;
  font-size: 11px;
}
#feedback{
  font-size: 14px;
  line-height: 1.7;
  margin: 18px 0;
  color: #497458;
  min-height: 24px;
}
table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}
th,
td{
  padding: 17px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th{
  white-space: nowrap;
  background: #eef3e5;
}
td:first-child{
  min-width: 200px;
}
#world svg{
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 1000px){.topbar{
    padding: 0 20px;
  }
.topbar > strong{
    font-size: 13px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }}
@media (max-width: 720px){.topbar{
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding: 14px 18px;
    gap: 8px;
  }
.topbar > strong{
    display: none;
  }
.topbar > div button{
    font-size: 11px;
    padding: 8px;
  }
.hub{
    padding: 32px 16px;
  }
.panel{
    padding: 19px;
  }
#world-caption{
    bottom: 43px;
    font-size: 12px;
  }
#content > h2{
    font-size: 25px;
  }
.section-title{
    gap: 9px;
  }
.section-title h2{
    font-size: 18px;
  }
.section-title button{
    font-size: 12px;
    padding: 9px;
  }
.recent{
    flex-wrap: wrap;
    gap: 12px;
  }}
@media (prefers-reduced-motion: reduce){*,
  *:before,
  *:after{
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }}
#question-title{
  word-break: keep-all;
  overflow-wrap: anywhere;
}
#feedback{
  min-height: 72px;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  line-height: 1.6;
}
#feedback:empty{
  padding: 14px 18px;
}
#feedback[data-tone="correct"]{
  background: #edf3dc;
  color: #4b7044;
}
#feedback[data-tone="encourage"]{
  background: #fcf0d8;
  color: #886630;
}
#growth{
  min-height: 28px;
  font-size: 12px;
  line-height: 24px;
  color: #727c52;
}
#growth[data-stage="light"]{
  color: #9c702e;
}
[hidden]{
  display: none !important;
}
.classroom-hub{
  max-width: 960px;
}
.flow-steps{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.flow-steps button{
  padding: 9px 13px;
  border: 0;
  border-radius: 24px;
  color: #63776d;
  background: #edf1e6;
  font-size: 13px;
}
.flow-steps .current{
  background: #345e4f;
  color: white;
}
.flow-page{
  animation: classroom-enter 0.2s ease-out;
}
.flow-actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.flow-page .primary{
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  min-height: 48px;
}
.set-card{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.set-card label{
  display: flex;
  align-items: center;
  gap: 12px;
}
.set-card a{
  font-size: 13px;
}
.set-card small{
  display: block;
}
.question-editor{
  border: 1px solid #d8e0d1;
  background: #fffefa;
  padding: 24px;
  border-radius: 20px;
  margin: 20px 0;
}
.question-tools{
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.question-tools button{
  min-height: 44px;
  min-width: 44px;
  border: 1px solid #d4dccf;
  background: #f5f6ed;
  border-radius: 10px;
  color: #365548;
}
.editor-choices{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-error{
  display: block;
  color: #a74336;
  min-height: 0;
}
.field-error:empty{
  display: none;
}
.recovery{
  padding: 16px;
  background: #fff0cb;
  border-radius: 14px;
  margin-bottom: 20px;
}
.question-editor textarea{
  resize: vertical;
}
.classroom-hub input,
.classroom-hub select,
.classroom-hub textarea{
  max-width: 100%;
}
.classroom-hub input[type="radio"],
.classroom-hub input[type="checkbox"]{
  width: auto;
}
@media (max-width: 600px){.editor-choices{
    grid-template-columns: 1fr;
  }
.question-editor{
    padding: 16px;
  }
.flow-steps button{
    font-size: 11px;
    padding: 8px;
  }
.flow-actions > *{
    flex: 1;
  }}
@media (prefers-reduced-motion: reduce){.flow-page{
    animation: none !important;
  }}
.question-editor h3{
  margin: 0;
}
.flow-page h2:focus,
.section-title h2:focus{
  outline: 0;
}
.flow-page :focus-visible,
.question-editor :focus-visible{
  outline: 3px solid #8cb294;
  outline-offset: 3px;
}
#feedback:empty{
  display: none;
}
[hidden]{ display: none !important; }
.start-choices{ display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0; }
.start-choices > button{ min-height: 72px; flex: 1 1 240px; max-width: 420px; }
#saved-sets{ margin-top: 24px; }
#editor{ max-width: 800px; margin-inline: auto; }
[data-write]{ animation: classroom-enter 200ms ease-out; }
[data-write=name]{ max-width: 620px; }
[data-write] h3{ font-size: 24px; margin: 16px 0 24px; }
.question-position{ display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.question-position label{ display: flex; align-items: center; gap: 12px; font-size: 13px; margin: 0; }
.question-position select{ width: auto; min-width: 120px; }
.editor-secondary{ display: flex; flex-wrap: wrap; justify-content: space-between; margin-top: 8px; }
.question-editor{ margin: 0; }
.question-tools button{ min-height: 44px; }
.review-edit-row{ display: flex; width: 100%; text-align: left; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; border: 1px solid #dce1d1; background: #fafbf5; border-radius: 14px; margin-bottom: 10px; color: #28473c; }
.review-edit-row > span:first-child{ min-width: 0; overflow-wrap: anywhere; }
.review-edit-row > span:last-child{ flex-shrink: 0; }
.review-edit-row small{ display: block; color: #627866; margin-top: 6px; }
.import-panel{ margin-top: 24px; }
.classroom-hub h1{ font-size: clamp(28px, 4vw, 40px); margin-bottom: 20px; }
.classroom-hub .flow-page{ padding: 30px; }
@media (max-width: 600px){.classroom-hub .flow-page{ padding: 22px 18px; }
.question-position{ align-items: flex-start; }
.question-position label{ flex-direction: column; align-items: flex-start; gap: 2px; }
.question-tools{ flex-wrap: wrap; }
.question-editor .section-title{ flex-wrap: wrap; gap: 10px; }
.flow-actions > *{ flex: 0 1 auto; }}
@media (prefers-reduced-motion: reduce){[data-write]{ animation: none; }}
.is-writing > h1, .is-writing > .eyebrow{ display: none; }
.is-writing{ padding-top: 28px; }
.question-menu{ position: relative; }
.question-menu > summary{ cursor: pointer; font-size: 13px; padding: 10px; }
.question-menu .question-tools{ position: absolute; right: 0; top: 100%; z-index: 5; background: #fffef8; border: 1px solid #dde3d4; box-shadow: 0 6px 20px #20413218; padding: 10px; border-radius: 12px; width: 200px; }
#editor .question-editor h3{ font-size: 20px; margin: 0; }
html{ word-break: keep-all; }
.service-layout-constrained{
  max-width: 880px;
}
.classroom-hub.service-layout-constrained{
  max-width: 880px;
}
.service-settings-panel,
.service-input-panel{
  max-width: 800px;
}
.service-desktop-action{
  max-width: 480px;
}
.flow-steps button{
  border: 0;
  padding: 9px 13px;
  border-radius: 24px;
  color: #63776d;
  background: #edf1e6;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
}
.flow-steps button.current{
  background: #345e4f;
  color: #fff;
}
.flow-steps button:disabled{
  opacity: 1;
}
.choice-summary{
  padding: 12px 16px;
  border-radius: 14px;
  background: #eef3e1;
  color: #315948;
  font-weight: 700;
  margin: 0 0 18px;
}
.empty-state{
  padding: 18px;
  border-radius: 14px;
  background: #f3f5ea;
  color: #5d7264;
}
.set-card.is-draft{
  opacity: 0.92;
  background: #f7f5ee;
}
.set-card.is-ready a{
  align-self: flex-start;
}
.mode-picker{
  border: 0;
  padding: 0;
  margin: 12px 0 20px;
}
.mode-picker legend{
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}
.mode-card{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid #e3ddc9;
  border-radius: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fffdf4;
}
.mode-card:has(:checked){
  border-color: #417958;
  background: #f3f8e8;
}
.mode-card small{
  display: block;
  margin-top: 4px;
  color: #66786c;
  font-weight: 500;
}
.live-class-banner{
  margin: 0 0 24px;
}
.live-class-card{
  padding: 18px 20px;
  border: 2px solid #cfe0b8;
  background: #f4f8e8;
  border-radius: 18px;
}
.live-class-card small{
  display: block;
  margin-top: 4px;
  color: #5f755f;
}
#start-hint:empty{
  display: none;
}
#start-hint{
  margin: 8px 0 0;
}
.join-screen{
  max-width: 480px;
}
.join-screen h1,
.join-screen p{
  overflow-wrap: anywhere;
}
.join-screen .primary{
  max-width: none;
}
#connection[data-state="retry"]{
  color: #8a4b24;
  font-weight: 700;
}
@media (max-width: 720px){.join-screen{
    margin-top: 8vh;
    padding: 16px;
  }
.join-screen input{
    font-size: 28px;
    letter-spacing: 0.18em;
  }
.classroom-hub .flow-page .primary,
  .classroom-hub .start-choices > button{
    width: 100%;
    max-width: none;
  }}
@media (max-width: 400px){.flow-steps button{
    font-size: 12px;
    padding: 8px 10px;
  }}
#editor .question-editor > label{ margin-bottom: 14px; }
#editor .question-editor .section-title{ justify-content: space-between; margin-bottom: 16px; }
#report-content h2:focus{ outline: none; }
@media (max-width: 600px){.classroom-hub .flow-steps{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 22px 0;
  }
.classroom-hub .flow-steps button{
    min-width: 0;
    min-height: 40px;
    padding: 8px 3px;
    font-size: 11px;
    white-space: nowrap;
  }}
