@font-face {
  font-family: "NanumSquare";
  src: url("../assets/css/fonts/NanumSquareR.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "NanumSquare";
  src: url("../assets/css/fonts/NanumSquareB.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:root {
  font-family: "NanumSquare", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.5;
  --ink: #1e403a;
  --line: #c1cbc3;
  color: #222e2a;
  background: #f6f8f5;
  word-break: keep-all;
  font-synthesis: none;
}
body {
  margin: 0;
}
header,
main {
  width: min(1240px, calc(100% - 40px));
  margin: auto;
}
header,
.bar,
.camera,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header {
  height: 56px;
  border-bottom: 1px solid #d1d2c4;
}
a {
  color: var(--ink);
  text-underline-offset: 4px;
}
header a {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.025em;
  margin: 26px 0 18px;
  line-height: 1.18;
}
.game-intro {
  margin: -0.4rem 0 1rem;
  color: #42564c;
  font-size: 0.95rem;
}
.play-guide {
  margin: 18px 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #40544a;
}
.play-guide summary { cursor: pointer; width: fit-content; }
.play-guide p { max-width: 65ch; }
.sheet .daily-goal {
  border-inline-start: 3px solid #4d7263;
  padding: 5px 10px;
  font-size: 0.9rem;
}
.sheet .achieved { color: #84382f; border-color: currentColor; font-weight: 700; }
#inspection-controls,
#inspection-controls div {
  display: flex;
  align-items: center;
  gap: 6px;
}
#inspection-controls {
  justify-content: space-between;
  padding: 2px 10px;
  font-size: 0.83rem;
}
#inspection-controls button {
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  color: white;
  border: 0;
  font-size: 1.25rem;
}
#inspection-controls output {
  min-width: 3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(285px, 345px);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.stage {
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.bar,
.camera {
  padding: 7px 13px;
}
.bar b {
  color: #f7f8fa;
}
.bar span {
  font-size: 0.81rem;
}
.camera {
  justify-content: center;
  gap: 16px;
  font-size: 0.82rem;
}
.camera button {
  background: #343d44;
  color: white;
  border-color: #62707a;
  min-width: 44px;
  font-size: 0.86rem;
}
.camera span {
  min-width: 5em;
  text-align: center;
}
#room-view {
  position: relative;
  height: clamp(320px, 34vw, 465px);
  overflow: hidden;
  background: #c5daca;
  isolation: isolate;
}
#room-view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#markers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #bdc4c9;
  font-weight: 700;
}
button:disabled {
  opacity: 0.52;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #cb6424;
  outline-offset: 2px;
}
button.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  background: transparent;
  color: #fff;
  border: none;
  padding: 0;
  min-width: 44px;
  min-height: 40px;
  font-size: 0.76rem;
  text-shadow: 0 1px 2px #29332d;
}
button.seat span {
  display: inline-block;
  min-width: 30px;
  background: #2c403bea;
  border: 1px solid #ffffff94;
  border-radius: 4px;
  padding: 2px 5px;
}
button.seat.current span {
  background: #a94719;
  color: white;
}
button.seat.seen span {
  border-bottom: 3px solid #f7c766;
}
.sheet {
  padding: clamp(16px, 2vw, 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
}
.sheet h2 {
  margin: 0 0 13px;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
}
.timetable {
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
  font-size: 0.91rem;
}
.timetable li {
  display: grid;
  grid-template-columns: 4em 1fr auto;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #d9dcde;
}
.timetable span,
.timetable time {
  color: #5e676d;
}
.timetable time {
  font-variant-numeric: tabular-nums;
}
.scoring {
  margin-top: 14px;
  color: #515d65;
  font-size: 0.84rem;
}
.scoring summary {
  cursor: pointer;
  padding: 7px 0;
}
.sheet p {
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
  margin: 7px 0 13px;
}
.sheet .fine {
  font-size: 0.83rem;
  color: #52616b;
}
.sheet button {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 7px;
}
.sheet .primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  text-align: center;
}
.sheet .back {
  background: transparent;
  border: 0;
  color: #4e6156;
  text-align: center;
  text-decoration: underline;
}
.shortcut {
  margin-inline-start: 0.6em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 0.35em;
  font: inherit;
  font-size: 0.75rem;
}
@media (hover: none) and (pointer: coarse) {
  .shortcut {
    display: none;
  }
}
.sheet .record {
  border-bottom: 1px solid #d5dadd;
  padding: 5px 0 9px;
  font-size: 0.9rem;
  margin: 7px 0;
}
.real-case {
  margin-block: 1rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 2px solid var(--line);
}
.real-case h3 {
  margin: 0;
  font-size: 0.91rem;
}
.sheet .real-case p {
  margin: 0.3rem 0;
  font-size: 0.91rem;
}
.real-case a {
  font-size: 0.81rem;
}
.verdict {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a405d;
}
#notice {
  font-size: 0.85rem;
}
footer {
  margin: 24px 0;
  border-top: 1px solid #ccd2c6;
  padding: 16px 0;
  gap: 15px;
  font-size: 0.84rem;
}
aside {
  text-align: center;
  color: #647268;
}
.flat #markers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 6px;
  padding: 12px;
}
.flat button.seat {
  position: static;
  transform: none;
  background: #a97849;
  border: 4px solid #bd935d;
  border-radius: 5px;
  min-height: 56px;
}
.flat #room-view {
  background: #d5d6bf;
}
@media (max-width: 780px) {
  header {
    height: 44px;
  }
  .desk {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  h1 {
    margin: 16px 0 12px;
  }
  header,
  main {
    width: calc(100% - 28px);
  }
  .stage[data-phase="intro"] #room-view {
    height: clamp(190px, 31dvh, 320px);
  }
  #room-view {
    height: clamp(225px, 62vw, 360px);
  }
  .sheet {
    min-height: 0;
    padding: 16px;
  }
  .camera,
  .bar {
    padding: 4px 9px;
  }
  .camera button {
    min-height: 36px;
  }
  .sheet p {
    margin: 4px 0 9px;
  }
  footer {
    flex-wrap: wrap;
  }
  .seat span {
    font-size: 0.72rem;
  }
}
#detail {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  min-width: 125px;
  pointer-events: none;
  background: #fff5d3;
  color: #463e31;
  border: 1px solid #9b895d;
  border-radius: 4px;
  box-shadow: 0 2px 7px #30433b33;
  padding: 7px 11px;
}
#detail small,
#detail strong {
  display: block;
}
#detail small {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
#detail strong {
  font-size: 0.92rem;
}
#detail.lens,
#detail.screen {
  background: #203e40;
  color: #dcf7ed;
  border: 2px solid #668784;
  border-radius: 9px;
}
#detail.lens {
  border-radius: 4px 12px 13px 10px;
}
#detail.clock {
  background: #f7f6e4;
  border: 2px solid #68857b;
  font-variant-numeric: tabular-nums;
}
.flat #detail {
  min-width: 0;
}
.flat #room-view:has(#detail:not([hidden])) #markers {
  bottom: 50px;
}

