/* GLITCH in-game device — 2D CRT shell (hub mobile CRT와 같은 결) */
.gpDock{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 24px}
.gpDock .gpButton{flex:1;min-width:130px}

.glitchPhone{
  box-sizing:border-box;
  /* 일반 스마트폰 비율(~9:19.5). 짧은 화면에서는 너비도 같이 줄임 */
  width:min(340px,calc(100vw - 24px),calc((100dvh - 28px) * 9 / 19.5));
  aspect-ratio:9/19.5;
  height:auto;
  max-height:calc(100dvh - 28px);
  padding:12px 10px 14px;
  border:0;
  border-radius:36px;
  background:linear-gradient(160deg,#d8ccb0,#c4b496 45%,#9e8d70);
  color:#d8f5de;
  box-shadow:0 22px 70px #000b,inset 0 1px 0 #efe6d4aa,inset 0 -2px 0 #7a6a52;
  font:15px/1.7 system-ui,"Noto Sans KR",sans-serif;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  overscroll-behavior:contain;
}
.glitchPhone::backdrop{
  background:#02080ed4;
  backdrop-filter:blur(5px);
}

.gpCrtScreen{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-radius:22px;
  overflow:hidden;
  background:#07140c;
  border:3px solid #2a241c;
  box-shadow:inset 0 0 48px #000c,0 0 28px #3dff6a1a;
}

.gpHeader{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #1a3a28;
  background:#0a1a12ee;
  color:#9ed4aa;
}
.gpHeader h2{
  margin:0;font-size:15px;font-weight:800;letter-spacing:.12em;
  font-family:Consolas,"Courier New",ui-monospace,monospace;color:#3dff6a;
}
.gpTabs{
  display:flex;gap:4px;padding:8px;
  background:#0c1f16;
  border-bottom:1px solid #1a3a28;
}
.gpTabs .gpButton{flex:1;padding:9px 5px;min-width:0;font-size:13px}

.gpButton{
  box-sizing:border-box;min-height:44px;padding:10px 14px;
  border:1px solid #3dff6a44;border-radius:8px;
  background:#0d2418;color:#c8f5d0;
  font:inherit;font-size:14px;line-height:1.6;cursor:pointer;touch-action:manipulation;
}
.gpButton:hover{background:#143528;border-color:#3dff6a88}
.gpButton:focus-visible{outline:2px solid #3dff6a;outline-offset:2px}
.gpButton[aria-selected=true],
.gpButton[aria-pressed=true],
.gpPrimary{
  background:#1a4a2e;color:#e8ffe8;border-color:#3dff6a;
  box-shadow:0 0 12px #3dff6a33;
}

.gpBody{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  padding:16px 14px 18px;
  overflow:auto;
  overscroll-behavior:contain;
  color:#d8f5de;
}
.gpBody::after{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:5;
  opacity:.12;
  background:repeating-linear-gradient(0deg,transparent 0 2px,#fff 3px);
}
.gpBody>*{position:relative;z-index:1}
.gpBody h3{font-size:16px;margin:0 0 10px;color:#3dff6a;font-family:Consolas,"Courier New",ui-monospace,monospace}
.gpNote{font-size:12px;line-height:1.7;color:#8ab896;white-space:pre-line;overflow-wrap:anywhere}
.gpContacts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}

.gpBubble{
  margin:12px 24px 12px 0;padding:12px 14px;
  border-radius:12px 12px 12px 2px;
  background:#0d2818;border:1px solid #3dff6a33;
  overflow-wrap:anywhere;
}
.gpBubble.gpMine{
  margin:12px 0 12px 24px;border-radius:12px 12px 2px 12px;
  background:#143528;border-color:#3dff6a55;
}
.gpBubble small{font-size:11px;color:#6aaa7a}
.gpBubble p{margin:4px 0 0;font-size:14px;white-space:pre-line;color:#e4ffea}

.gpReplies{display:grid;gap:8px}
.gpReply{text-align:left}
.gpComparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:14px 0}
.gpFrame{min-width:0;border:1px solid #2a5a40;border-radius:8px;overflow:hidden;background:#0a1c12}
.gpFrameLabel{font-size:11px;padding:7px 9px;background:#102818;color:#8ab896}
.gpView{position:relative;display:flex;gap:5px;align-items:end;justify-content:space-around;min-height:160px;padding:12px 7px;background:linear-gradient(0deg,#1a3a28 0 22%,#0a1a12 23%);box-sizing:border-box}
.gpObject{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;width:32%;min-height:58px;padding:6px 2px;border:1px solid #3dff6a55;color:#e6f4f8;background:#143528;font-size:11px;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.gpObject0{height:78px}.gpObject1{height:102px}.gpObject2{height:60px}
.gpMissing{visibility:hidden}
.gpView--paper{background:#0d2418;align-items:center}
.gpView--paper .gpObject{height:82px;border-color:#3dff6a44;background:#1a3a28}
.gpView--mirror{background:linear-gradient(135deg,#0a1a12,#1a4a2e);align-items:center}
.gpView--street .gpObject1{width:22%;height:123px;border-radius:12px 12px 0 0}
.gpView--terrace{background:linear-gradient(0deg,#1a3a28 20%,#0a1a12 21%)}
.gpInspect{display:grid;gap:7px}
.gpFeedback{border-left:2px solid #3dff6a;padding:10px 12px;background:#0d2818;font-size:13px;color:#c8f5d0}
.gpPrimary{width:100%;margin-top:16px}
.gpPhoto{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid #1a3a28}

.gpCrtFoot{
  flex:0 0 auto;
  display:flex;justify-content:space-between;align-items:center;
  margin-top:10px;padding:2px 6px 0;
}
.gpCrtLogo{font-size:11px;font-weight:800;letter-spacing:.16em;color:#5a4e3e}
.gpCrtLeds{display:flex;gap:5px}
.gpCrtLeds i{width:7px;height:7px;border-radius:50%;background:#3a3228;box-shadow:inset 0 0 2px #000;display:block}
.gpCrtLeds i.on{background:#3dff6a;box-shadow:0 0 8px #3dff6a}

@media(max-width:360px){.gpBody{padding:12px}.gpComparison{gap:6px}.gpView{padding:8px 4px}.gpDock .gpButton{font-size:12px}}
@media(prefers-reduced-motion:reduce){.glitchPhone::backdrop{backdrop-filter:none}}

.gpView{height:190px;display:block;background:linear-gradient(0deg,#1a3a28 0 24%,#0a1a12 25%);perspective:400px}
.gpObject{position:absolute;bottom:14px;display:block;height:130px!important;width:30%!important;padding:0;border:0;background:none!important;overflow:visible}
.gpObject0{left:4%}.gpObject1{left:36%}.gpObject2{left:68%}
.gpObjectLabel{position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);white-space:normal;width:100%;font-size:11px;line-height:1.4;color:#c8f5d0}
.gpObject::before,.gpObject::after{content:'';position:absolute;box-sizing:border-box}
.gpView--room .gpObject0::before,.gpView--terrace .gpObject0::before{left:20%;top:44px;width:65%;height:43px;border:3px solid #3dff6a66;border-radius:4px;background:#1a4a2e}
.gpView--room .gpObject0::after,.gpView--terrace .gpObject0::after{left:12%;top:82px;width:80%;height:27px;border-top:5px solid #3dff6a88;border-left:3px solid #2a6a40;border-right:3px solid #2a6a40}
.gpView--room .gpObject1::before{left:0;top:80px;width:100%;height:27px;border-top:7px solid #2a6a40;border-left:4px solid #1a4a2e;border-right:4px solid #1a4a2e}
.gpView--room .gpObject1::after{left:22%;top:50px;width:64%;height:29px;border:3px solid #3dff6a55;background:#0a1a12;box-shadow:0 4px #1a3a28}
.gpView--room .gpObject2::before{left:10%;top:10px;width:90%;height:69px;border:2px solid #2a5a40;background:linear-gradient(90deg,transparent 46%,#3dff6a44 48% 52%,transparent 54%),linear-gradient(0deg,transparent 45%,#3dff6a44 47% 52%,transparent 54%),#143528}
.gpView--terrace .gpObject1::before{left:25%;top:67px;width:62%;height:37px;background:#4a6a40;clip-path:polygon(0 0,100% 0,82% 100%,18% 100%)}
.gpView--terrace .gpObject1::after{left:20%;top:37px;width:70%;height:40px;border-radius:50% 30%;background:#2a6a48;box-shadow:-7px 8px #1a4a30,7px 4px #3a7a50}
.gpView--terrace .gpObject2::before{left:0;top:83px;width:100%;height:18px;border-radius:50%;background:#3dff6a44;box-shadow:0 0 12px #3dff6a33}
.gpView--street .gpObject0::before{left:0;top:45px;width:100%;height:61px;background:#1a3a28;border-top:18px solid #6a8a40}
.gpView--street .gpObject0::after{left:12%;top:69px;width:75%;height:36px;border:2px solid #2a5a40;background:#0a1a12}
.gpView--street .gpObject1::before{left:58%;top:3px;width:4px;height:104px;background:#3dff6a66}
.gpView--street .gpObject1::after{left:32%;top:3px;width:60%;height:8px;border-radius:8px;background:#c8f5d0;box-shadow:0 9px 18px #3dff6a33}
.gpView--street .gpObject2::before{left:5%;top:97px;width:85%;height:3px;background:#2a5a40;transform:rotate(-14deg)}
.gpView--paper{height:210px;background:#0d2418}
.gpView--paper .gpObject{position:relative;left:0;bottom:auto;width:100%!important;height:50px!important;margin-bottom:5px;background:#1a3a28!important;border:1px solid #3dff6a44}
.gpView--paper .gpObjectLabel{bottom:15px}
.gpView--mirror .gpObject0::before{inset:15px 0 20px;background:repeating-linear-gradient(0deg,transparent 0 10px,#3dff6a44 11px 12px),repeating-linear-gradient(90deg,transparent 0 10px,#3dff6a44 11px 12px)}
.gpView--mirror .gpObject1::before{left:35%;top:43px;width:18px;height:56px;border-radius:9px;background:#8ab896;transform:rotate(-15deg)}
.gpView--mirror .gpObject2::before{inset:8px 5px 20px;border:3px solid #2a5a40;border-left:0}
.gpView--remote .gpObject::before{left:0;top:37px;width:100%;height:55px;border:1px solid #2a5a40;background:#143528}
.gpView--remote .gpObjectLabel{bottom:51px}
.gpView--remote .gpObject2::before{left:25%;top:66px;width:25px;height:17px;border-radius:2px 2px 7px 7px;transform:rotate(75deg);background:#8ab896}
.gpView--remote .gpObject2 .gpObjectLabel{bottom:-6px}
.gpBody>.gpReply{display:block;width:100%;margin-top:9px}
.gpView--cafe .gpObject0{left:35%}.gpView--cafe .gpObject1{left:4%}
.gpView--cafe .gpObject0::before{inset:12px 0 32px;border:3px solid #3dff6a55;background:linear-gradient(90deg,transparent 46%,#3dff6a44 47% 52%,transparent 53%),#143528}
.gpView--cafe .gpObject1::before{left:16%;top:60px;width:65%;height:35px;border:3px solid #3dff6a44}
.gpView--cafe .gpObject1::after{left:9%;top:92px;width:83%;height:18px;border:3px solid #3dff6a44;border-bottom:0}
.gpView--cafe .gpObject2::before{inset:15px 2px 24px;border:3px solid #3dff6a55;background:#1a3a28}
.gpView--cafe .gpShifted{left:1%;bottom:35px;z-index:1}
.gpView--cafe .gpShifted::before{background:#1a4a2e}
.gpView--cafe .gpShifted .gpObjectLabel{bottom:40px;background:#0a1a12}
.gpView--signalLamp .gpObject0::before{left:28%;top:15px;width:38%;height:30px;border-radius:45%;background:#c8f5a0;box-shadow:0 0 25px #3dff6a66}
.gpView--signalLamp .gpObject0::after{left:45%;top:44px;width:4px;height:62px;background:#3dff6a66}
.gpView--signalLamp .gpObject0.gpChanged::before{background:#1a3a28;box-shadow:none}
.gpView--signalLamp .gpObject1::before{inset:10px 0 20px;border:3px solid #2a5a40;background:#0d2418}
.gpView--signalLamp .gpObject2::before{inset:65px 2px 20px;border:3px solid #3dff6a44}

.gpEvidenceImage{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;background:#041008}
.gpComparison:has(.gpEvidenceImage){grid-template-columns:1fr}
.gpFrame:has(.gpEvidenceImage){margin-bottom:8px}

.gpARStage{position:relative;aspect-ratio:3/2;background:#041008 center/cover;overflow:hidden}
.gpARStage video{width:100%;height:100%;object-fit:cover}
.gpARStage>img{position:absolute;bottom:0;left:20%;height:90%;width:60%;object-fit:contain;opacity:.78;pointer-events:none}
.gpRealCamera .gpButton{margin:8px 4px}
.gpDeviceEnding{padding:20px;border:1px solid #3dff6a66;background:#0d2818;margin:20px 0;border-radius:12px}

#gameScreen .gameActions.gpMenuActive{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
#gameScreen .gameActions.gpMenuActive>.badge{display:none}
#gameScreen .gameActions.gpMenuActive>button{box-sizing:border-box;width:100%;min-width:0;min-height:44px;height:48px;margin:0;padding:7px 8px;white-space:nowrap;font-size:13px}
#gameScreen .gameTopbar:has(.gpMenuActive){flex-wrap:wrap}
.gpSceneTools{margin:16px 20px;gap:10px;padding:16px;border:1px solid #2a5a40;border-radius:14px;background:#0d2418}
.gpSceneTools:empty{display:none}
.gpTaskHint{flex-basis:100%;margin:0;color:#8ab896;font-size:14px;line-height:1.7}
.gpSceneTools .gpPrimary{margin-top:0}
.gpSceneTools .gpButton{flex-basis:100%;min-height:48px}
@media(min-width:760px){#gameScreen .gameActions.gpMenuActive{grid-template-columns:repeat(6,minmax(0,1fr))}}

.gpDocument{min-height:180px;padding:24px;background:#0d2818;color:#c8f5d0;border:1px solid #3dff6a44;line-height:1.8}
.gpDocument .gpNote{color:#8ab896}
.gpDocument h4{margin-top:0;color:#3dff6a}

.gpAnomaly{position:relative;overflow:hidden}
.gpAnomaly>.gpEvidenceImage{display:block}
.gpAnomalyGhost{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.32;filter:drop-shadow(2px 0 #7cf7ff) drop-shadow(-2px 0 #ee90c8);animation:gpForeignEcho 4.6s infinite;pointer-events:none}
.gpAnomaly--room .gpAnomalyGhost{clip-path:inset(30% 49% 19% 25%)}
.gpAnomaly--street .gpAnomalyGhost{clip-path:inset(5% 43% 12% 46%)}
@keyframes gpForeignEcho{0%,75%,84%,100%{transform:translateX(1px);opacity:.28}77%,82%{transform:translateX(-2px);opacity:.5}79%{transform:translateX(2px);opacity:.38}}
@media(prefers-reduced-motion:reduce){.gpAnomalyGhost{animation:none;transform:translateX(1px)}}
.gpAnomaly--crossCafe .gpAnomalyGhost{clip-path:inset(18% 33% 9% 51%)}

.glitchPhone .gpHeader{flex:0 0 auto;position:relative;z-index:6}
.glitchPhone .gpTabs{flex:0 0 auto;position:relative;z-index:6;box-shadow:0 6px 10px #0006}

/* romance undelivered 등 호환 */
.glitchPhone .grUndelivered{opacity:.55;border-style:dashed}
/* Fallback: keep the 9:19.5 phone shape on browsers without aspect-ratio or dvh support. */
@supports not (height:1dvh){.glitchPhone{width:min(340px,calc(100vw - 24px),calc((100vh - 28px) * 9 / 19.5));max-height:calc(100vh - 28px)}}
@supports not (aspect-ratio:1/1){.glitchPhone{width:min(340px,calc(100vw - 24px),calc((100vh - 28px) * 9 / 19.5));height:calc(min(340px,calc(100vw - 24px),calc((100vh - 28px) * 9 / 19.5)) * 19.5 / 9)}}

/* 회의록 저장본 대조: 참석 명단·발언 줄 */
.gpDocument .gpDocRow{margin:6px 0;font-size:13px;line-height:1.5;text-align:left}.gpDocument .gpDocRow b{margin-right:4px}.gpDocument .gpDocRow~h4,.gpDocument h4:has(+.gpDocRow){font-size:15px}.gpDocument s{opacity:.75;text-decoration-thickness:1.5px}

.gpReplyDone{margin:6px 2px 0;font-size:13px;line-height:1.5;color:#9fe0b8}

/* 대화 상대(서연) 줄 고정: 메시지를 스크롤해도 위에 남는다 */
.glitchPhone .gpBody>.gpContacts{position:sticky;top:-16px;z-index:4;margin:-16px -14px 14px;padding:10px 14px 9px;background:#07140cf5;border-bottom:1px solid #1a3a28;box-shadow:0 6px 10px #0005}
@media(max-width:360px){.glitchPhone .gpBody>.gpContacts{top:-12px;margin:-12px -12px 12px;padding:9px 12px 8px}}
/* 모바일 키보드가 열리면 보이는 화면 높이에 맞춘다(입력창이 키보드에 가리지 않게) */
.glitchPhone.gpKeyboard{position:fixed;inset:auto 0 auto 0;top:calc(var(--gp-vvt,0px) + 6px);margin:0 auto;aspect-ratio:auto;width:min(340px,calc(100vw - 24px));height:calc(var(--gp-vvh,100dvh) - 12px);max-height:none;padding:8px 8px 10px;border-radius:24px}
.glitchPhone.gpKeyboard .gpCrtFoot{display:none}
