:root {
  /* 오로라: 깊은 청록 밤하늘, 강조는 민트 → 보라 */
  --void: #03090c;
  --deep: #0a171c;
  --panel: #0f2228;
  --line: #21434a;
  --ink: #e6f6f2;
  --dim: #8db2ac;
  --god: #5ff0bf;
  --violet: #8a7dff;
  --aur: linear-gradient(90deg, #57f2b8, #8a7dff);
  --good: #7fe3d0;
  --bad: #ef7d6d;
  --display: 'Hahmlet', 'Nanum Myeongjo', 'AppleMyungjo', serif;
  --body: 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; touch-action: manipulation; overscroll-behavior: none; }
body { background: var(--void); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; overflow: hidden; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: default; opacity: .35; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--god); outline-offset: 2px; }
em { font-style: normal; color: var(--god); }

#app { height: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding: 0 12px calc(8px + env(safe-area-inset-bottom)); background: radial-gradient(120% 60% at 50% 18%, #0a2a2e 0%, var(--void) 70%); }

/* 위 */
#top { display: flex; align-items: center; gap: 8px; padding: 10px 2px 6px; flex: none; }
.ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ttl small { color: var(--dim); font-size: 11.5px; letter-spacing: .06em; }
.ttl b { font-family: var(--display); font-size: 19px; }
.hbtn { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; white-space: nowrap; background: var(--deep); }
.hbtn em { margin-left: 2px; }

/* 행성 상태: 칩과 생명의 사다리 */
#goal { flex: none; display: grid; gap: 5px; padding: 2px 0 6px; }
.chips { display: flex; gap: 4px; }
.chip { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; }
.chip i { font-style: normal; font-size: 12px; font-family: var(--emoji); opacity: .9; }
.chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.good { border-color: rgba(111, 214, 192, .55); } .chip.good b { color: var(--good); }
.chip.warn { border-color: rgba(233, 196, 106, .55); } .chip.warn b { color: #e9c46a; }
.chip.bad { border-color: rgba(239, 125, 109, .55); } .chip.bad b { color: var(--bad); }
.liferow { display: flex; align-items: center; gap: 6px; }
.liferow > small { color: var(--good); font-size: 11.5px; font-weight: 600; flex: none; }
.liferow .rail { flex: 1; min-width: 0; }
.simb { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(111, 214, 192, .1); border: 1px solid rgba(111, 214, 192, .45); color: var(--good); font-variant-numeric: tabular-nums; }
.rail { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.rail li { position: relative; flex: 1; display: grid; place-items: center; height: 24px; }
.rail li::before { content: ''; position: absolute; left: -50%; right: 50%; top: 50%; height: 2px; background: var(--line); z-index: 0; }
.rail li:first-child::before { display: none; }
.rail li.on::before { background: var(--good); }
.ri { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; line-height: 1; background: var(--deep); border: 1.5px solid var(--line); color: var(--line); font-family: var(--emoji); }
.rail li.on .ri { border-color: var(--good); background: #183a38; box-shadow: 0 0 8px rgba(111, 214, 192, .5); }
.rail li.now .ri { border-color: var(--good); animation: nowp 1.6s ease-in-out infinite; }
.rail li:not(.on) .ri { filter: grayscale(.8) brightness(.7); }
@keyframes nowp { 50% { box-shadow: 0 0 0 5px rgba(111, 214, 192, .18); } }
.ttl .of { font-size: 13px; color: var(--dim); font-family: var(--body); }
.ttl .bar { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--line); margin-top: 3px; max-width: 150px; overflow: hidden; }
.ttl .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--god), #fff0c8); }
.hbtn.round { padding: 6px 9px; }

/* 작업판 */
#board { position: relative; flex: 1 1 260px; min-height: 200px; border-radius: 22px; overflow: hidden; border: 1px solid rgba(110, 220, 210, .22); background: radial-gradient(90% 70% at 50% 45%, var(--era1, #2a2266) 0%, var(--era2, #120f2c) 62%, #0a0918 100%) center / cover; box-shadow: inset 0 0 50px rgba(0, 0, 0, .6); transition: --era1 1s; touch-action: none; }
#board[data-era="0"] { --era1: #2d2470; --era2: #130f30; }
#board[data-era="1"] { --era1: #4a3570; --era2: #1a1232; }
#board[data-era="2"] { --era1: #4b2a5a; --era2: #1a0f26; }
#board[data-era="3"] { --era1: #5a2a22; --era2: #1e0f14; }
#board[data-era="4"], #board[data-era="5"] { --era1: #1f3f6e; --era2: #0d1530; }
#board[data-era="6"], #board[data-era="7"] { --era1: #1d4f66; --era2: #0b1a2a; }
#board[data-era="8"], #board[data-era="9"] { --era1: #24503e; --era2: #0c1a1a; }
#board[data-era="10"], #board[data-era="11"], #board[data-era="12"] { --era1: #2a2f5e; --era2: #0b0d22; }
#board .sky { position: absolute; inset: -50%; background-image: radial-gradient(1.2px 1.2px at 20% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 70% 60%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 40% 80%, #fff 50%, transparent), radial-gradient(1px 1px at 85% 20%, #fff 50%, transparent), radial-gradient(1px 1px at 10% 70%, #fff 50%, transparent); background-size: 160px 160px; opacity: .5; animation: skyd 80s linear infinite; pointer-events: none; }
@keyframes skyd { to { transform: translate(160px, 80px); } }
#board .bg { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#board .bg .wsvg { width: 100%; height: 100%; max-height: none; }
#board .orbs { position: absolute; inset: 0; }
#board .empty { position: absolute; left: 0; right: 0; bottom: 14%; margin: 0; text-align: center; color: var(--dim); font-size: 13.5px; pointer-events: none; animation: tw 2.6s ease-in-out infinite; }
#board .empty[hidden] { display: none; }
#board .msg { position: absolute; z-index: 9; left: 50%; top: 8px; transform: translate(-50%, -8px); margin: 0; max-width: 92%; padding: 5px 14px; border-radius: 999px; background: rgba(3, 12, 15, .82); border: 1px solid var(--line); font-size: 13px; text-align: center; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#board .msg.show { opacity: 1; transform: translate(-50%, 0); }
#board .msg.bad { color: var(--bad); border-color: rgba(239, 125, 109, .5); } #board .msg.old { color: var(--good); }
.clear { position: absolute; z-index: 8; right: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--dim); background: rgba(3, 12, 15, .7); border: 1px solid var(--line); }