#room-view {
  height: clamp(350px, 43vw, 550px);
  outline-offset: -3px;
}
#room-view:focus-visible {
  outline: 2px solid #c9b48b;
}
#room-view canvas {
  touch-action: none;
  cursor: grab;
}
#room-view canvas:active {
  cursor: grabbing;
}
body:not(.flat) .seat:not(:focus-visible) {
  pointer-events: none;
}
.camera {
  justify-content: space-between;
  min-height: 42px;
}
.camera span {
  font-size: 0.79rem;
  color: #eceff1;
}
.camera #nearby {
  font-size: 0.85rem;
  min-height: 38px;
}
.touch-guide,
#walk-pad,
#reticle,
.flat .camera,
.stage:not([data-phase="hall"]) .camera {
  display: none;
}
body:not(.flat) .walking #reticle {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #343e3a9c;
  pointer-events: none;
}
@media (pointer: coarse), (max-width: 780px) {
  body:not(.flat) .walking #walk-pad {
    display: block;
    position: absolute;
    z-index: 3;
    bottom: 10px;
    left: 10px;
    width: 76px;
    height: 76px;
    border: 2px solid #fff9;
    border-radius: 50%;
    background: radial-gradient(circle, #2a45495c, #18383b60);
    touch-action: none;
    user-select: none;
  }
  #walk-pad i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #ffffffe0;
    border: 1px solid #536c68;
    pointer-events: none;
  }
  .desktop-guide {
    display: none;
  }
  .touch-guide {
    display: inline;
  }
  #room-view {
    height: clamp(255px, 44dvh, 420px);
  }
  .camera {
    gap: 5px;
  }
  .camera span {
    font-size: 0.74rem;
  }
}
@media (max-width: 780px) {
  .camera {
    flex-wrap: wrap;
  }
  .camera .touch-guide {
    flex-basis: 100%;
  }
  .camera button {
    flex: 1;
  }
}

.sheet .habit {
  color: #47584e;
  font-size: 0.87rem;
  margin-bottom: 0.35rem;
}
@media (max-width: 780px) {
  .desk:has(.stage[data-phase="student"]) #room-view,
  .desk:has(.stage[data-phase="verdict"]) #room-view {
    height: clamp(200px, 34dvh, 330px);
  }
}

#view-switch {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  background: #f8f6eff5;
  color: #24372f;
  border: 1px solid #aeb7af;
  min-height: 40px;
  font-size: 0.82rem;
  box-shadow: 0 1px 6px #24332b25;
}

.heel-example {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #dce0da;
}
.heel-example img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flat .stage:is([data-phase="intro"], [data-phase="final"]) #room-view {
  background: #c4cec1 url("classroom.jpg") center / cover no-repeat;
}
.stage[data-phase="intro"] #markers,
.stage[data-phase="final"] #markers {
  visibility: hidden;
}
.total {
  color: #993c36;
  font-variant-numeric: tabular-nums;
}
.total strong {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.total span {
  color: #56655d;
}
.total small {
  font-size: 0.48em;
  margin-inline-start: 0.12em;
  letter-spacing: normal;
}
.report li {
  grid-template-columns: auto 1fr auto 3em;
  gap: 8px;
  font-size: 0.87rem;
}
.report li span:last-child {
  text-align: right;
}
.report b {
  color: #666;
  font-weight: 500;
}
.report .hit {
  color: var(--ink);
  font-weight: 700;
}
.sheet .comparison {
  padding: 8px 12px;
  background: #eaf2ed;
  border-left: 3px solid #427560;
  color: var(--ink);
}
.share-status:empty,
#notice:empty {
  display: none;
}
@media (max-width: 780px) {
  .stage[data-phase="final"] {
    display: none;
  }
}
