@font-face { font-family: 'Gowun Dodum'; src: url('../fonts/GowunDodum.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Serif KR'; src: url('../fonts/NotoSerifKR-SemiBold.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
:root { --serif: 'Noto Serif KR', 'Batang', 'AppleMyungjo', serif; --sans: 'Gowun Dodum', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --navy: #121733; --navy2: #1B2246; --deep: #0B0E22; --panel: rgba(14,18,44,.95); --panel2: rgba(14,18,44,.78);
  --go: #D8B46A; --go2: rgba(216,180,106,.38); --cr: #F6EBD3; --sub: #C7BFA9; --wine: #A8324A;
  --ink: #2c2415; --ink2: #6c5b3e; --gold: linear-gradient(180deg, #E8C884, #C99F4F); --paper: linear-gradient(180deg, #FDF4E0 0%, #F3E2BF 100%); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 14px/1.6 var(--sans); color: var(--cr); background: var(--navy); word-break: keep-all; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

#stage { height: 100%; height: 100dvh; position: relative; }
#device { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--navy); }
#app { position: absolute; inset: 0; overflow: auto; background: radial-gradient(1100px 760px at 50% 26%, #2A3366 0, var(--navy) 68%); scrollbar-color: var(--go2) transparent; }
#fader { position: absolute; inset: 0; background: #0b0806; opacity: 0; pointer-events: none; transition: opacity .32s; z-index: 60; }
#fader.on { opacity: 1; }
.toast { position: absolute; left: 50%; bottom: 74px; transform: translate(-50%, 12px); background: rgba(11,14,34,.94); border: 1px solid var(--go2); color: var(--cr); padding: 8px 15px; border-radius: 20px; font-size: 13px; opacity: 0; transition: .28s; pointer-events: none; z-index: 70; max-width: 88%; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.glass { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 입장 */
.entry { min-height: 100%; display: flex; padding: 18px; }
.ecard { position: relative; flex: none; width: min(560px, 100%); margin: auto; overflow: hidden; border: 2px solid var(--go); border-radius: 9999px 9999px 16px 16px; }
.ein { position: relative; margin: 14px; padding: 58px 34px 24px; border: 2px solid var(--deep); border-radius: 9999px 9999px 8px 8px; background: #10143A; text-align: center; }
.ein h1 { margin: 0; font: 600 28px/1.35 var(--serif); color: var(--go); }
.ein p.sub { margin: 3px 0 12px; font-size: 13px; color: #cfc6b0; }
.ein .pv { width: 110px; height: 130px; margin: 0 auto 12px; border-radius: 55px 55px 0 0; background: radial-gradient(circle at 50% 40%, #FFF0C9, #E2BC6C); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; }
.ein .pv img { width: 72px; image-rendering: pixelated; }
.ein label.f { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nickrow { display: flex; gap: 7px; margin-bottom: 11px; } .nickrow input { flex: 1; min-width: 0; }
.ein input[type=text] { padding: 9px 12px; border: 1px solid var(--go); border-radius: 8px; background: var(--navy2); color: var(--cr); font-size: 15.5px; }
.ein input[type=text]:focus { outline: 2px solid var(--go); outline-offset: 1px; }
.dice { flex: none; width: 44px; padding: 0; border: 1px solid var(--go); border-radius: 8px; background: none; color: var(--go); display: flex; align-items: center; justify-content: center; }
.dice:hover, .dice-c:hover { background: #2A3366; }
.pickc { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-bottom: 11px; }
.mgrid { display: flex; justify-content: center; gap: 3px; }
.mgrid button { width: 34px; height: 47px; padding: 2px; background: none; border: 1px solid transparent; border-radius: 6px; }
.mgrid button:hover { background: var(--navy2); } .mgrid button.on { border-color: var(--go); background: #2A3366; }
.mgrid img { width: 26px; image-rendering: pixelated; display: block; margin: auto; }
.dice-c { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 0; border-radius: 6px; background: none; color: var(--go); font-size: 12.5px; white-space: nowrap; }
.roll { animation: roll .42s ease; } @keyframes roll { 40% { transform: rotate(-22deg) scale(1.14); } 75% { transform: rotate(12deg); } }
.consent { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.55; color: #cfc6b0; text-align: left; margin-bottom: 13px; cursor: pointer; }
.consent input { accent-color: var(--go); margin-top: 3px; flex: none; }
.bigbtn { width: 100%; padding: 11px; font: 600 17px var(--serif); border: 0; border-radius: 9px; background: var(--gold); color: #2a1f08; }
.bigbtn:hover { filter: brightness(1.06); } .bigbtn:disabled { opacity: .45; cursor: default; }

/* 전체 틀: 위 머리글 + 가운데 내용 + 아래 메뉴 */
.nave { height: 100%; display: flex; flex-direction: column; }
.n-top { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px clamp(14px, 2.4vw, 34px) 6px; font-size: 13px; }
.n-r { justify-self: end; min-width: 0; }
.wm { text-align: center; min-width: 0; }
.wm b { display: block; font: 600 25px/1.2 var(--serif); letter-spacing: 1px; color: var(--go); white-space: nowrap; }
.wm small { display: block; font-size: 12px; color: #cfc6b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: #7fe0a6; }
.st b { font-weight: 400; }
.bgm { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--cr); }
.bgm .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.bgm button { background: none; border: 0; padding: 2px 3px; font-size: 11.5px; color: var(--go); line-height: 1; flex: none; }
.n-view { flex: 1; min-height: 0; overflow: auto; position: relative; scrollbar-color: var(--go2) transparent; }
.dock { flex: none; display: flex; justify-content: center; align-items: center; min-height: 58px; padding-bottom: env(safe-area-inset-bottom); background: var(--deep); border-top: 1px solid var(--go); }
.dock button { position: relative; height: 32px; padding: 0 21px; background: none; border: 0; border-left: 1px solid var(--go2); color: #E6DCC4; font-size: 15px; white-space: nowrap; }
.dock button:first-child { border-left: 0; }
.dock button:hover { color: #fff; } .dock button.on { color: var(--go); font-weight: 700; }
.has-new::after { content: ""; position: absolute; top: 2px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4f; }

/* 홈: 아치 창 세 개 */
.wins { height: 100%; min-height: 420px; display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 1.5vw, 22px); padding: 0 clamp(10px, 1.6vw, 24px); }
.arch { position: relative; overflow: hidden; min-width: 0; border: 2px solid var(--go); border-bottom: 0; border-radius: 9999px 9999px 0 0; }
.ac { flex: 0 1 auto; height: 100%; aspect-ratio: 1.04; max-width: 1120px; }
.lan { flex: none; width: clamp(224px, 19vw, 300px); height: 71%; }
.in { container-type: inline-size; position: absolute; left: 14px; right: 14px; top: 14px; bottom: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--deep); border-bottom: 0; border-radius: 9999px 9999px 0 0; background: var(--paper); color: var(--ink); }
.in h2 { margin: clamp(26px, 6.5%, 60px) 0 0; font: 600 24px/1.3 var(--serif); color: #3a2c14; }
.in .sm { font-size: 13px; color: var(--ink2); }
.rtabs { flex: none; display: flex; gap: 5px; margin-top: 8px; max-width: 100%; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.rtabs::-webkit-scrollbar, .r-rooms::-webkit-scrollbar, .r-bot::-webkit-scrollbar { display: none; }
.rtabs button { flex: none; padding: 2px 11px; border: 1px solid #b9a578; border-radius: 13px; background: none; color: #51442b; font-size: 13px; white-space: nowrap; }
.rtabs button:first-child { margin-left: auto; } .rtabs button:last-child { margin-right: auto; }
.rtabs button:hover { background: rgba(58,44,20,.08); } .rtabs button.on { background: #3a2c14; border-color: #3a2c14; color: #FBEBC8; }
.rtabs b, .r-rooms b { font-weight: 400; margin-left: 4px; color: var(--wine); } .rtabs b:empty, .r-rooms b:empty { display: none; } .rtabs .on b, .r-rooms .on b { color: var(--go); }
.in.night { background: linear-gradient(180deg, #2c2f40, #1b1d2a); color: var(--cr); } .in.night h2 { color: var(--go); } .in.night .sm { color: var(--sub); }
.in.night .rtabs button { color: var(--cr); border-color: var(--go2); } .in.night .rtabs button.on { background: var(--go); border-color: var(--go); color: #201808; } .in.night .rtabs .on b { color: var(--wine); }
#roomSlot { flex: 1; min-height: 0; width: 100%; position: relative; margin-top: 4px; }
.pn { position: absolute; left: 12px; right: 12px; top: clamp(84px, 24%, 136px); bottom: 0; display: flex; flex-direction: column; padding: 14px 16px; overflow: auto; background: var(--panel); border: 2px solid var(--deep); border-top: 2px solid var(--go); border-bottom: 0; scrollbar-width: thin; scrollbar-color: var(--go2) transparent; }
.lab { flex: none; font: 600 13px var(--serif); letter-spacing: .5px; color: var(--go); margin-bottom: 6px; }
.vs { font: 600 clamp(16px, 1.4vw, 20px)/1.65 var(--serif); }
.ref { flex: none; font-size: 12.5px; color: var(--sub); margin: 6px 0 0; }
.pn hr { flex: none; width: 100%; border: 0; border-top: 1px solid var(--go2); margin: 13px 0; }
.nt { position: relative; display: block; width: 100%; padding: 0; background: none; border: 0; color: inherit; text-align: left; font-size: 13.5px; }
.nt small { display: block; color: var(--sub); font-size: 12px; } .nt:hover span { text-decoration: underline; }
.rows { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.rows li { padding: 5px 0; border-bottom: 1px solid rgba(216,180,106,.2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.rows em { font-style: normal; color: var(--go); font-size: 12px; display: block; }
.cta { display: block; flex: none; width: 100%; margin-top: auto; padding: 11px 8px; border: 0; border-radius: 9px; background: var(--gold); color: #2a1f08; text-align: center; font: 600 16px var(--serif); }
.cta span { display: block; font: 12px var(--sans); } .cta:hover { filter: brightness(1.06); }
.pn .rows + .cta { margin-top: auto; } .pn .rows { margin-bottom: 13px; }
.sect { padding: 14px 16px 20px; } .sect .cta { margin: 0 0 14px; } .sect .vs { font-size: 17px; }

/* 3D 방 */
.room3d { position: absolute; inset: 0; overflow: hidden; user-select: none; }
.r-canvas { position: absolute; inset: 0; touch-action: none; } .r-canvas canvas { display: block; width: 100%; height: 100%; }
.r-ov { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nm, .bub, .sign { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; }
.nm { padding: 0 6px; border: 1px solid #c7ad74; border-radius: 4px; background: #fff8e8; color: #3b3b40; font-size: 11px; line-height: 1.35; }
.nm.me { background: var(--wine); border-color: var(--wine); color: #fff; }
.bub { font-size: 15px; background: #fff; border-radius: 10px; padding: 1px 6px; box-shadow: 0 1px 3px rgba(0,0,0,.25); line-height: 1.4; }
.sign { pointer-events: auto; padding: 1px 7px; border: 0; border-radius: 4px; background: var(--navy2); color: var(--go); font-size: 11px; line-height: 1.5; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.sign:hover { background: var(--wine); color: #fff; }
.r-tl, .r-rooms { display: none; }
.r-tr { position: absolute; right: 12px; bottom: calc(52px + var(--p-h, 0px)); display: flex; gap: 3px; }
.piano-on .r-tr { bottom: calc(8px + var(--p-h, 0px)); }
.r-tr button { height: 26px; min-width: 28px; padding: 0 7px; border: 1px solid #c7ad74; border-radius: 6px; background: #fff8e8; color: #51442b; font-size: 12px; }
.r-tr button:hover { background: #fff; } .r-tr button.on { background: var(--navy2); border-color: var(--navy2); color: var(--go); }
.r-bot { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 0 10px; pointer-events: none; }
.r-bot button { pointer-events: auto; padding: 6px 14px; border: 1px solid var(--go); border-radius: 17px; background: var(--navy2); color: var(--cr); font-size: 13.5px; line-height: 1.4; white-space: nowrap; }
.r-bot button:hover { background: #2A3366; } .r-bot button.on { background: var(--go); color: #201808; }
/* 창이 좁으면 동작 단추를 두 줄로 쌓지 않고 옆으로 밀어 본다 (돌려 보기 단추와 겹치지 않게) */
@container (max-width: 600px) { .r-bot { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; pointer-events: auto; } .r-bot button { flex: none; } .r-bot button:first-child { margin-left: auto; } .r-bot button:last-child { margin-right: auto; } }
.r-feed { position: absolute; left: 14px; bottom: 54px; max-width: calc(50% - 40px); font-size: 12px; color: var(--ink2); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in.night .r-feed { color: var(--sub); }
.piano-on .r-feed { display: none; }
#hall { position: absolute; inset: 0; z-index: 20; background: var(--paper); } #hall.night { background: linear-gradient(180deg, #2c2f40, #1b1d2a); }
#hall .r-tl { display: block; position: absolute; left: 10px; top: 9px; padding: 2px 12px; border-radius: 13px; background: var(--navy2); color: var(--go); font: 600 13px var(--serif); pointer-events: none; }
#hall .r-tl b { font-weight: 400; color: var(--cr); }
#hall .r-rooms { display: flex; position: absolute; left: 0; right: 0; top: 40px; gap: 4px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.r-rooms button { flex: none; padding: 3px 11px; border: 1px solid var(--go); border-radius: 13px; background: var(--navy2); color: var(--cr); font-size: 12.5px; }
.r-rooms button.on { background: var(--go); color: #201808; }
#hall .r-tr { bottom: auto; top: 9px; }
#hall .r-feed { left: 14px; bottom: 14px; }

/* 피아노 */
.piano { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 6px 8px 8px; background: var(--deep); border-top: 1px solid var(--go); box-shadow: 0 -3px 12px rgba(0,0,0,.28); -webkit-user-select: none; -webkit-touch-callout: none; }
.room3d.piano-on .r-bot { display: none; }
.p-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--cr); font-size: 13px; white-space: nowrap; }
.p-head button { min-height: 32px; min-width: 32px; padding: 0 9px; background: rgba(216,180,106,.12); border: 1px solid var(--go2); border-radius: 8px; color: var(--cr); font-size: 13px; }
.p-head button:hover { background: rgba(216,180,106,.24); } .p-head button.on { background: var(--go); border-color: var(--go); color: #201808; }
.p-oct { display: inline-flex; align-items: center; gap: 5px; } .p-oct b { font-weight: 400; min-width: 42px; text-align: center; }
#pX { margin-left: auto; }
.p-keys { position: relative; display: flex; height: clamp(96px, 24vh, 150px); touch-action: none; }
.k { padding: 0; border: 0; touch-action: none; -webkit-tap-highlight-color: transparent; }
.k.w { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding-bottom: 6px; background: linear-gradient(#f4efe5, #fffdf8); border: 1px solid #b9ad9c; border-radius: 0 0 6px 6px; color: #7d6a55; font-size: 11.5px; }
.k.b { position: absolute; top: 0; z-index: 1; width: calc(100% / var(--n) * .62); height: 60%; transform: translateX(-50%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; background: linear-gradient(#3a3333, #171414); border-radius: 0 0 4px 4px; }
.k.w.on { background: var(--go); } .k.b.on { background: #c98a3a; }
.k small { font-size: 9.5px; line-height: 1; color: #a89a86; } .k.b small { color: #c9bdac; }
#device.m .k small, #device.m .p-t span { display: none; } #device.m .k.w { font-size: 13px; }
#device.m .piano { padding: 6px 4px; }
/* 휴대폰에서 칠 때는 좁은 3D 위에 글이 겹치지 않게 소식과 문 표지판을 숨기고, 방 이름도 줄여 3D 자리를 넓힌다 */
#device.m .room3d.piano-on .sign, #device.m .room3d.piano-on .r-tr { display: none !important; }
#device.m .in:has(.piano-on) .sm, #device.m .in:has(.piano-on) .rtabs { display: none; }
@media (max-height: 480px) { #device.m .room3d.piano-on .r-ov { display: none; } }

/* 메뉴별 내용 */
.pg { width: min(960px, 100%); margin: 0 auto; padding: 8px 18px 30px; }
.sech { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; } .sech:first-child { margin-top: 2px; }
.sech h3 { margin: 0; font: 600 16px var(--serif); color: var(--go); }
.card { background: var(--panel2); border: 1px solid var(--go2); border-radius: 10px; padding: 14px 16px; margin-bottom: 11px; }
.btn { padding: 6px 13px; border: 1px solid var(--go2); border-radius: 8px; background: none; color: var(--cr); font-size: 13px; }
.btn:hover { border-color: var(--go); color: #fff; } .btn.pri { background: var(--gold); border: 0; color: #2a1f08; } .btn.dark { background: var(--navy2); border-color: var(--go); color: var(--go); }
.hint { font-size: 12px; color: #bfb7a2; margin-top: 7px; }
a { color: var(--go); }
textarea.note { display: block; width: 100%; min-height: 98px; padding: 8px 10px; border: 1px solid var(--go2); border-radius: 7px; background: var(--navy2); color: var(--cr); font-size: 14px; resize: vertical; }
textarea.note::placeholder { color: #a9a48f; } textarea.note:focus { outline: 2px solid var(--go); outline-offset: 1px; }
.nav2 { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button { padding: 1px 9px; border: 1px solid var(--go2); border-radius: 12px; background: none; color: var(--cr); font-size: 13px; } .chips button.on { background: var(--go); border-color: var(--go); color: #201808; }
.av { width: 30px; height: 45px; image-rendering: pixelated; flex: none; }
/* 둘러보기 */
.tour { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rc { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: var(--panel2); border: 1px solid var(--go); border-radius: 9999px 9999px 10px 10px; color: inherit; text-align: left; }
.rc:hover { border-color: #F1D9A0; box-shadow: 0 0 18px rgba(216,180,106,.3); }
.rc img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; display: block; background: #F3E2BF; }
.rc .b { padding: 8px 12px 11px; } .rc h4 { margin: 0; font: 600 15px var(--serif); color: var(--go); display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.rc h4 b { color: var(--cr); font: 400 12.5px var(--sans); flex: none; } .rc p { margin: 3px 0 0; font-size: 12.5px; color: var(--sub); line-height: 1.5; }
.rc .fl-no { font-size: 11.5px; color: var(--sub); }
.pill1p { margin-left: 5px; padding: 0 5px; border-radius: 4px; background: var(--wine); color: #fff; font: 400 10.5px var(--sans); vertical-align: 1px; }
/* 말씀 */
.narrow { width: min(720px, 100%); margin: 0 auto; }
.wordc { background: var(--panel2); border: 1px solid var(--go); border-radius: 9999px 9999px 10px 10px; padding: clamp(46px, 8vw, 74px) clamp(18px, 6vw, 70px) 22px; text-align: center; }
.vbig { font: 600 clamp(19px, 2.4vw, 26px)/1.7 var(--serif); margin: 4px 0; } .vref { color: var(--sub); font-size: 13px; }
/* 기도 제목 */
.bwrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.bcol { background: var(--panel2); border: 1px solid var(--go); border-radius: 150px 150px 10px 10px; padding: 66px 22px 18px; }
.bcol h2 { margin: 0 0 9px; text-align: center; font: 600 22px var(--serif); color: var(--go); }
.bcol .btn.pri { display: block; width: 100%; margin-top: 12px; padding: 11px 8px; font: 600 16px var(--serif); border-radius: 9px; }
#bList { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prow { display: flex; gap: 12px; padding: 9px 14px; background: var(--panel2); border: 1px solid var(--go2); border-radius: 9px; }
.fl { flex: none; width: 12px; height: 18px; margin-top: 4px; border-radius: 50% 50% 45% 45%; background: radial-gradient(ellipse at 50% 70%, #FFE9A8 0, #FFB347 55%, transparent 75%); }
.prow .txt { flex: 1; min-width: 0; } .prow .txt b { display: block; color: var(--go); font-weight: 400; font-size: 12px; } .prow .txt p { margin: 1px 0 3px; font-size: 15px; overflow-wrap: anywhere; }
.prow .who { font-size: 12px; color: #bfb7a2; }
.pa { flex: none; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; }
.amen { padding: 3px 10px; border: 1px solid var(--go2); border-radius: 13px; background: none; color: var(--cr); font-size: 12.5px; white-space: nowrap; } .amen:hover { border-color: var(--go); } .amen.on { background: var(--go); border-color: var(--go); color: #201808; }
/* 찬양·교우·공지·더 보기 */
.trow, .frow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 8px; background: var(--panel2); border: 1px solid var(--go2); border-radius: 9px; }
.trow .pl { flex: none; width: 36px; height: 36px; border: 1px solid var(--go); border-radius: 50%; background: none; color: var(--go); font-size: 12px; } .trow.on .pl { background: var(--go); color: #201808; }
.trow .n, .frow .n { flex: 1; min-width: 0; font-size: 15px; } .trow .n small, .frow .n small { display: block; color: var(--sub); font-size: 12.5px; }
.frow .btn { flex: none; padding: 5px 10px; }
.notice { padding: 14px 16px; margin-bottom: 8px; background: var(--panel2); border: 1px solid var(--go2); border-radius: 9px; }
.n-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--sub); }
.n-type { padding: 0 8px; border: 1px solid var(--go2); border-radius: 9px; color: var(--go); line-height: 19px; } .n-type.up { background: var(--go); border-color: var(--go); color: #201808; }
.notice h4 { margin: 7px 0 4px; font: 600 17px/1.45 var(--serif); color: var(--cr); }
.notice p { margin: 0 0 6px; font-size: 14px; white-space: pre-line; }
.notice ul { margin: 0; padding-left: 18px; font-size: 14px; } .notice li { margin-top: 3px; }
.more-list button { position: relative; display: block; width: 100%; padding: 13px 16px; margin-bottom: 8px; background: var(--panel2); border: 1px solid var(--go2); border-radius: 9px; color: var(--cr); text-align: left; font-size: 15px; }
.more-list small { display: block; color: var(--sub); font-size: 12.5px; }
.more-list .has-new::after { top: 12px; right: 12px; }

/* 창이 조금 좁으면(태블릿 가로·작은 노트북) 옆 창은 아래로 내려 글이 눌리지 않게 한다 */
@media (max-width: 1120px) {
  .wins { height: auto; flex-wrap: wrap; align-items: stretch; }
  .ac { flex: none; order: -1; width: min(100%, 860px); aspect-ratio: auto; height: max(400px, calc(100dvh - 150px)); }
  .lan { width: calc(50% - 16px); max-width: 420px; height: 420px; }
}

/* 휴대폰 */
#device.m .n-top { padding: 8px 12px 6px; font-size: 12px; }
#device.m .wm b { font-size: 18px; letter-spacing: .5px; } #device.m .wm small { display: none; }
#device.m .stt, #device.m .st-w { display: none; } #device.m .st { font-size: 12px; min-height: 24px; }
#device.m .bgm .t, #device.m #bgmP { display: none; } #device.m .bgm button { font-size: 13px; padding: 5px; }
#device.m .dock { min-height: 50px; } #device.m .dock button { flex: 1 1 0; min-width: 0; height: 40px; padding: 0; font-size: 14px; }
#device.m .has-new::after { top: 6px; right: calc(50% - 26px); } #device.m .more-list .has-new::after { top: 12px; right: 12px; }
#device.m .n-view { scrollbar-width: none; }
#device.m .wins { display: block; height: auto; min-height: 0; padding: 0 4px; }
#device.m .ac { width: 100%; aspect-ratio: auto; max-width: 620px; margin: 0 auto; height: clamp(340px, calc(100dvh - 178px), 640px); }
#device.m .in { left: 6px; right: 6px; top: 6px; }
#device.m .in h2 { font-size: 19px; margin-top: clamp(22px, 7%, 40px); } #device.m .in .sm { font-size: 12px; line-height: 1.3; } #device.m .rtabs { margin-top: 5px; padding: 0 12px; }
#device.m .rtabs button { padding: 3px 10px; font-size: 13px; }
#device.m .r-canvas { bottom: 49px; }
#device.m .r-bot { bottom: 0; flex-wrap: nowrap; justify-content: flex-start; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; background: var(--deep); pointer-events: auto; }
#device.m .r-bot button { flex: none; padding: 5px 12px; font-size: 13px; }
#device.m .r-bot button:first-child { margin-left: auto; } #device.m .r-bot button:last-child { margin-right: auto; }
#device.m .r-tr { right: 8px; bottom: 57px; } #device.m .r-tr button { height: 30px; min-width: 32px; } #device.m [data-c="big"] { display: none; }
#device.m .r-feed { left: 9px; bottom: 90px; max-width: calc(100% - 18px); }
#device.m .room3d.piano-on .r-canvas { bottom: auto; }
#device.m .nm { font-size: 10.5px; padding: 0 4px; } #device.m .sign { font-size: 10.5px; padding: 0 5px; }
#device.m .pg { padding: 4px 12px 22px; }
#device.m .tour { grid-template-columns: 1fr 1fr; gap: 10px; } #device.m .rc p { display: none; }
#device.m .bwrap { display: block; } #device.m .bcol { border-radius: 120px 120px 10px 10px; padding: 46px 18px 14px; margin-bottom: 12px; }
#device.m .prow { flex-wrap: wrap; } #device.m .pa { flex: 1 0 100%; flex-direction: row; padding-left: 24px; }
#device.m .frow { flex-wrap: wrap; } #device.m .trow { flex-wrap: wrap; } #device.m .trow .btn { margin-left: 46px; }
#device.m .ecard { width: 100%; }
#device.m .entry { padding: 10px; } #device.m .ein { margin: 8px; padding: 42px 14px 14px; } #device.m .ein h1 { font-size: 24px; }
#device.m .ein p.sub { font-size: 12.5px; margin-bottom: 8px; } #device.m .ein .pv { width: 84px; height: 100px; margin-bottom: 9px; border-radius: 42px 42px 0 0; } #device.m .ein .pv img { width: 58px; }
#device.m .mgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; width: 100%; } #device.m .mgrid button { width: auto; height: 44px; }
#device.m .consent { margin-bottom: 10px; font-size: 11.5px; } #device.m .dice-c { padding: 6px 10px; }
/* 휴대폰 입력칸을 누를 때 화면이 확대되지 않게 */
#device.m input[type=text], #device.m textarea { font-size: 16px; }

/* 세로가 낮은 화면(휴대폰 가로): 둥근 머리를 줄이고 방을 먼저 보여 준다 */
@media (max-height: 520px) {
  .n-top { padding-top: 5px; padding-bottom: 3px; } .wm b { font-size: 16px; } .wm small { display: none; }
  .dock, #device.m .dock { min-height: 40px; } .dock button { height: 28px; }
  .wins { min-height: 0; }
  .arch.ac { border-radius: 70px 70px 0 0; height: max(260px, calc(100dvh - 80px)); } #device.m .ac { border-radius: 70px 70px 0 0; height: max(260px, calc(100dvh - 86px)); }
  .in, #device.m .in { border-radius: 60px 60px 0 0; } .in h2, #device.m .in h2, .in .sm { display: none; }
  .rtabs, #device.m .rtabs { margin-top: 16px; padding: 0 24px; }
}

/* 1인칭 기도방 */
#fp { position: absolute; inset: 0; z-index: 40; background: #0b0806; color: #fff4df; overflow: hidden; font-family: var(--sans); }
#fpHost { position: absolute; inset: 0; touch-action: none; cursor: grab; } #fpHost canvas { display: block; width: 100%; height: 100%; } #fpHost.drag { cursor: grabbing; }
.fp-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 34%, rgba(4,2,1,.96) 100%); opacity: var(--vig, .15); }
.fp-bar { position: absolute; left: 0; right: 0; height: 9%; background: #060403; transition: transform 1.8s cubic-bezier(.4,0,.2,1); pointer-events: none; }
.fp-bar.t { top: 0; transform: translateY(-100%); } .fp-bar.b { bottom: 0; transform: translateY(100%); }
#fp.letter .fp-bar { transform: none; }
.fp-black { position: absolute; inset: 0; background: #070504; pointer-events: none; opacity: 0; transition: opacity 1.1s; }
.fp-black.on { opacity: 1; }
.fp-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; opacity: 0; transition: opacity 1s; }
.fp-intro.on { opacity: 1; } .fp-intro h2 { margin: 0; font: 600 26px var(--serif); letter-spacing: 3px; color: #ffeccd; } .fp-intro p { margin: 8px 0 0; font-size: 13.5px; opacity: .8; }
.fp-top { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; align-items: center; gap: 9px; transition: opacity .6s; }
.fp-top button { background: rgba(20,13,9,.55); border: 1px solid rgba(255,235,205,.28); color: #ffeed4; border-radius: 16px; padding: 5px 13px; font-size: 12.5px; backdrop-filter: blur(4px); }
.fp-top .ttl { font: 600 14px var(--serif); text-shadow: 0 1px 4px #000; } .fp-top .ttl small { font: 12px var(--sans); opacity: .85; margin-left: 7px; }
.fp-hint { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); font-size: 12px; background: rgba(20,13,9,.5); border-radius: 13px; padding: 3px 13px; white-space: nowrap; opacity: .92; transition: opacity 1s; pointer-events: none; }
.fp-ready { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(660px, calc(100% - 24px)); background: rgba(22,14,10,.72); border: 1px solid rgba(255,225,180,.2); border-radius: 14px; padding: 13px 15px 14px; backdrop-filter: blur(8px); transition: opacity .6s, transform .6s; }
.fp-ready.off, .fp-done.off { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(14px); }
.fp-l { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; } .fp-l > label { flex: none; width: 86px; font-size: 12px; color: #e9d5b5; white-space: nowrap; }
.fp-chips { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; flex: 1; }
.fp-chips button { background: rgba(255,240,215,.1); border: 1px solid rgba(255,230,195,.26); color: #ffeed4; border-radius: 14px; padding: 4px 12px; font-size: 12.5px; white-space: nowrap; }
.fp-chips button.on { background: #ffd58f; border-color: #ffd58f; color: #3b2715; font-weight: 700; }
.fp-chips .pv { background: none; border-style: dashed; font-size: 11.5px; padding: 4px 9px; }
.fp-l input { flex: 1; min-width: 0; background: rgba(255,240,215,.08); border: 1px solid rgba(255,230,195,.24); border-radius: 8px; color: #fff4df; padding: 6px 10px; font-size: 13px; } .fp-l input::placeholder { color: rgba(255,235,205,.5); }
.fp-go { width: 100%; padding: 12px; margin-top: 2px; border: 0; border-radius: 10px; background: linear-gradient(180deg, #ffd88f, #f2b65c); color: #3b2613; font: 600 16px var(--serif); box-shadow: 0 0 22px rgba(255,190,100,.35); }
.fp-go:hover { filter: brightness(1.06); } .fp-go.pulse { animation: pulse 1s 2; } @keyframes pulse { 50% { box-shadow: 0 0 40px rgba(255,200,120,.95); } }
.fp-verse { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: max-content; max-width: min(620px, 86%); text-align: center; font-size: 17px; line-height: 1.75; color: #fff3dc; background: rgba(14,8,4,.48); border-radius: 14px; padding: 11px 22px; text-shadow: 0 1px 4px #000; opacity: 0; transition: opacity 2.2s; pointer-events: none; }
.fp-verse.on { opacity: 1; } .fp-verse small { display: block; font-size: 12.5px; opacity: .8; margin-top: 3px; }
.fp-my { position: absolute; left: 50%; bottom: calc(9% + 68px); transform: translateX(-50%); width: max-content; max-width: 84%; text-align: center; font-size: 13.5px; color: #ffe7c0; background: rgba(14,8,4,.42); border-radius: 12px; padding: 5px 14px; opacity: 0; transition: opacity 2s; pointer-events: none; } .fp-my.on { opacity: .95; }
.fp-soon { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); font-size: 14px; color: #ffefd2; background: rgba(14,8,4,.5); border-radius: 14px; padding: 6px 16px; opacity: 0; transition: opacity 2.5s; pointer-events: none; white-space: nowrap; } .fp-soon.on { opacity: 1; }
.fp-hud { position: absolute; left: 50%; bottom: calc(9% + 12px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(15,9,6,.55); border: 1px solid rgba(255,225,180,.16); border-radius: 26px; padding: 6px 15px 6px 7px; backdrop-filter: blur(6px); transition: opacity .8s; white-space: nowrap; }
.fp-hud.idle { opacity: .13; } .fp-hud.off { opacity: 0; pointer-events: none; }
.ring { position: relative; width: 42px; height: 42px; flex: none; } .ring svg { transform: rotate(-90deg); display: block; } .ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: rgba(255,235,205,.2); } .ring .fg { stroke: #ffd58f; stroke-linecap: round; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.fp-hud button { background: none; border: 0; color: #ffeed4; font-size: 12.5px; padding: 4px 7px; border-radius: 8px; } .fp-hud button:hover { background: rgba(255,240,215,.12); } .fp-hud button.on { color: #ffd58f; }
.fp-hud input[type=range] { width: 74px; accent-color: #ffd58f; }
.fp-done { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 28px)); background: rgba(255,250,240,.93); color: #3f3225; border-radius: 16px; padding: 22px 22px 18px; text-align: center; box-shadow: 0 10px 44px rgba(90,60,20,.35); transition: opacity 1.4s, transform 1.4s; }
.fp-done.off { transform: translate(-50%, -44%); }
.fp-done h2 { margin: 0; font: 600 20px var(--serif); color: #6a4631; } .fp-done .v { margin: 9px 0 3px; font-size: 13.5px; line-height: 1.7; color: #55493a; } .fp-done .v small { display: block; color: #8d8170; font-size: 12px; }
.fp-done .stat { margin: 11px 0 13px; font-size: 12.5px; color: #84715a; background: #f6ecdb; border-radius: 8px; padding: 6px; }
.fp-done .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .fp-done .acts button { border: 1px solid #dcc9ab; background: #fff; color: #5b4631; border-radius: 9px; padding: 9px 4px; font-size: 13px; } .fp-done .acts .full { grid-column: 1 / 3; background: #6a4631; border-color: #6a4631; color: #fff4df; }
.fp-stick { position: absolute; left: 22px; bottom: 300px; width: 92px; height: 92px; border-radius: 50%; background: rgba(255,240,215,.12); border: 1px solid rgba(255,235,205,.32); touch-action: none; display: none; }
.fp-stick i { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px; border-radius: 50%; background: rgba(255,225,170,.92); box-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.fp-stick span { position: absolute; left: 0; right: 0; top: -21px; text-align: center; font-size: 12px; color: #ffeed4; text-shadow: 0 1px 3px #000; pointer-events: none; }
#device.m .fp-stick { display: block; background: rgba(255,240,215,.2); border: 2px solid rgba(255,235,205,.75); box-shadow: 0 0 14px rgba(0,0,0,.45); } #fp.busy .fp-stick { display: none !important; }
#device.m .fp-ready { padding: 11px 11px 12px; bottom: 10px; } #device.m .fp-l { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 8px; } #device.m .fp-l > label { width: auto; }
#device.m .fp-verse { font-size: 15px; top: 14%; } #device.m .fp-hint { font-size: 11px; white-space: normal; width: 86%; text-align: center; }
#device.m .fp-hud input[type=range] { display: none; }
.fp-optbtn { display: none; width: 100%; background: none; border: 0; color: #e9d5b5; font-size: 12.5px; text-align: left; padding: 0 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#device.m .fp-optbtn { display: block; }
#device.m .fp-opt { display: none; }
#device.m #fp.opts .fp-opt { display: flex; }

.err3d { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; color: var(--cr); font-size: 13px; }
#diag { position: absolute; left: 10px; right: 10px; top: 56px; max-width: 520px; margin: auto; z-index: 80; padding: 14px 16px; border: 1px solid var(--go); border-radius: 12px; background: var(--navy2); color: var(--cr); box-shadow: 0 8px 34px rgba(0,0,0,.5); font-size: 12.5px; }
#diag h4 { margin: 0 0 6px; font: 600 15px var(--serif); color: var(--go); } #diag p { margin: 0 0 8px; word-break: break-all; } #diag ul { margin: 0 0 10px; padding: 0 0 0 16px; max-height: 40vh; overflow: auto; }
