:root {
  --paper: #ffffff;
  --ground: #ece4d6;
  --ink: #2f2b2c;
  --ink-soft: #6a6466;
  --line: #3a3536;
  --wood: #7a5c43;
  --board: #3b3b3c;
  --chalk: #f2f2f2;
  --safety: #d9b35a;
  --signband: #4a5a66;
  --tape: repeating-linear-gradient(-40deg, #9a9592 0 10px, #f1ede6 10px 20px);
  --tape-y: repeating-linear-gradient(-40deg, #d9b35a 0 10px, #f6f1e4 10px 20px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  font-weight: 500; line-height: 1.6; word-break: keep-all;
}
b, strong, h1, h2, h3 { font-weight: 500; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 머리: 구석에 작게 */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; pointer-events: none;
}
.top > * { pointer-events: auto; }
.top-home img { display: block; width: 36px; height: 36px; object-fit: contain; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.85);
  font-size: 14px; text-decoration: none;
}
.pill:hover { background: var(--ink); color: #fff; }

/* ===== 첫 화면: 현장 ===== */
/* 장면이 화면 끝까지: 경계 없이 칠판 앞에 바짝 선 시점 */
body.studio { background: #fbfaf7; overflow-x: hidden; }
.stage-wrap { position: relative; height: 100svh; min-height: 640px; overflow: hidden; }
.stage { position: absolute; inset: 0; }
.scene { display: block; width: 100%; height: 100%; }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 34%, rgba(255, 236, 190, .22), transparent 70%),
    radial-gradient(ellipse 85% 80% at 50% 40%, transparent 55%, rgba(70, 52, 36, .26) 100%);
}
.cloud { position: absolute; width: 150px; opacity: .55; pointer-events: none; animation: drift 70s linear infinite; }
.cloud.c1 { top: 10%; left: 12%; }
.cloud.c2 { top: 14%; left: 74%; width: 110px; animation-duration: 95s; animation-delay: -30s; }
@keyframes drift { from { transform: translateX(-6vw); } to { transform: translateX(10vw); } }

.scene text { font-family: inherit; }
.plate { font-size: 19px; text-anchor: middle; fill: var(--ink); }
.chalk text { fill: var(--chalk); font-size: 23px; }
.chalk .chalk-h { font-size: 46px; }
.chalk .chalk-s { font-size: 19px; fill: #c8c8c8; }
.chalk .chalk-c { font-size: 30px; }
.chalk .chalk-g { font-size: 24px; }
.chalk.is-wipe { animation: wipe .45s ease-out; }
@keyframes wipe { from { opacity: 0; filter: blur(2px); } }

/* 리모컨 (작업실 리모컨의 밝은 버전) */
.remote {
  position: absolute; left: 50%; bottom: 3svh; transform: translateX(-50%); z-index: 5;
  width: min(520px, calc(100% - 32px)); padding: 16px 0 0; border-radius: 26px;
  background: linear-gradient(rgba(255, 253, 249, .96), rgba(247, 242, 234, .96));
  border: 1px solid rgba(47, 43, 44, .14);
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px -24px rgba(60, 45, 30, .55);
  backdrop-filter: blur(6px);
}
.remote-head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; padding: 0 14px; text-align: center; }
.remote-head h2 { margin: 0; font-size: 19px; }
.r-tag { margin: 0; font-size: 12px; color: var(--ink-soft); }
.r-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(47,43,44,.2); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.r-arrow:hover { border-color: var(--ink); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 14px 2px; }
.key {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px 8px;
  border: 0; border-radius: 14px; cursor: pointer; font: inherit; color: rgba(47,43,44,.55);
  background: rgba(47, 43, 44, .05);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(0,0,0,.12), 0 4px 10px -4px rgba(0,0,0,.25);
  transition: transform .08s;
}
.key:active { transform: translateY(2px); box-shadow: inset 0 1px 0 #fff, 0 0 0 rgba(0,0,0,.12); }
.key .k-no { font-size: 11px; }
.key .k-name { font-size: 15px; color: var(--ink); opacity: .7; }
.key .k-meta { font-size: 11px; }
.key.is-on { background: var(--ink); color: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 rgba(0,0,0,.35), 0 6px 14px -6px rgba(0,0,0,.6); }
.key.is-on .k-name { color: #fff; opacity: 1; }
.remote-body { padding: 10px 14px 14px; text-align: center; }
.r-desc { margin: 0 0 2px; font-size: 14px; }
.r-next { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.r-cta { display: block; height: 46px; line-height: 46px; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; }
.r-cta:hover { background: #000; }
.r-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); }
.course { cursor: pointer; }
.course .u { stroke: #f3dd8e; stroke-width: 2.6; fill: none; opacity: 0; transition: opacity .15s; }
.course:hover .u, .course:focus-visible .u { opacity: 1; }
.course:hover .chalk-c { fill: #fff; }
.sign-band { fill: #fff; font-size: 19px; text-anchor: middle; letter-spacing: 2px; }
.sign-k { fill: var(--ink-soft); font-size: 16px; }
.sign-v { fill: var(--ink); font-size: 18px; }
.sign-v.big { font-size: 25px; }
.sign-v.small { font-size: 15px; fill: var(--ink-soft); }

.hot { cursor: pointer; outline: none; }
.hot > g:first-child { transition: filter .2s; }
.hot:hover > g:first-child, .hot:focus-visible > g:first-child, .hot.is-on > g:first-child { filter: url(#r) drop-shadow(0 0 10px rgba(217,179,90,.55)); }
.hot:hover .plate, .hot.is-on .plate { text-decoration: underline; text-underline-offset: 4px; }

.hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 14px; color: var(--ink-soft); margin: 0; }

/* 장면 위에 뜨는 판 하나: 합판 + 안전 테이프 */
.board-pop {
  position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%);
  width: min(460px, calc(100% - 32px));
  background: #fffdf8; border: 2px solid var(--line); border-radius: 6px;
  box-shadow: 0 14px 40px rgba(60,50,40,.18);
  padding: 30px 26px 24px; animation: rise .25s ease-out;
}
.board-pop::before { content: ""; position: absolute; inset: -2px -2px auto -2px; height: 12px; background: var(--tape-y); border: 2px solid var(--line); border-radius: 6px 6px 0 0; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }
.pop-close { position: absolute; top: 18px; right: 14px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.pop-tag { margin: 0; font-size: 13px; color: var(--ink-soft); }
.board-pop h2 { margin: 2px 0 8px; font-size: 26px; }
.pop-lead { margin: 0 0 14px; }
.pop-note { margin: 0 0 14px; font-size: 14px; color: var(--ink-soft); }
.pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pop-list a {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 10px 14px; border: 1.5px solid #d8d2c8; border-radius: 6px; text-decoration: none; background: #fff;
}
.pop-list a:hover { border-color: var(--line); background: #faf6ee; }
.pop-list .sub { grid-column: 1; font-size: 12px; color: var(--ink-soft); }
.pop-list b { grid-column: 1; font-size: 18px; }
.pop-list .meta { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; color: var(--ink-soft); }
.pop-btn { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; }

.foot { display: flex; justify-content: center; gap: 18px; padding: 10px 16px 18px; font-size: 13px; color: var(--ink-soft); }
.foot a { text-decoration: none; }

@media (max-width: 700px) {
  .board-pop { position: fixed; bottom: 12px; }
  .hint { position: static; padding: 12px 16px 0; }
}

/* ===== 소개 페이지: 공사 안내판 ===== */
.intro { padding: 76px 16px 0; }
.crumb { max-width: 920px; margin: 0 auto 14px; font-size: 14px; color: var(--ink-soft); }
.crumb a { text-decoration: none; }

.notice { max-width: 920px; margin: 0 auto; position: relative; }
.notice-board { background: #fbf9f4; border: 3px solid var(--line); border-radius: 3px; position: relative; z-index: 1; }
.notice-band { background: var(--signband); color: #fff; text-align: center; letter-spacing: 6px; padding: 9px 0; font-size: 17px; border-bottom: 3px solid var(--line); }
.notice-grid { display: grid; grid-template-columns: 1fr 210px; }
.notice-rows { margin: 0; padding: 20px 26px 24px; display: grid; grid-template-columns: 92px 1fr; row-gap: 12px; align-items: baseline; }
.notice-rows dt { color: var(--ink-soft); font-size: 15px; letter-spacing: 2px; }
.notice-rows dd { margin: 0; }
.notice-rows .name { font-size: 32px; line-height: 1.25; }
.notice-rows .name small { display: block; font-size: 14px; color: var(--ink-soft); }
.notice-next {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none;
}
.notice-next .tag { background: var(--safety); padding: 1px 8px; border-radius: 3px; font-size: 13px; }
.notice-next .go { margin-left: auto; }
.notice-next:hover { background: #faf3df; }
.notice-side { border-left: 2px dashed #cfc7ba; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px; }
.notice-side img { width: 150px; }
.notice-side p { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
.notice-legs { display: flex; justify-content: space-around; height: 46px; margin-top: -2px; }
.notice-legs span { width: 12px; background: #6b6563; border-radius: 0 0 4px 4px; }

.ground { background: var(--ground); margin: 0 -16px; padding: 46px 16px 64px; }
.ground > * { max-width: 920px; margin-left: auto; margin-right: auto; }
.ground h2 { font-size: 24px; margin-top: 0; margin-bottom: 4px; }
.ground .kicker { margin: 0 auto; font-size: 14px; color: var(--ink-soft); }
.ground h2 { margin-left: auto; margin-right: auto; }

/* 공정표 */
.schedule { margin-top: 18px; background: #fffdf8; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: 340px 1fr; }
.schedule-head { background: var(--tape); border-bottom: 2px solid var(--line); height: 14px; }
.schedule-row { border-bottom: 1px solid #e6dfd2; min-height: 56px; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row > div:first-child { padding: 14px 16px; border-right: 1px solid #e6dfd2; }
.schedule-row .phase { display: block; font-size: 12px; color: var(--ink-soft); }
.schedule-row small { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.schedule-row .bar-cell { position: relative; padding: 12px 16px; }
.bar { position: absolute; top: 50%; height: 26px; transform: translateY(-50%); border-radius: 3px; border: 1.5px solid var(--line); background: #e6d6bb; }
.bar.wood { background: #c9a77c; }
.bar.done { background: var(--tape-y); }
.bar-cell-unused { position: relative; margin: 0 0 0 auto; width: max-content; max-width: 50%; font-size: 14px; color: var(--ink-soft); text-align: right; }
.scale { display: grid; grid-template-columns: 340px repeat(3, 1fr); text-align: right; font-size: 12px; color: var(--ink-soft); padding: 6px 0 0; }
.scale span:first-child { grid-column: 2; }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.panel { background: #fffdf8; border: 2px solid var(--line); border-radius: 4px; padding: 26px 22px 20px; position: relative; }
.panel::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 10px; background: var(--tape); border: 2px solid var(--line); border-radius: 4px 4px 0 0; }
.panel h3 { margin: 0 0 8px; font-size: 19px; }
.panel ul { margin: 0; padding-left: 1.1em; }
.panel li { margin: 4px 0; }

.to-class { text-align: center; margin-top: 44px; }
.to-class a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; background: var(--board); color: var(--chalk); border: 6px solid var(--wood); border-radius: 4px; text-decoration: none; font-size: 21px; }
.to-class p { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.fence { height: 22px; background: var(--tape); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); margin: 0 -16px; }

@media (max-width: 700px) {
  .notice-grid { grid-template-columns: 1fr; }
  .notice-side { border-left: 0; border-top: 2px dashed #cfc7ba; flex-direction: row; gap: 10px; justify-content: flex-start; }
  .notice-side img { width: 70px; }
  .notice-rows { grid-template-columns: 64px 1fr; padding: 16px; }
  .notice-rows .name { font-size: 25px; }
  .schedule-head, .schedule-row { grid-template-columns: 1fr; }
  .schedule-row > div:first-child { border-right: 0; padding-bottom: 0; }
  .scale { display: none; }
  .bar-cell-unused { max-width: none; margin: 34px 0 0; text-align: left; }
  .panels { grid-template-columns: 1fr; }
}