/* 구슬: 모든 항목은 분류 색으로 빛나는 구슬이다 (그림 에셋이 오면 안에 들어간다) */
.orb { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; touch-action: none; z-index: 2; transition: left .26s cubic-bezier(.5, 0, .8, .4), top .26s cubic-bezier(.5, 0, .8, .4); }
.core { position: relative; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cc) 55%, #fff) 0%, color-mix(in srgb, var(--cc) 45%, #0f2228) 38%, #0a171c 78%); border: 1.5px solid color-mix(in srgb, var(--cc) 70%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--cc) 45%, transparent), inset 0 -4px 10px rgba(0, 0, 0, .45); }
.core::after { content: ''; position: absolute; left: 22%; top: 12%; width: 30%; height: 18%; border-radius: 50%; background: rgba(255, 255, 255, .35); filter: blur(1px); }
.orb .core { width: 58px; height: 58px; }
.orb .ic { font-family: var(--emoji); font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.orb .ic.sym { font-size: 22px; color: #fff; text-shadow: 0 0 8px var(--cc); }
.orb .nm { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(3, 12, 15, .72); white-space: nowrap; }
.orb.pop { animation: orbIn .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.orb.born .core { animation: orbIn .6s cubic-bezier(.2, 1.8, .4, 1) both, glow 1.2s ease-out; }
@keyframes orbIn { from { transform: scale(0); } }
@keyframes glow { 0% { box-shadow: 0 0 60px 20px var(--cc); } }
.orb .core { transition: transform .15s; }
.orb.sel .core { transform: scale(1.1); box-shadow: 0 0 0 3px var(--god), 0 0 24px var(--god); animation: selp 1s ease-in-out infinite; }
@keyframes selp { 50% { box-shadow: 0 0 0 5px rgba(95, 240, 191, .5), 0 0 30px var(--god); } }
.orb.target .core { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 30px var(--cc); }
.orb.dragging { transition: none; z-index: 5; } .orb.dragging .core { transform: scale(1.12); }
.orb.fly { z-index: 4; } .orb.fly .nm { opacity: 0; }
.orb.bounce .core { animation: wobble .45s; }
@keyframes wobble { 25% { transform: scale(1.15, .85); } 50% { transform: scale(.9, 1.1); } 75% { transform: scale(1.05, .95); } }
.orb.gone { opacity: 0; transform: translate(-50%, -50%) scale(.3); transition: opacity .3s, transform .3s; }
.orb.ghost { position: fixed; z-index: 30; pointer-events: none; opacity: .9; transition: none; } .orb.ghost .core { width: 62px; height: 62px; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
#app.quake { animation: quake .4s; }
@keyframes quake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -3px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
img.art { object-fit: contain; }
.orb img.ic, .tile img.ic { width: 70%; height: 70%; }

/* 선반 */
#shelfwrap { flex: 0 0 auto; height: clamp(186px, 36vh, 330px); display: flex; flex-direction: column; gap: 5px; padding: 8px 8px 0; margin: 8px -4px 0; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, #0b1e24, #07151a); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); }
.cats { display: flex; gap: 4px; flex: none; }
#cats { display: flex; gap: 4px; flex: none; }
.cat { flex: 1; min-width: 0; padding: 6px 2px; border-radius: 9px; font-size: 12.5px; color: var(--dim); border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; line-height: 1.15; white-space: nowrap; }
.cat small { font-size: 10.5px; opacity: .8; }
.cat.on { color: var(--ink); border-color: var(--cc); background: color-mix(in srgb, var(--cc) 14%, transparent); }
#shelf, .cxgrid { flex: 1; min-height: 0; display: grid; gap: 6px; align-content: start; overflow: hidden; touch-action: pan-y; }
#shelf.horz { grid-auto-flow: column; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scroll-snap-type: x proximity; overscroll-behavior: contain; scrollbar-width: none; }
#shelf.vert { overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; }
#shelf.horz::-webkit-scrollbar { display: none; }
#shelf.horz .tile { scroll-snap-align: start; touch-action: pan-x; }
#shelf.vert .tile { touch-action: pan-y; }
.tile.lift .core { transform: scale(1.15); box-shadow: 0 0 14px var(--cc); }
#shelfwrap { position: relative; }
#shelfwrap.more::after { content: ''; position: absolute; pointer-events: none; z-index: 2; }
#shelfwrap.more:not(.open)::after { right: 0; top: 40px; bottom: 26px; width: 26px; background: linear-gradient(90deg, transparent, #07151a); }
#shelfwrap.more.open::after { left: 0; right: 0; bottom: 26px; height: 26px; background: linear-gradient(180deg, transparent, #07151a); }
#pager .sh { font-size: 11px; color: var(--dim); }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 2px 0 0; min-width: 0; touch-action: none; border-radius: 12px; }
.tile .core { width: 38px; height: 38px; flex: none; transition: transform .12s; }
.tile:active .core { transform: scale(.9); }
.tile .ic { font-family: var(--emoji); font-size: 20px; line-height: 1; }
.ic.sym, .pi.sym, .bi.sym { font-family: var(--display); font-weight: 700; color: #fff; text-shadow: 0 0 8px var(--cc, var(--god)); font-size: 16px; }
.tile .nm { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; color: var(--ink); }
.tile.spent { opacity: .4; }
.tile.spent::after { content: '✓'; position: absolute; top: 0; right: 6px; font-size: 10px; color: var(--good); }
.tile.new::after { content: 'N'; position: absolute; top: -1px; right: 4px; font-size: 9px; font-weight: 700; line-height: 14px; width: 14px; border-radius: 50%; background: var(--god); color: #03110d; text-align: center; box-shadow: 0 0 6px var(--god); }
.tile.mini { background: var(--panel); border: 1px solid var(--line); border-bottom: 2px solid color-mix(in srgb, var(--cc) 60%, var(--line)); justify-content: center; }
.tile.mini .ic { font-size: 20px; }
#pager, .pager { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 22px; flex: none; font-size: 13px; color: var(--dim); }
#pager button, .pager button { width: 44px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--deep); }

/* 세계 그림 움직임 */
.tw { animation: tw 2.4s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .25; } }
.breath { animation: breath 4s ease-in-out infinite; transform-origin: 160px 120px; }
@keyframes breath { 50% { transform: scale(1.06); opacity: .85; } }
.drift { animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(12px); } }
.rot { animation: drift 14s ease-in-out infinite alternate; }
.lava { animation: tw 1.8s ease-in-out infinite; }
.spin { animation: spin 60s linear infinite; transform-origin: 160px 120px; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit { animation: spin 16s linear infinite; transform-origin: 160px 120px; }
.orbit2 { animation: spin 7s linear infinite; transform-origin: 160px 120px; }
.ring { animation: ring 3s ease-out infinite; transform-origin: 160px 120px; }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.1); opacity: 0; } }

/* 겹쳐 뜨는 화면 */
#overlay { position: fixed; inset: 0; z-index: 10; display: none; }
#overlay.show { display: block; background: radial-gradient(60% 45% at 50% 35%, #0d3036 0%, #03090c 75%); }
.dz { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); text-align: center; overflow: hidden; outline: 0; }
.dz[data-a=close] { cursor: pointer; }
.dz h2 { font-family: var(--display); font-size: clamp(26px, 5vh, 36px); margin: 0; animation: up .5s .55s both; }
.dz .eyebrow { margin: 0; color: var(--god); letter-spacing: .18em; font-size: 13px; animation: up .5s .45s both; }
.dz .desc { margin: 0; max-width: 26em; font-size: 15px; animation: up .5s .7s both; }
.dz .meta .tag { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--cc); color: var(--cc); margin-right: 4px; }
.dz .meta { margin: 0; color: var(--dim); font-size: 12.5px; animation: up .5s .85s both; }
.dz .tap { margin: 6px 0 0; color: var(--dim); font-size: 12.5px; animation: up .5s 1.1s both, tw 2.2s 1.6s ease-in-out infinite; }
.pair { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 18px; animation: up .4s both; }
.pi { font-family: var(--emoji); font-size: 26px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a376a, #0a171c 80%); border: 1px solid var(--line); }
.pi.q { font-family: var(--display); color: var(--dim); }
.pi.sil { color: var(--cc); border-color: var(--cc); }
.pair.big .pi { width: 58px; height: 58px; }
.hero { position: relative; width: clamp(120px, 24vh, 190px); aspect-ratio: 1; display: grid; place-items: center; flex: none; }
.bcore { position: relative; width: 72%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cc) 60%, #fff) 0%, color-mix(in srgb, var(--cc) 45%, #0f2228) 40%, #0a171c 80%); border: 2px solid var(--cc); box-shadow: 0 0 40px var(--cc), inset 0 -10px 24px rgba(0,0,0,.5); animation: pop .7s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
.halo { position: absolute; inset: 4%; border-radius: 50%; border: 2px solid var(--cc); opacity: 0; animation: halo 1.6s .3s ease-out infinite; }
@keyframes halo { from { transform: scale(.7); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.bi { position: relative; font-family: var(--emoji); filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); font-size: clamp(50px, 10vh, 78px); line-height: 1; }
.bi.sym { font-size: clamp(54px, 11vh, 84px); }
.rays { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cc) 55%, transparent) 0%, transparent 62%), repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--cc) 30%, transparent) 0 6deg, transparent 6deg 22deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%); animation: rays 14s linear infinite, fadein .6s .15s both; }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes fadein { from { opacity: 0; transform: scale(.3); } }
@keyframes pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }
.chap { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; border: 1px solid var(--god); border-radius: 14px; background: rgba(95, 240, 191, .06); animation: up .6s 1s both; width: min(100%, 340px); }
.chap .wsvg { max-height: 150px; }
.chap .next { margin: 0; font-size: 14px; }
.dz.big .hero { width: clamp(80px, 14vh, 130px); }
.dz.big .bi { font-size: clamp(40px, 7vh, 62px); }
.dz .row { display: flex; gap: 8px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.btn { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 14.5px; }
.btn.god { background: var(--aur); color: #03110d; border-color: transparent; font-weight: 700; }
.dz.intro .desc { line-height: 1.7; }
.dz.intro .btn { margin-top: 10px; padding: 12px 36px; font-size: 16px; }

/* 도감 */
.cx { position: absolute; inset: 0; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px calc(10px + env(safe-area-inset-bottom)); }
.cx header { display: flex; align-items: center; gap: 10px; }
.cx header b { flex: 1; font-family: var(--display); font-size: 19px; }
.cx .reset { color: var(--dim); font-size: 12.5px; }
.cxsum { margin: 0; color: var(--dim); font-size: 12.5px; }
.tile.mini .ic { font-size: 21px; } .tile.mini .nm { font-size: 10.5px; }
.tile.unk { background: var(--deep); border-style: dashed; border-bottom-width: 1px; }
.tile.unk .ic { color: var(--line); font-family: var(--display); font-size: 18px; }
.cx.detail { align-items: center; text-align: center; gap: 6px; }
.cx.detail header { align-self: stretch; }
.cx.detail h2 { font-family: var(--display); font-size: 28px; margin: 0; }
.cx.detail .eyebrow { margin: 0; color: var(--cc); font-size: 13px; }
.cx.detail .desc { margin: 0; max-width: 26em; }
.cx .bi.q { font-family: var(--display); color: var(--line); }
.lbl { margin: 8px 0 0; color: var(--dim); font-size: 12.5px; }
.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recs li { padding: 5px 14px; border-radius: 10px; background: var(--panel); font-size: 14px; }

/* 낮은 가로 화면: 왼쪽 작업판, 오른쪽 선반 */
@media (orientation: landscape) and (max-height: 560px) {
  #app { max-width: none; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top shelf" "goal shelf" "board shelf"; column-gap: 12px; padding-top: 2px; }
  #top { grid-area: top; padding-top: 6px; padding-bottom: 2px; } #goal { grid-area: goal; padding-top: 0; } #board { grid-area: board; min-height: 0; margin-bottom: 4px; }
  #shelfwrap { grid-area: shelf; height: auto; margin: 8px 0 0; border-radius: 18px 18px 0 0; }
  .dz { gap: 5px; } .chap .wsvg { max-height: 90px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; } }

/* 행성 위 떨구기 */
#board .bg { cursor: pointer; }
#board.aim .bg::after, #board.hot .bg::after { content: ''; position: absolute; left: var(--pcx, 50%); top: var(--pcy, 50%); width: calc(var(--pd, min(54.1cqw, 72cqh)) + 26px); aspect-ratio: 1; margin: calc(-.5 * (var(--pd, min(54.1cqw, 72cqh)) + 26px)) 0 0 calc(-.5 * (var(--pd, min(54.1cqw, 72cqh)) + 26px)); border-radius: 50%; border: 2px dashed rgba(95, 240, 191, .55); animation: spin 12s linear infinite; pointer-events: none; }
#board { container-type: size; }
#board.hot .bg::after { border: 3px solid var(--god); box-shadow: 0 0 30px rgba(95, 240, 191, .6), inset 0 0 30px rgba(95, 240, 191, .3); }
.orb.fall { transition: left .36s cubic-bezier(.6, 0, 1, .6), top .36s cubic-bezier(.6, 0, 1, .6), transform .36s ease-in, opacity .36s; transform: translate(-50%, -50%) scale(.25); opacity: .6; z-index: 6; }
.orb.fall .nm { opacity: 0; }
.orb.dropable .core::before, .tile.dropable .core::before { content: '⬇'; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--god); color: #03110d; font-size: 10px; line-height: 16px; text-align: center; font-family: var(--body); font-weight: 700; z-index: 1; }
.tile.dropable .core::before { width: 14px; height: 14px; line-height: 14px; font-size: 9px; right: -4px; bottom: -2px; }
.wait { position: absolute; z-index: 8; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; background: rgba(10, 30, 36, .9); border: 1px solid var(--good); color: var(--good); }
.chg { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); width: min(94%, 420px); padding: 8px 12px; border-radius: 14px; background: rgba(3, 12, 15, .9); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 7; pointer-events: none; }
.chg[hidden] { display: none; }
.chg.in { animation: up .35s both; }
.chg .ct { margin: 0 0 3px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chg .ct small { margin-left: auto; color: var(--dim); font-weight: 400; }
.ci { font-family: var(--emoji); font-size: 16px; } .ci.sym { font-family: var(--display); color: var(--god); font-weight: 700; }
.chg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.chg li { position: relative; padding-left: 13px; font-size: 12.5px; line-height: 1.4; }
.chg li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.chg li.good::before { background: var(--good); } .chg li.warn::before { background: #e9c46a; } .chg li.bad::before { background: var(--bad); } .chg li.bad { color: #f4a99d; } .chg li.dim { color: var(--dim); }
.cd { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cd span { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--deep); color: var(--dim); font-variant-numeric: tabular-nums; }
.cd small { margin-right: 4px; } .cd b { color: var(--ink); } .cd .up b { color: var(--good); } .cd .dn b { color: #f4a99d; }
.cg { margin: 4px 0 0; font-size: 12px; color: var(--god); }
.dz .advice { margin: 0 0 6px; max-width: 26em; font-size: 15px; padding: 8px 12px; border-radius: 12px; background: rgba(111, 214, 192, .08); border: 1px solid rgba(111, 214, 192, .4); }
.dz .desc.dim { color: var(--dim); }
.dropok { color: var(--god); font-weight: 600; }
.dz.end h2 { font-size: clamp(24px, 4.4vh, 32px); }
/* 행성 고르기 */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: min(100%, 460px); }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 8px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: center; transition: transform .15s, border-color .15s; }
.pcard:hover, .pcard:focus-visible { border-color: var(--god); transform: translateY(-2px); }
.pcard .pv { width: 100%; height: clamp(70px, 13vh, 110px); display: block; } .pcard .pv svg { width: 100%; height: 100%; }
.pcard b { font-size: 15px; } .pcard .diff { color: var(--god); font-size: 11.5px; }
.pcard .pd { color: var(--dim); font-size: 12px; line-height: 1.35; }
.pcard .pb { margin-top: 2px; color: var(--good); font-size: 11.5px; }
/* 결말 모음 */
.ends { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; align-content: start; }
.ends li { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--deep); border: 1px dashed var(--line); }
.ends li.ok { background: var(--panel); border: 1px solid var(--line); }
.ends .ei { grid-row: span 2; font-size: 22px; font-family: var(--emoji); text-align: center; color: var(--line); }
.ends b { font-size: 13px; } .ends small { color: var(--dim); font-size: 11px; line-height: 1.3; }
.clear { transition: transform .15s, background .15s, color .15s, border-color .15s; }
.clear.ready { border-style: dashed; color: var(--ink); }
.clear.ready::before { content: '🗑 '; }
.clear.trash { transform: scale(1.18); background: rgba(239, 125, 109, .25); border: 1.5px solid var(--bad); color: #fff; box-shadow: 0 0 16px rgba(239, 125, 109, .5); }
.orb.trashing .core { transform: scale(.6); opacity: .45; filter: grayscale(1); } .orb.trashing .nm { opacity: 0; }
/* 다음 할 일 */
.todo { display: flex; align-items: center; gap: 5px; padding: 4px 4px 4px 10px; border-radius: 12px; background: rgba(110, 220, 210, .08); border: 1px solid rgba(110, 220, 210, .35); min-height: 34px; }
.todo.warn { background: rgba(233, 196, 106, .08); border-color: rgba(233, 196, 106, .45); }
.todo.bad { background: rgba(239, 125, 109, .1); border-color: rgba(239, 125, 109, .55); }
.todo.good { background: rgba(111, 214, 192, .08); border-color: rgba(111, 214, 192, .4); }
.todo .tt { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.3; }
.tchip { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 999px; font-size: 12px; border: 1px dashed var(--line); color: var(--dim); background: var(--deep); }
.tchip.own { border: 1px solid var(--cc); color: var(--ink); box-shadow: 0 0 8px color-mix(in srgb, var(--cc) 40%, transparent); }
.tchip b { font-weight: 600; }
.fast { position: absolute; z-index: 8; left: 66px; bottom: 10px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(10, 30, 36, .9); border: 1px solid var(--good); color: var(--good); }
.undo { position: absolute; z-index: 8; right: 86px; bottom: 10px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(10, 30, 36, .9); border: 1px solid #9b8cff; color: #c9c0ff; }
.undo em { color: #c9c0ff; }
.undo:disabled { opacity: .35; }
.path { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 4px; width: min(100%, 360px); }
.path li { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 10px; background: var(--panel); font-size: 13px; text-align: left; }
.path li i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; background: var(--god); color: #03110d; font-size: 11px; display: grid; place-items: center; font-weight: 700; flex: none; margin-right: 4px; }
.path li em { color: var(--dim); } .path li b { color: var(--god); margin-left: auto; }
@media (max-height: 620px) and (orientation: portrait) {
  #shelfwrap { height: clamp(150px, 30vh, 220px); }
  #goal { gap: 3px; padding-bottom: 4px; }
  .chip { padding: 2px; } .todo { min-height: 28px; padding-top: 2px; padding-bottom: 2px; }
  #top { padding-top: 6px; padding-bottom: 3px; }
}
/* 리셋 */
.rsl { display: grid; gap: 8px; width: min(100%, 340px); margin-top: 6px; }
.rsl .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 14px; }
.rsl .btn small { font-size: 11.5px; font-weight: 400; opacity: .75; }
.btn.danger { border-color: rgba(239, 125, 109, .55); color: #f4a99d; }
.btn.danger.sure { background: var(--bad); color: #03110d; border-color: var(--bad); font-weight: 600; }
/* 그림 에셋 */
img.art { display: block; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.orb .core img.ic, .tile .core img.ic { width: 86%; height: 86%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.bcore img.bi { width: 82%; height: 82%; }
.pair img.pi { width: 50px; height: 50px; padding: 5px; }
img.ci { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.rail img.ri { width: 20px; height: 20px; padding: 1px; }
.rail li.now img.ri { width: 28px; height: 28px; }
.endart { width: min(100%, 300px, 34vh); aspect-ratio: 1; border-radius: 14px; object-fit: cover; display: block; }
#board { background-size: cover; background-position: center; }
/* 튜토리얼 */
#coach { position: fixed; z-index: 9; left: 0; right: 0; margin: 0 auto; top: 8px; width: min(96vw, 520px); display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px; border-radius: 16px; background: rgba(10, 30, 36, .96); border: 1.5px solid var(--god); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); animation: up .35s both; }
#coach[hidden] { display: none; }
#coach.low { top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); }
#coach .cimg { width: 64px; height: 64px; flex: none; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
#coach .ctx { flex: 1; min-width: 0; }
#coach p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; }
#coach b { color: var(--god); }
.crow { display: flex; align-items: center; gap: 8px; }
.crow small { color: var(--dim); font-size: 11.5px; }
.crow .cskip { margin-left: auto; color: var(--dim); font-size: 12px; padding: 4px 6px; }
.crow .btn { padding: 6px 14px; font-size: 13px; }
.cwait { font-size: 12px; color: var(--good); animation: tw 2s ease-in-out infinite; }
.hl { outline: 2.5px solid var(--god) !important; outline-offset: 3px; border-radius: 12px; animation: hlp 1.2s ease-in-out infinite; }
.orb.hl { outline: none !important; } .orb.hl .core { box-shadow: 0 0 0 3px var(--god), 0 0 26px var(--god); animation: selp 1s ease-in-out infinite; }
.tile.hl { outline-offset: 0; }
@keyframes hlp { 50% { outline-color: rgba(95, 240, 191, .3); } }
/* 대처법 */
.tq { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--good); color: var(--good); font-weight: 700; font-size: 13px; background: var(--deep); }
.cx .cats .cat { font-size: 11.5px; padding: 5px 0; }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; align-content: start; }
.gitem { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.gitem b { font-size: 13px; } .gitem small { color: var(--dim); font-size: 11.5px; line-height: 1.3; }
.gitem.now { border-color: var(--good); box-shadow: 0 0 12px rgba(111, 214, 192, .3); } .gitem.now b { color: var(--good); }
.cx.guide { gap: 6px; }
.cx.guide h2 { font-family: var(--display); font-size: 24px; margin: 2px 0; }
.gsym, .gwhy { margin: 0; font-size: 13.5px; line-height: 1.5; padding: 8px 12px; border-radius: 12px; background: var(--panel); }
.gsym small, .gwhy small, .grow small { display: block; color: var(--god); font-size: 11.5px; font-weight: 600; margin-bottom: 1px; }
.gwhy small { color: var(--dim); }
.gsteps { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.gsteps li::marker { color: var(--good); font-weight: 700; }
.grow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.grow small { width: 100%; margin: 4px 0 0; }
.gchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--cc); background: var(--deep); }
.gchip.lock { border-style: dashed; color: var(--dim); }
.gchip.bad { border-color: rgba(239, 125, 109, .6); color: #f4a99d; }
/* 정리된 화면: 접히는 재료 서랍 */
#shelfwrap { height: clamp(150px, 27vh, 230px); transition: height .25s; }
#shelfwrap.open { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; height: min(66vh, 560px); max-width: 760px; margin: 0 auto; box-shadow: 0 -16px 40px rgba(0, 0, 0, .6); }
.shead { display: flex; gap: 6px; align-items: center; flex: none; }
.shead #cats { flex: 1; min-width: 0; }
#shelfbtn { flex: none; padding: 6px 10px; border-radius: 999px; font-size: 12px; color: var(--god); border: 1px solid rgba(95, 240, 191, .5); background: var(--deep); white-space: nowrap; }
#cats .cat small { display: none; }
#cats .cat { padding: 5px 0; font-size: 12px; }
#shelfwrap:not(.open) #cats .cat:nth-child(n+4) { display: none; }
.hbtn.cmp em { color: var(--good); }
.chip { font-size: 12px; padding: 3px 1px; }
.liferow .rail li { height: 22px; }
.pnew { animation: pfade .9s ease-out both; }
@keyframes pfade { from { opacity: 0; } }
/* 지구와 비교 */
.cmpx { gap: 8px; }
.cscore { font-size: 13px; color: var(--dim); } .cscore em { color: var(--good); font-size: 17px; }
.cpl { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cpl figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 42%; }
.cpl .wsvg { width: 100%; max-height: 120px; }
.cpl img { width: 62%; aspect-ratio: 1; margin: 6% 0; }
.cpl figcaption { font-size: 11.5px; color: var(--dim); }
.vs { font-family: var(--display); color: var(--god); font-weight: 700; }
.ctab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ctab th, .ctab td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ctab thead th { color: var(--dim); font-weight: 500; font-size: 11.5px; }
.ctab tbody th { font-weight: 500; white-space: nowrap; }
.ctab td b { display: block; }
.cbar { display: block; position: relative; height: 5px; margin-top: 4px; border-radius: 3px; background: var(--line); width: 100%; min-width: 60px; }
.cbar .ce { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--god); transform: translateX(-1px); }
.cbar .cv { position: absolute; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: translateX(-4.5px); box-shadow: 0 0 6px rgba(255, 255, 255, .7); }
.ctab .ok { color: var(--good); } .ctab .hi { color: #f4a99d; } .ctab .lo { color: #8fc7ff; }
.cparts { display: flex; gap: 4px; flex-wrap: wrap; }
.cparts span { flex: 1; min-width: 56px; text-align: center; padding: 4px; border-radius: 10px; background: var(--panel); font-size: 12px; color: var(--dim); }
.cparts small { display: block; font-size: 11px; } .cparts b { color: var(--ink); font-size: 15px; }
.ttl small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (orientation: landscape) and (max-height: 560px) {
  .cmpx { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 14px; row-gap: 4px; align-content: start; }
  .cmpx > header { grid-column: 1 / -1; }
  .cmpx .cpl { grid-column: 1; grid-row: 2 / span 3; flex-direction: column; align-self: start; }
  .cmpx .cpl figure { width: 70%; } .cmpx .cpl .wsvg { max-height: 90px; } .cmpx .vs { font-size: 12px; }
  .cmpx .ctab, .cmpx .cparts, .cmpx .cxsum { grid-column: 2; }
  .cmpx .ctab th, .cmpx .ctab td { padding: 2px 4px; } .cmpx .cxsum { display: none; }
}
#globe { position: absolute; z-index: 1; pointer-events: none; border-radius: 50%; }

.ttl .bar .cp { position: absolute; top: 0; bottom: 0; width: 2px; background: #7fd6ff; }
.fast:disabled, .wait:disabled { opacity: .35; }
.ttl b { white-space: nowrap; }
.ttl small.of { font-size: 10px; margin-top: 2px; }

/* 단계 안내 */
.lnext { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--good); background: rgba(111, 214, 192, .12); border: 1px solid rgba(111, 214, 192, .5); }
.rail li[data-a] { cursor: pointer; }
.stg .sth { display: flex; align-items: center; justify-content: center; gap: 8px; }
.stg .sth h2 { margin: 0; }
.stg .meta.ok, .detail .meta.ok { color: var(--good); }
.scond { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 5px; text-align: left; }
.scond li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 13px; }
.scond li i { font-style: normal; width: 16px; text-align: center; font-weight: 700; color: var(--dim); }
.scond li.ok i { color: var(--good); } .scond li.no i { color: var(--bad); }
.scond li.no { border-color: rgba(239, 125, 109, .45); }
.scond li span { flex: 1; } .scond li b { font-size: 12px; color: var(--dim); font-weight: 600; }
.scond li.no b { color: #ffb4a8; }
.sitems { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.stip { font-size: 12.5px; color: var(--dim); margin: 6px 0; line-height: 1.5; text-align: left; }
.stip.warn { color: #ffd68a; }
.snav { flex-wrap: nowrap; } .snav .btn[aria-label] { padding-left: 12px; padding-right: 12px; }
.detail .row { justify-content: center; margin-top: 6px; }
.svc *, .svc, .rmv *, .rmv, .stg *, .stg { animation-delay: 0s !important; animation-duration: .25s !important; }
.stg .sth .ci { font-size: 26px; } .stg .sth img.ci { width: 36px; height: 36px; }
#shelfwrap.open.away { transform: translateY(105%); transition: transform .2s; }

/* 덜어내기 */
button.chip { color: var(--ink); cursor: pointer; }
button.chip:active { transform: scale(.95); }
.rlist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.rlist li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.rlist li.on { border-color: var(--god); }
.rlist li > i { font-style: normal; font-family: var(--emoji); font-size: 18px; width: 24px; text-align: center; flex: none; }
.rlist li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rlist li span b { font-size: 13.5px; } .rlist li span small { font-size: 11px; color: var(--dim); line-height: 1.35; }
.rlist li em { font-style: normal; font-size: 11.5px; color: var(--dim); white-space: nowrap; flex: none; }
.rlist li .btn { flex: none; padding: 6px 9px; font-size: 12px; min-height: 0; }

/* 저장 코드 */
.svc textarea.code { width: 100%; height: 96px; resize: none; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); font: 11px/1.4 ui-monospace, monospace; padding: 8px; word-break: break-all; }
.svc .row { flex-wrap: wrap; } .svc label.btn { cursor: pointer; }
.rsrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svst { margin: 2px 0 6px; }

/* 재료 찾기 */
#findbtn { flex: none; width: 32px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--deep); font-size: 13px; }
.sfind { display: flex; align-items: center; gap: 6px; flex: none; }
.sfind[hidden] { display: none; }
.sfind #findq { flex: 1; min-width: 0; height: 30px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); padding: 0 10px; font-size: 16px; }
.sfind label { flex: none; font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.sfind button { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--deep); color: var(--dim); }
.snone { grid-column: 1 / -1; text-align: center; color: var(--dim); font-size: 12.5px; margin: 14px 0; }
#shelfwrap.more:not(.open)::after { left: 0; right: 0; top: auto; bottom: 22px; width: auto; height: 22px; background: linear-gradient(180deg, transparent, #07151a); }
#shelfwrap.open #cats { overflow-x: auto; scrollbar-width: none; }
#shelfwrap.open #cats::-webkit-scrollbar { display: none; }
#shelfwrap.open #cats .cat { flex: none; padding: 5px 9px; white-space: nowrap; }

/* 계통 */
.lbadge { flex: none; font-family: var(--emoji); font-size: 14px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--deep); }
.lbadge.fire { border-color: #ef8a4c; box-shadow: 0 0 8px rgba(239, 138, 76, .5); }
.rail li.fork { box-shadow: 0 0 0 1.5px #ef8a4c inset; }
.emo { font-family: var(--emoji); font-style: normal; display: inline-grid; place-items: center; }
.ri.emo { font-size: 13px; } .ci.emo { font-size: 22px; } .bi.emo { font-size: 64px; }
.salt { margin: 6px 0; padding: 8px 10px 4px; border-radius: 12px; border: 1px dashed #ef8a4c; text-align: left; }
.salt .lbl { margin: 0 0 2px; color: #ffb086; }

/* 관찰창 */
.aqbtn { position: absolute; z-index: 9; left: 8px; top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--ink); background: rgba(3, 12, 15, .72); border: 1px solid var(--line); }
#aq { position: fixed; inset: 0; z-index: 9; display: none; flex-direction: column; background: #03090c; }
#aq.show { display: flex; animation: aqin .35s ease both; }
@keyframes aqin { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.aqh { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 6px; flex: none; }
.aqt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aqt b { font-size: 15px; } .aqt small { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#aqcv { flex: 1; min-height: 0; width: 100%; display: block; touch-action: none; }
.aqcap { flex: none; margin: 0; padding: 7px 14px; font-size: 12.5px; color: var(--dim); min-height: 34px; line-height: 1.4; border-top: 1px solid var(--line); }
.aqcap.good { color: var(--good); } .aqcap.bad { color: var(--bad); }
.aqbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px max(10px, env(safe-area-inset-bottom)); }
.aqbar > .btn { flex: none; padding: 7px 11px; font-size: 12.5px; min-height: 0; }
.aqorbs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.aqorbs::-webkit-scrollbar { display: none; }
.aqorbs .tchip { flex: none; }
.aqorbs small { color: var(--dim); font-size: 11px; white-space: nowrap; }
.aqtip { position: fixed; z-index: 11; padding: 8px 11px; border-radius: 12px; background: rgba(8, 26, 30, .95); border: 1px solid var(--god); display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.aqtip[hidden] { display: none; } .aqtip b { font-size: 13.5px; } .aqtip small { font-size: 11.5px; color: var(--dim); line-height: 1.4; }
#board .msg { left: calc(50% + 36px); max-width: calc(100% - 92px); }

.fimg { display: inline-grid; place-items: center; overflow: hidden; }
.fimg img { width: 100%; height: 100%; object-fit: contain; }
.ri.fimg { background: var(--deep); } .ri.fimg img { width: 118%; height: 118%; }
.ci.fimg { width: 34px; height: 34px; } .bi.fimg { width: 150px; height: 150px; }
#aq { position: fixed; } .aqzone { position: absolute; left: 12px; top: 70px; padding: 3px 10px; border-radius: 999px; background: rgba(10, 10, 26, .55); color: #fff; font-size: 12px; pointer-events: none; }
.aqzone:empty { display: none; }
.ends.bio .bimg img { width: 34px; height: 34px; object-fit: contain; }
.ends.bio .bimg span { font-family: var(--emoji); font-size: 22px; }
.ends.bio li.sec { display: block; background: none; border: 0; padding: 8px 2px 2px; font-size: 12px; color: var(--dim); font-weight: 600; }
.ends.bio li.rare.ok { border-color: #ffd76a; box-shadow: 0 0 10px rgba(255, 215, 106, .25); }
.ends.bio li:not(.sec) { grid-template-columns: 40px 1fr; }
.ends.bio li.sec { grid-column: 1 / -1; }
.ends.bio li.dim .bimg { opacity: .28; filter: grayscale(1) brightness(1.3); }
.ends.bio li.dim b { opacity: .5; font-weight: 500; }
.ends.bio li.dim b em { font-style: normal; font-size: 10.5px; margin-left: 4px; color: var(--dim); }
.ends.bio li.dim small { opacity: .75; }
.ends.bio li.dim b em { white-space: nowrap; }
/* 도감: 못 찾은 것도 희미하게 보여 준다 */
.tile.mini.dim { opacity: 1; }
.tile.mini.dim .core, .tile.mini.dim > img, .tile.mini.dim > .ic, .tile.mini.dim > span:not(.nm) { opacity: .26; filter: grayscale(1) brightness(1.2); }
.tile.mini.dim .nm { opacity: .45; }
.ends li.dim .ei { opacity: .3; filter: grayscale(1); }
.ends li.dim b { opacity: .5; font-weight: 500; }
.ends li.dim b em { font-style: normal; font-size: 10.5px; margin-left: 4px; color: var(--dim); white-space: nowrap; }
.ends li.dim small { opacity: .6; }
/* 튜토리얼 조명 */
#tutdim { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
#tutdim[hidden] { display: none; }
#tutdim path { fill: rgba(4, 4, 14, .66); pointer-events: visiblePainted; }
/* 📷 사진 */
.aqh .hbtn.shot { font-size: 18px; }
.aqflash { position: absolute; inset: 0; background: #fff; pointer-events: none; animation: phfl .45s ease-out forwards; z-index: 12; }
@keyframes phfl { from { opacity: .85; } to { opacity: 0; } }
.aqshot { position: absolute; inset: 0; z-index: 13; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: rgba(8, 8, 20, .82); }
.aqshot[hidden] { display: none; }
.phbox { width: min(100%, 560px); max-height: 100%; display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 18px; background: #0b1d23; border: 1px solid var(--god); box-shadow: 0 14px 40px rgba(0, 0, 0, .6); animation: up .3s both; overflow: auto; }
.phbox > img { width: 100%; border-radius: 10px; display: block; }
.phbox .row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.phbox > small { color: var(--dim); font-size: 11px; text-align: center; line-height: 1.4; }
.phmeta { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.45; } .phmeta b { color: var(--good); font-weight: 600; }
.phbox.album header { display: flex; align-items: center; justify-content: space-between; } .phbox.album header em { color: var(--god); font-style: normal; }
.phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.phth { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #03090c; color: inherit; display: flex; flex-direction: column; text-align: left; }
.phth img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.phth small { padding: 4px 7px; font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phth.rare { border-color: var(--god); box-shadow: 0 0 10px rgba(95, 240, 191, .35); }
/* 🃏 천체 달력 · 이벤트 카드 */
.skychip { position: absolute; z-index: 9; right: 8px; top: 8px; transition: opacity .2s; display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; color: var(--ink); background: rgba(3, 12, 15, .78); border: 1px solid var(--sc); box-shadow: 0 0 12px color-mix(in srgb, var(--sc) 45%, transparent); animation: skyglow 2.6s ease-in-out infinite; }
.skychip b { font-weight: 600; } .skychip small { color: #ffd36b; font-size: 10px; letter-spacing: -1px; } .skychip.got { animation: none; box-shadow: none; } .skychip.got small { color: var(--good); letter-spacing: 0; }
@keyframes skyglow { 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--sc) 75%, transparent); } }
.skysheet .skyhead { display: flex; gap: 12px; align-items: center; text-align: left; } .skysheet .skyhead h2 { margin: 0; }
.skysheet .stars, .sstar { color: #ffd36b; letter-spacing: 1px; }
.skynext { margin: 4px 0 0; font-size: 12px; color: var(--dim); }
.skynow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(10, 30, 36, .8); border: 1px solid var(--sc); color: var(--ink); text-align: left; flex-wrap: wrap; }
.skynow span { font-size: 20px; } .skynow b { font-size: 13.5px; } .skynow small { color: var(--dim); font-size: 11.5px; flex-basis: 100%; padding-left: 30px; margin-top: -4px; }
.cgrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 10px; align-content: start; padding: 4px 2px 10px; }
.ccell { display: flex; flex-direction: column; gap: 5px; } .chow { font-size: 10.5px; color: var(--dim); line-height: 1.35; }
.scard { position: relative; width: 100%; aspect-ratio: 3 / 4; padding: 0; border-radius: 12px; overflow: hidden; background: #070818; border: 2px solid #cfd6e4; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); color: #fff; }
.scard.s3, .scard.s4, .bigcard.s3, .bigcard.s4 { border-color: #5ff0bf; }
.scard.s5, .bigcard.s5 { border: 2px solid transparent; background: linear-gradient(#070818, #070818) padding-box, conic-gradient(from var(--ang, 0deg), #ff6b6b, #ffd36b, #6bffb0, #6bc8ff, #b06bff, #ff6b6b) border-box; animation: rainbow 4s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rainbow { to { --ang: 360deg; } }
.scard canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scard .sstar { position: absolute; left: 0; right: 0; top: 0; padding: 4px 0 10px; font-size: 11px; text-align: center; background: linear-gradient(rgba(0, 0, 0, .65), transparent); }
.scard .sname { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; font-size: 13px; font-weight: 700; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.scard.lock canvas { filter: grayscale(1) brightness(.22) blur(1px); }
.scard.lock .sname { color: var(--dim); } .scard.lock .sstar { opacity: .7; }
.slock { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-size: 30px; color: rgba(255, 255, 255, .45); font-weight: 700; }
.sfoil { position: absolute; right: 7px; top: 22px; color: #fff; text-shadow: 0 0 8px #ff9ad5, 0 0 14px #7fd6ff; font-size: 13px; }
.scard.shiny::after, .bigcard.shiny .sheen { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55; background: linear-gradient(115deg, transparent 20%, rgba(255, 120, 200, .55) 35%, rgba(120, 220, 255, .55) 45%, rgba(255, 240, 140, .5) 55%, transparent 70%); background-size: 250% 250%; animation: foil 3.5s ease-in-out infinite; }
@keyframes foil { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.scard.mini { width: 66px; flex: none; border-radius: 8px; }
.foilc { color: #ff9ad5; font-size: 13px; }
.bigview { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom)); }
.bdrop { position: absolute; inset: 0; background: rgba(4, 4, 14, .7); }
.bigcard { position: relative; width: min(82vw, 52vh * .75, 420px); aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; border: 3px solid #cfd6e4; box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 40px color-mix(in srgb, var(--sc) 40%, transparent); touch-action: none; transform-style: preserve-3d; will-change: transform; }
.bigcard canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bigcard .sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%); mix-blend-mode: overlay; }
.bigcard.shiny .sheen { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .3), transparent 40%), linear-gradient(115deg, transparent 20%, rgba(255, 120, 200, .5) 35%, rgba(120, 220, 255, .5) 45%, rgba(255, 240, 140, .45) 55%, transparent 70%); background-size: 100% 100%, 250% 250%; }
.btop { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px 22px; display: flex; justify-content: space-between; background: linear-gradient(rgba(0, 0, 0, .6), transparent); font-size: 15px; }
.btop .sfoil { position: static; font-size: 13px; }
.bbot { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .85) 40%); text-align: left; }
.bbot h3 { margin: 0 0 4px; font-family: var(--display); font-size: 20px; } .bbot p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.45; color: #e8e4f4; } .bbot small { font-size: 11px; color: var(--dim); }
.bigview .row { position: relative; }
.bgot { position: relative; margin: 0; font-family: var(--display); font-size: 20px; color: #ffd36b; text-shadow: 0 0 14px rgba(255, 211, 107, .6); animation: up .4s both; }
.bigview.get .bigcard { animation: cardin .9s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.bigview.shiny .bgot { color: #ff9ad5; }
@keyframes cardin { 0% { transform: perspective(900px) rotateY(180deg) scale(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: perspective(900px) rotateY(0) scale(1); } }
.orb.guest .core { box-shadow: 0 0 0 2px #fff6, 0 0 18px #ffd36b; }
#board .msg.show ~ .skychip { opacity: 0; pointer-events: none; }
.bigfly { position: relative; }
.bhint { position: relative; margin: -4px 0 0; font-size: 12px; color: var(--dim); }
.bigcard { cursor: zoom-in; }
.bigcard .btop, .bigcard .bbot, .bigcard .sheen { transition: opacity .3s; }
.bfullhint { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: 12px; color: rgba(255, 255, 255, .8); opacity: 0; pointer-events: none; }
.bigview.full .bigcard { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; z-index: 5; cursor: zoom-out; background: #000; animation: none; }
.bigview.full .btop, .bigview.full .bbot, .bigview.full .sheen { opacity: 0; }
.bigview.full .bfullhint { animation: fhint 3s ease both; }
@keyframes fhint { 0%, 100% { opacity: 0; } 15%, 70% { opacity: 1; } }
.bigview.full .bgot, .bigview.full .bhint, .bigview.full .row { visibility: hidden; }
.scard.soon { display: grid; place-items: center; border: 2px dashed rgba(255, 255, 255, .25); background: repeating-linear-gradient(135deg, #0b0a22 0 10px, #100e2c 10px 20px); }
.scard.soon .slock { color: rgba(255, 255, 255, .3); } .scard.soon .sname { color: var(--dim); background: none; }
.soonc { color: var(--dim); font-size: 12px; font-weight: 400; }
/* 🃏 트레이딩 카드 모양 */
.scard.tcg, .bigcard.tcg { container-type: inline-size; aspect-ratio: 63 / 88; padding: 3.2%; border: 0; border-radius: 4.6% / 3.3%; text-align: left; color: #f4f1ff; background: linear-gradient(135deg, #7d8698, #f4f7ff 22%, #9aa3b5 45%, #eef2fa 70%, #7d8698); box-shadow: 0 6px 18px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .5); animation: none; }
.tcg.r3, .tcg.r4 { background: linear-gradient(135deg, #7a4d0e, #ffe08a 22%, #b8862b 45%, #fff1b8 68%, #8a5a12); }
.tcg.r5 { background: conic-gradient(from var(--ang, 0deg), #ff6b6b, #ffd36b, #6bffb0, #6bc8ff, #b06bff, #ff6b6b); animation: rainbow 5s linear infinite; }
.bigcard.tcg { width: min(84vw, 64vh * .716, 400px); height: auto; }
.tframe { position: relative; height: 100%; display: flex; flex-direction: column; gap: 1.6cqw; padding: 2.4cqw; border-radius: 3cqw; background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--sc) 30%, #12102e), #0a0920 70%); box-shadow: inset 0 0 0 .5cqw rgba(0, 0, 0, .55), inset 0 0 3cqw rgba(0, 0, 0, .6); overflow: hidden; }
.thead { display: flex; align-items: center; gap: 2cqw; min-height: 9cqw; }
.ttype { flex: none; padding: .6cqw 2.2cqw; border-radius: 99cqw; font-size: 3.4cqw; background: rgba(255, 255, 255, .12); border: .3cqw solid rgba(255, 255, 255, .25); white-space: nowrap; }
.tname { flex: 1; min-width: 0; font-family: var(--display); font-size: 6.6cqw; font-weight: 800; letter-spacing: -.2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 .4cqw 0 rgba(0, 0, 0, .6); }
.tpow { flex: none; display: flex; align-items: baseline; gap: .8cqw; font-family: var(--display); font-size: 7cqw; font-weight: 800; color: #ffd36b; text-shadow: 0 .4cqw 0 rgba(0, 0, 0, .6); }
.tpow small { font-size: 2.8cqw; font-weight: 600; color: #ffe9b0; }
.tart { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 1.6cqw; overflow: hidden; background: #05051a; border: .9cqw solid transparent; background-clip: padding-box; box-shadow: 0 0 0 .7cqw rgba(255, 255, 255, .55), 0 0 0 1.2cqw rgba(0, 0, 0, .45), inset 0 0 4cqw rgba(0, 0, 0, .7); }
.tcg.r3 .tart, .tcg.r4 .tart { box-shadow: 0 0 0 .7cqw #f2bd62, 0 0 0 1.2cqw rgba(0, 0, 0, .45), inset 0 0 4cqw rgba(0, 0, 0, .7); }
.tart canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tholo { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.tcg.r3 .tholo, .tcg.r4 .tholo, .tcg.r5 .tholo { opacity: .22; mix-blend-mode: soft-light; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 45%, rgba(255, 235, 170, .35) 52%, transparent 65%); background-size: 260% 100%; animation: tsweep 6s ease-in-out infinite; }
@keyframes tsweep { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
.tcq { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; font-size: 22cqw; font-weight: 800; color: rgba(255, 255, 255, .35); }
.tstrip { display: flex; align-items: center; gap: 2cqw; padding: .8cqw 2.4cqw; border-radius: 1cqw; font-size: 3cqw; font-style: italic; background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); }
.trar { font-weight: 700; color: #fff; } .tstars { color: #ffd36b; letter-spacing: .2cqw; font-style: normal; } .tdist { margin-left: auto; color: #cfc8ea; }
.ttext { min-height: 21cqw; padding: 2cqw 2.6cqw; border-radius: 1.6cqw; background: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .05)); border: .3cqw solid rgba(255, 255, 255, .18); display: flex; flex-direction: column; gap: 1.2cqw; }
.ttext p { margin: 0; line-height: 1.35; }
.teff { font-size: 3.5cqw; color: #f1edff; } .teff b { display: inline-block; margin-right: 1cqw; padding: 0 1.6cqw; border-radius: 1cqw; font-size: 3cqw; color: #1b1630; background: var(--sc); }
.tflav { font-size: 3.2cqw; font-style: italic; color: #bdb5dc; border-top: .3cqw solid rgba(255, 255, 255, .12); padding-top: 1cqw; }
.tfoot { display: flex; justify-content: space-between; gap: 2cqw; font-size: 2.6cqw; color: rgba(230, 225, 255, .55); padding: 0 .6cqw; }
.tfoot span:nth-child(2):not(:last-child) { flex: 1; text-align: center; }
.tstamp { position: absolute; right: 7%; top: 15%; width: 10cqw; height: 10cqw; display: grid; place-items: center; border-radius: 50%; font-size: 5.5cqw; color: #fff; background: radial-gradient(circle, #ff9ad5, #7a5cff); box-shadow: 0 0 3cqw #ff9ad5; z-index: 2; }
/* 레전드(★5): 그림이 카드 전체를 덮는다 */
.tcg.r5 .tart { position: absolute; inset: 0; border: 0; border-radius: 3cqw; box-shadow: none; z-index: 0; }
.tcg.r5 .tframe > :not(.tart) { position: relative; z-index: 1; }
.tcg.r5 .thead, .tcg.r5 .tstrip { background: rgba(5, 5, 20, .55); border-radius: 1.4cqw; padding: .8cqw 2cqw; backdrop-filter: blur(2px); }
.tcg.r5 .ttext { margin-top: auto; background: rgba(5, 5, 20, .62); backdrop-filter: blur(3px); }
.tcg.r5 .tfoot { background: rgba(5, 5, 20, .5); border-radius: 1cqw; padding: .4cqw 1.6cqw; }
/* 빛나는 카드: 카드 전체가 무지갯빛 */
/* 못 얻은 카드 */
.tcg.lock .tart canvas { filter: grayscale(1) brightness(.2) blur(1px); }
.tcg.lock { filter: saturate(.25) brightness(.8); }
.tcg.lock .tname, .tcg.lock .tpow { color: #9c96b8; }
.tcg.soon { background: linear-gradient(135deg, #3a3758, #6a6690 50%, #3a3758); filter: brightness(.75); }
.tcg.soon .tart { background: repeating-linear-gradient(135deg, #0b0a22 0 8%, #100e2c 8% 16%); }
.scard.tcg.mini { width: 70px; }
/* 큰 카드 · 카드 속으로 */
.bigcard.tcg .sheen { border-radius: inherit; }
.bigview.full .bigcard.tcg { padding: 0; border-radius: 0; background: #000; }
.bigview.full .tframe { padding: 0; border-radius: 0; background: #000; box-shadow: none; }
.bigview.full .tframe > :not(.tart), .bigview.full .tstamp { opacity: 0; pointer-events: none; }
.bigview.full .tart { position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; }
.bigview.full .tholo { opacity: 0 !important; }
.csec { margin: 6px 2px -2px; font-size: 12.5px; color: var(--dim); font-weight: 600; }
.cx .cgrid { flex: none; overflow: visible; }
.cx:has(.cgrid) { overflow-y: auto; }
.visitln { margin: 2px 0 0; font-size: 12.5px; color: #ffb36b; } .visitln b { color: #ffd36b; }
/* 탄생 장면 */
#cine { position: fixed; inset: 0; z-index: 40; background: #03030c; animation: cinein .4s both; cursor: pointer; }
#cine canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#cine.out { animation: cineout .35s both; }
@keyframes cinein { from { opacity: 0; } } @keyframes cineout { to { opacity: 0; } }
#cine .ctitle { position: absolute; left: 0; right: 0; bottom: max(70px, 12vh); padding: 0 24px; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; pointer-events: none; }
#cine.titled .ctitle { opacity: 1; transform: none; }
#cine .ctitle small { display: block; font-size: 12px; letter-spacing: .3em; color: #ffd36b; }
#cine .ctitle b { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0; font-family: var(--display); font-size: 32px; color: #fff; text-shadow: 0 0 18px rgba(255, 220, 160, .6); }
#cine .ctitle b .ci { width: 36px; height: 36px; font-size: 28px; }
#cine .ctitle p { margin: 0 auto; max-width: 420px; font-size: 14px; line-height: 1.5; color: #d9d3f0; }
#cine .cskip { position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .4); color: #fff; font-size: 12.5px; }
#cine .ctap { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .55); opacity: 0; transition: opacity .6s .4s; }
#cine.titled .ctap { opacity: 1; }
.cinebtn { align-self: center; margin: -4px 0 4px; }
#cine .ctitle::before { content: ''; position: absolute; left: 50%; top: 50%; width: 130%; height: 220%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(3, 3, 12, .78), rgba(3, 3, 12, 0)); z-index: -1; }

/* ✦ 빛나는 카드: 그림은 그대로, 바깥 테두리만 무지갯빛으로 흐르고 빛난다 */
.tcg.shiny { background: conic-gradient(from var(--ang, 0deg), #ff8ac6, #ffd36b, #8affc1, #7fd0ff, #b48aff, #ff8ac6); animation: rainbow 6s linear infinite, shglow 2.8s ease-in-out infinite; }
@keyframes shglow { 0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .55), 0 0 10px rgba(255, 170, 230, .35); } 50% { box-shadow: 0 6px 18px rgba(0, 0, 0, .55), 0 0 22px rgba(160, 220, 255, .6); } }
.tcg.shiny::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 3.2%; pointer-events: none; z-index: 3; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%); background-size: 300% 100%; animation: rimsweep 3.5s ease-in-out infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@keyframes rimsweep { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0% 0; } }
.bigcard.tcg.shiny .sheen { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%); background-size: auto; }
.bigview.full .tcg.shiny::before { display: none; }
.scard.tcg.shiny::after { display: none; }

/* 화면 정리: 위아래 빈칸을 줄이고 행성을 크게 */
#top { padding: 6px 2px 4px; gap: 6px; }
.ttl b { display: flex; align-items: baseline; gap: 8px; font-size: 18px; line-height: 1.15; }
.ttl b small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl .bar { margin-top: 4px; }
.hbtn { padding: 5px 11px; }
.hbtn.menu { display: flex; align-items: center; gap: 4px; padding: 5px 9px; font-size: 15px; }
.hbtn.menu .hcnt { font-size: 11px; color: var(--god); }
#goal { gap: 4px; padding: 0 0 5px; }
.chip { padding: 3px 2px; }
.todo { min-height: 30px; padding: 3px 4px 3px 9px; }
.todo .tt { font-size: 12.5px; line-height: 1.3; }
#shelfwrap { height: clamp(132px, 21vh, 200px); margin-top: 6px; padding-top: 6px; }
#shelfwrap.open { height: min(66vh, 560px); }
/* 도감 분류: 글자를 키우고 옆으로 밀어 본다, 카드는 따로 크게 */
.cx .cats { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; gap: 6px; padding: 2px 2px 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.cx .cats::-webkit-scrollbar { display: none; }
.cx .cats .cat { flex: none; padding: 7px 13px; font-size: 14.5px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--ink); scroll-snap-align: center; }
.cx .cats .cat.on { background: color-mix(in srgb, var(--cc) 22%, transparent); border-color: var(--cc); color: #fff; font-weight: 700; }
.cx .cats .cat[data-id=card] { order: -1; padding: 8px 16px; font-size: 16px; font-weight: 800; color: #1b1630; background: linear-gradient(135deg, #ffd36b, #ff9ad5); border: 0; box-shadow: 0 0 12px rgba(255, 154, 213, .45); }
.cx .cats .cat[data-id=card].on { outline: 2px solid #fff; outline-offset: 2px; color: #1b1630; }
.cx .ends, .cx .glist { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 8px; }
.cx.guide { overflow-y: auto; }
.ends li b { font-size: 14px; } .ends li small { font-size: 12px; line-height: 1.4; }
/* 홈 화면 앱: 상태 표시줄 아래로 들어가지 않게 */
#app { padding-top: env(safe-area-inset-top); }
.a2icon { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.a2steps { margin: 4px 0; padding-left: 22px; text-align: left; font-size: 14px; line-height: 1.7; }
.a2k { display: inline-block; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--deep); }
.btn.tiny { padding: 3px 9px; font-size: 12.5px; }
.stip.hardway { color: #ffc6e8; } .stip.hardway small { color: #ff9ad5; }
/* 첫 화면 · 오로라 */
#title { position: fixed; inset: 0; z-index: 60; background: #02080b; cursor: pointer; animation: cinein .5s both; font-family: var(--body); }
#title.out { animation: cineout .45s both; }
#title canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tt-wrap { position: absolute; left: 0; right: 0; bottom: calc(100% - var(--hz, 62vh) + 26px); text-align: center; padding: 0 20px; }
.tt-pre { margin: 0 0 12px; font-size: 11px; letter-spacing: .5em; color: #6fd6c0; animation: ttfade 1.2s .2s both; }
.tt-name { margin: 0; font-family: var(--body); font-weight: 600; font-size: clamp(40px, 12vw, 70px); letter-spacing: .12em; line-height: 1.1; white-space: nowrap; color: #e8fff7; text-shadow: 0 0 30px rgba(110, 255, 200, .35); }
.tt-name span { display: inline-block; animation: ttletter 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ttletter { from { opacity: 0; transform: translateY(14px); filter: blur(8px); } }
.tt-sub { margin: 12px 0 0; font-weight: 300; font-size: clamp(15px, 4.4vw, 20px); letter-spacing: .32em; color: #9ee8d0; animation: ttfade 1.6s 1.5s both; }
@keyframes ttfade { from { opacity: 0; letter-spacing: .6em; } }
.tt-menu { position: absolute; left: 24px; right: 24px; bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px)); max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; animation: ttfade2 .9s 2.2s both; }
@keyframes ttfade2 { from { opacity: 0; transform: translateY(10px); } }
#title .tt-go { display: flex; flex-direction: column; align-items: center; padding: 13px; font-size: 17px; border: 0; border-radius: 999px; color: #03110d; font-weight: 700; background: linear-gradient(90deg, #57f2b8, #8a7dff); box-shadow: 0 8px 26px rgba(87, 242, 184, .25); }
#title .tt-go small { font-size: 12px; opacity: .75; font-weight: 500; }
.tt-row { display: flex; gap: 6px; } .tt-row button { flex: 1; padding: 9px 4px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); color: #dffcf2; font-size: 12.5px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tt-tap { position: absolute; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 11px; color: rgba(220, 255, 245, .4); animation: ttfade2 1s 3s both; }
.credits .crl { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.credits .crl li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.credits .crl b { font-size: 12px; color: var(--god); } .credits .crl span { font-size: 13.5px; line-height: 1.45; }
.credits .aino { margin: 2px 0 6px; font-size: 10.5px; color: rgba(225, 220, 245, .45); text-align: center; }

/* 판 배경 그림(성운)을 오로라 빛깔로 물들인다 */
#board { background-blend-mode: hue, normal; }


/* 재료 서랍: 판 아래에 붙은 채로 높이만 바뀐다 (위를 덮지 않는다) */
#shelfwrap.open { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; max-width: none; margin: 6px -4px 0; box-shadow: none; }
#shelfwrap.open.away { transform: none; }
#shelfwrap .grabbar { position: absolute; left: 0; right: 0; top: -10px; height: 26px; z-index: 3; cursor: ns-resize; touch-action: none; display: grid; place-items: center; }
#shelfwrap .grabbar .grab { width: 44px; height: 5px; border-radius: 5px; background: rgba(230, 246, 242, .35); transition: background .15s, width .15s; }
#shelfwrap .grabbar:hover .grab, #shelfwrap.sizing .grabbar .grab { background: var(--god); width: 60px; }
#shelfwrap .shead { touch-action: none; }
#shelfwrap.sizing { user-select: none; }
#board { min-height: 190px; }
/* 판이 작아지면 구슬과 버튼도 함께 작아진다 */
#board .orb .core { width: clamp(34px, 17cqh, 58px); height: clamp(34px, 17cqh, 58px); }
#board .orb .nm { font-size: clamp(10px, 3.6cqh, 12px); }
@container (max-height: 260px) { #board .orb .nm { display: none; } #board .aqbtn, #board .skychip { transform: scale(.88); transform-origin: top left; } #board .skychip { transform-origin: top right; } }
/* 서랍을 높이 올리면: 위쪽은 꼭 필요한 것만 한 줄로 */
body.tall #goal .liferow, body.tall #goal .todo { display: none; }
body.tall #top { padding-top: 2px; padding-bottom: 2px; }
body.tall #top .ttl .bar { display: none; }
body.tall #top .ttl b { font-size: 15px; }
body.tall #top .hbtn { padding: 3px 9px; font-size: 13px; }
body.tall #goal { padding-bottom: 3px; }
body.tall #goal .chips .chip { padding: 2px 1px; font-size: 11.5px; }
body.tall #board { min-height: 150px; }
body.tall #shelfwrap .shead { min-height: 0; }
body.tall #shelf .tile .nm { font-size: 10.5px; }
body.tall #pager { display: none; }
/* 너무 많아진 상태 칸: ⛏ 표시로 눌러서 덜 수 있음을 알린다 */
#goal .chip { position: relative; }
#goal .chip.over { border-color: rgba(239, 125, 109, .75); animation: overpulse 2.2s ease-in-out infinite; }
#goal .chip.over::after { content: '⛏'; position: absolute; right: -4px; top: -7px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; background: #ef7d6d; color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
@keyframes overpulse { 50% { box-shadow: 0 0 10px rgba(239, 125, 109, .55); } }

/* 행성의 길 */
.pcard .prt { display: block; margin-top: 4px; font-size: 11.5px; color: var(--god); font-weight: 600; }
.route .rref { margin: 6px 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.route .rref b { color: var(--cc); }
.rsteps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.rsteps li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.04); opacity: .6; }
.rsteps li i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.1); }
.rsteps li span { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.rsteps li small { color: var(--dim); font-size: 12px; line-height: 1.4; }
.rsteps li.ok { opacity: .85; } .rsteps li.ok i { background: var(--god); color: #06221a; }
.rsteps li.now { opacity: 1; background: color-mix(in srgb, var(--cc) 16%, transparent); outline: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); }
.rsteps li.now i { background: var(--cc); color: #08131f; }
.stg .rlink { width: 100%; margin-top: 6px; }

/* 관찰창 확대 */
#aq .aqzoom { position: absolute; right: 10px; top: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 3; }
#aq .aqzoom .hbtn { width: 38px; height: 38px; font-size: 20px; background: rgba(8,14,30,.6); backdrop-filter: blur(6px); }
#aq .aqzoom em { font-style: normal; font-size: 11px; color: #cfe; text-shadow: 0 1px 3px #000; min-height: 1em; }
#aqcv { touch-action: none; }

/* 내 행성 목록 */
.wlist { display: grid; gap: 8px; margin: 8px 0 6px; text-align: left; }
.wcard { position: relative; display: flex; align-items: stretch; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.wcard.cur { border-color: color-mix(in srgb, var(--god) 60%, transparent); background: color-mix(in srgb, var(--god) 10%, transparent); }
.wcard .wmain { flex: 1; display: flex; gap: 12px; align-items: center; padding: 8px 10px; background: none; border: 0; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.wcard .pv { width: 58px; height: 58px; flex: none; display: block; }
.wcard .pv svg { width: 100%; height: 100%; }
.wcard .wt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wcard .wt b { font-size: 15px; } .wcard .wt b em { font-style: normal; font-size: 11px; color: #06221a; background: var(--god); border-radius: 8px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.wcard .wt small { color: var(--dim); font-size: 12px; }
.wcard .wt .wgo { color: var(--god); } .wcard .wt .wend { color: #ffd98a; }
.wcard .wdel { flex: none; align-self: center; margin-right: 8px; min-width: 32px; height: 32px; border-radius: 16px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.2); color: var(--dim); font-size: 12px; padding: 0 8px; }
.wcard .wdel.on { color: #fff; background: #b8433a; border-color: #b8433a; }
.pcards.off { opacity: .4; pointer-events: none; }

/* 멀리 떠 있는 내 다른 행성들 */
#board .others { position: absolute; z-index: 1; left: 6px; top: 50px; opacity: .75; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#board .oth { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 0; padding: 0; color: #dfeee9; cursor: pointer; animation: othf 6s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * -1); }
#board .oth .pv { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(140,220,255,.45)); opacity: .9; }
#board .oth .pv svg { width: 160%; height: 160%; }
#board .oth small { font-size: 9.5px; line-height: 1.1; opacity: .8; text-shadow: 0 1px 3px #000; max-width: 52px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#board .oth.new .pv { border: 1.5px dashed rgba(95,240,191,.6); color: var(--god); font-size: 16px; font-weight: 700; background: rgba(8,20,30,.35); filter: none; }
#board .oth:active .pv { transform: scale(.9); }
@keyframes othf { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* 위쪽 행성 바꾸기 단추: 내 다른 행성이 겹쳐 보인다 */
#top .wsw { display: flex; align-items: center; gap: 2px; padding: 0 8px 0 6px; min-width: 52px; }
#top .wsw .wmini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; overflow: visible; margin-left: calc(var(--i, 0) * -9px); filter: drop-shadow(0 0 4px rgba(140,220,255,.5)); }
#top .wsw .wmini svg { width: 170%; height: 170%; }
#top .wsw .wmini.plus { border: 1.5px dashed rgba(95,240,191,.7); color: var(--god); font-size: 13px; font-weight: 700; filter: none; }
#top .wsw em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--god); margin-left: 2px; }

/* 난이도 별 */
.pcard .dstar { color: #ffcf5a; font-size: 12px; letter-spacing: 1px; margin: 2px 0 1px; }
.pcard .dstar i { font-style: normal; color: rgba(255,255,255,.18); }
.pcard .dstar em { font-style: normal; letter-spacing: 0; color: var(--dim); font-size: 11px; margin-left: 2px; }
.pcard .prec { font-size: 10.5px; color: #06221a; background: var(--god); border-radius: 8px; padding: 1px 7px; margin: 2px 0; font-weight: 700; }
.pcards.soon .pcard.locked { opacity: .55; filter: saturate(.6); cursor: default; }
.pcard.locked .pv.emo { font-size: 38px; height: 64px; display: grid; place-items: center; filter: grayscale(.3); }
.pcard .psoon { margin-top: 4px; font-size: 10.5px; color: var(--dim); border: 1px dashed rgba(255,255,255,.25); border-radius: 8px; padding: 1px 8px; }

/* 행성 회전목마 */
.pcarw { position: relative; width: calc(100% + 24px); margin: 4px -12px 0; }
.pcarw.off { opacity: .45; pointer-events: none; }
.pcar { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 19%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pcar::-webkit-scrollbar { display: none; }
.pcar .pcard { flex: 0 0 62%; margin: 0 -2%; scroll-snap-align: center; transition: transform .08s linear, opacity .08s linear; padding: 10px 12px 14px; transform-origin: 50% 60%; }
.pcar .pcard:hover, .pcar .pcard:focus-visible { transform: none; }
.pcar .pcard .pv { height: clamp(120px, 22vh, 190px); }
.pcar .pcard b { font-size: 18px; margin-top: 4px; }
.pcar .pcard .pd { font-size: 13px; margin-top: 4px; }
.pcar .pcard.locked .pv.emo { font-size: 84px; height: clamp(120px, 22vh, 190px); }
.pnav { position: absolute; top: 42%; z-index: 20; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8,14,30,.7); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.pnav.prev { left: 6px; } .pnav.next { right: 6px; }
.pdots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 2px; }
.pdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.22); cursor: pointer; transition: all .2s; }
.pdots i.on { background: var(--god); width: 18px; border-radius: 4px; }
.pdots i:nth-child(n+5) { background: rgba(255,255,255,.12); } .pdots i:nth-child(n+5).on { background: #9aa6b8; }
.pcar .pcard .pv svg { transform: scale(1.45); }
.pcar .pcard { overflow: hidden; }
.pcar { padding: 10px 0; }
.pcar::before, .pcar::after { content: ''; flex: 0 0 19%; }
.pcar .pcard { flex: 0 0 62%; margin: 0; }

.pcar .pcard { transition: none; will-change: transform, opacity; backface-visibility: hidden; }
.pcar { scroll-behavior: auto; overscroll-behavior-x: contain; }

/* 도감 단서 */
.tile.unk.sil { background: var(--deep); border-style: solid; border-color: color-mix(in srgb, var(--cc) 45%, transparent); }
.tile.unk.sil .ic, .tile.unk.sil .ic img, .hero.sil .bi, .hero.sil .bi img { filter: brightness(0) drop-shadow(0 0 4px color-mix(in srgb, var(--cc) 80%, transparent)); opacity: .9; }
.tile.unk.sil .nm { color: var(--cc); }
.tile.unk.far .ic { color: rgba(255,255,255,.28); font-size: 20px; }
.tile.ess { box-shadow: inset 0 -4px 0 #f2bd62, 0 0 0 1px rgba(242,189,98,.55); }
.hero.ess .bi { outline: 3px solid #f2bd62; outline-offset: 6px; border-radius: 18px; }
.cxsum .lg { font-size: 11px; } .cxsum .lg.sil { color: #7fe9c9; } .cxsum .lg.ess { color: #f2bd62; }
.path li.hid { opacity: .5; }

.tile.unk.sil .ic, .tile.unk.sil .ic *, .hero.sil .bi, .hero.sil .bi * { filter: brightness(0) !important; color: #000 !important; -webkit-text-fill-color: #000; }
.tile.unk.sil .ic, .hero.sil .bi { filter: brightness(0) drop-shadow(0 0 3px color-mix(in srgb, var(--cc) 90%, transparent)) drop-shadow(0 0 1px #fff) !important; }
/* ===== 크리처 카드 · 크리쳐 월드 ===== */
.crhero { position: relative; width: clamp(170px, 34vh, 290px); aspect-ratio: 1; display: grid; place-items: center; margin: 2px auto 0; flex: none; }
.crhero::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cs) 55%, transparent), transparent 70%); }
.crhero img { position: relative; width: 88%; height: 88%; object-fit: contain; animation: crpop .7s cubic-bezier(.2, 1.6, .4, 1) both, crbob 3.2s 0.7s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.dz.crit.leg .crhero { width: clamp(190px, 40vh, 330px); }
.dz.crit.lock .crhero img { filter: brightness(0) drop-shadow(0 0 4px color-mix(in srgb, var(--cc) 90%, transparent)); opacity: .85; animation: none; }
.dz.crit h2 { color: var(--cc); }
.stip.good { color: #9be37a; text-align: center; font-weight: 700; }
@keyframes crpop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes crbob { 50% { transform: translateY(-6px) scale(1.02); } }
.crbtn { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 auto 8px; padding: 8px 16px; border-radius: 999px; background: linear-gradient(90deg, #ffb8d9, #c9b8ff); color: #2a1a3a; font-size: 14px; border: 0; box-shadow: 0 4px 14px rgba(255, 150, 210, .35); }
.crbtn em { color: inherit; font-style: normal; font-size: 12px; opacity: .75; }
.pcard .pcr { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; color: var(--dim); }
.pcard .pcr img { width: 26px; height: 26px; object-fit: contain; }
.pcard .pcr img.sil { filter: brightness(0) drop-shadow(0 0 2px #fff); opacity: .7; }
.pcard .pcr.done { color: #9be37a; font-weight: 700; }
#cw { position: fixed; inset: 0; z-index: 9; background: #2b2a5c; touch-action: none; font-family: var(--body); animation: cinein .4s both; }
#cw canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#cw .cwtop { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px 16px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
#cw .cwtop b { font-size: 16px; } #cw .cwtop em { font-style: normal; font-size: 12px; opacity: .8; flex: 1; }
#cw .cwx { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(20, 16, 50, .5); color: #fff; font-size: 16px; }
#cw .cwtip { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 6px rgba(60, 30, 80, .6); pointer-events: none; animation: fadein .6s 1s both; }
#cw .cwtip.big { top: 34%; font-size: 16px; font-weight: 700; } #cw .cwtip small { font-weight: 400; font-size: 12.5px; opacity: .9; }
#cw .cwbar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(40, 20, 60, .45) 30%); }
#cw .cws { min-width: 0; aspect-ratio: 1; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .35); padding: 3px; }
#cw .cws img { width: 100%; height: 100%; object-fit: contain; }
#cw .cws.no img { filter: brightness(0); opacity: .45; }
/* 새로 열린 도구 */
.newly { animation: newly 1.2s ease-in-out infinite; }
@keyframes newly { 50% { box-shadow: 0 0 0 4px rgba(242, 189, 98, .85), 0 0 18px rgba(242, 189, 98, .7); } }
.crph { font-size: clamp(80px, 18vh, 150px); line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
#cw .cws .crph { font-size: 22px; display: grid; place-items: center; height: 100%; }
#cw .cws.no .crph { filter: brightness(0); opacity: .45; }
/* 할 일 줄 높이 고정: 글이 한 줄·두 줄로 바뀌어도 아래 판과 행성이 흔들리지 않는다 */
.todo { height: calc(2.6em * 0.9615 + 10px); min-height: 0; box-sizing: border-box; }
.todo .tt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.todo.full { height: auto; }
.todo.full .tt { -webkit-line-clamp: unset; display: block; }
/* 개발자 도구 */
#devbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(20, 16, 50, .88); color: #fff; font-size: 12.5px; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); max-width: 94vw; }
#devbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#devbar button { border: 0; border-radius: 999px; padding: 6px 10px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 12px; white-space: nowrap; }
.devp, .devs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.devs { max-height: 34vh; overflow: auto; }
.devp .btn, .devs .btn { font-size: 12.5px; padding: 8px 6px; }
/* 공유 카드 · 백업 알림 */
.shareimg { width: min(78vw, 360px); max-height: 56vh; object-fit: contain; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); margin: 6px auto; display: block; }
.bkn { margin-top: 8px; font-size: 12px; opacity: .85; }
.lnk { background: none; border: 0; padding: 0; color: #9fd8ff; text-decoration: underline; font: inherit; cursor: pointer; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* 아이폰 홈 화면 추가 안내 */
#a2ios { position: fixed; inset: 0; z-index: 40; background: rgba(5, 4, 20, .72); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 16px 16px calc(64px + env(safe-area-inset-bottom)); }
#a2ios .a2box { background: var(--deep, #12102c); border: 1px solid var(--line, #334); border-radius: 18px; padding: 14px 16px; width: min(92vw, 420px); color: #fff; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
#a2ios ol { margin: 0; padding-left: 20px; line-height: 1.8; }
#a2ios small { opacity: .8; font-size: 12px; }
#a2ios .btn { align-self: center; margin-top: 4px; }
#a2ios .a2arrow { font-size: 44px; color: #7fd6ff; text-shadow: 0 0 14px rgba(127, 214, 255, .9); animation: a2b 1s ease-in-out infinite; margin-top: 8px; }
#a2ios .a2arrow.up { position: fixed; top: 6px; right: 70px; transform: rotate(180deg); animation: none; }
@keyframes a2b { 50% { transform: translateY(10px); } }
/* 친구 */
.frme { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 13px; }
.frme input { width: 9em; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: inherit; font: inherit; }
.frcard { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: rgba(255, 255, 255, .04); text-align: left; margin-top: 6px; }
.frhd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; } .frhd b { font-size: 16px; } .frhd small { opacity: .7; font-size: 11px; }
.frr { display: grid; grid-template-columns: 1fr 3.4em 3.4em; gap: 4px; font-size: 13px; padding: 2px 0; } .frr b, .frr em { text-align: center; font-style: normal; opacity: .85; }
.frr .win { color: #9be37a; opacity: 1; font-weight: 800; } .frh { font-size: 11px; opacity: .7; }
.frcs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; } .frc { width: 30px; height: 30px; display: grid; place-items: center; font-size: 18px; } .frc img { width: 100%; height: 100%; object-fit: contain; } .frc.no img { filter: brightness(0); opacity: .4; }
.frw { margin: 4px 0 0; padding-left: 18px; font-size: 12px; opacity: .85; line-height: 1.6; }
.frdel { font-size: 11px; opacity: .6; align-self: flex-end; }

/* ===== 수익 (money.js): 꺼져 있으면 쓰이지 않는다 ===== */
#adfake { position: fixed; inset: 0; z-index: 9999; background: rgba(6, 5, 18, .96); display: grid; place-items: center; text-align: center; color: #ece7dc; }
#adfake > div { display: grid; gap: 12px; justify-items: center; padding: 24px; }
#adfake .adn { font-size: 64px; line-height: 1; }
.shopl { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; text-align: left; font-size: 14px; }
.agree { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; text-align: left; }
.meta.biz { font-size: 10.5px; opacity: .7; line-height: 1.5; margin-top: 10px; }
.btn.off { opacity: .45; }
/* 곧 열리는 행성: 그림은 보이되 어둡게 */
.pcar .pcard.locked .pv { filter: grayscale(.75) brightness(.55); }
.pcar .pcard.locked .psoon { display: block; margin-top: 6px; color: #f2bd62; font-weight: 700; }
