/* HiTingle (11/13 redesign, 11/14 refresh). One sheet for the whole app.
   The stage (the 3D canvas) fills the screen. What stands over it is frosted glass that floats clear of the screen's edges: a name
   card and the keys at the top, the tools, the toys the person has and the tabs at the bottom (dark glass over a night table).
   Pages (상점, 소셜, 나) are white with ink text and one accent, and their tab bar floats over them the same way. Sheets rise from
   the bottom with a rounded top. Buttons, chips and bars are capsules and cards are 20-24px (11/14: "5년 전 앱 같다, 투박하다": the
   solid dark slabs and 12px boxes went). What is chosen is ink, what acts is the accent. A press answers by giving a little
   (transform only, so no neighbour moves). Touch targets are 44px or more and text is 12px or more.
   Icons: app/icons.js (Phosphor, filled paths, class .ic). Type: Pretendard Variable (public/fonts, OFL), the system face behind it. */
@font-face{font-family:"Pretendard Variable";font-weight:45 920;font-style:normal;font-display:swap;src:url("./fonts/PretendardVariable.woff2") format("woff2-variations"),url("./fonts/PretendardVariable.woff2") format("woff2")}
:root{
 --sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);
 /* the room behind the table: studio.setBackdrop writes these three */
 --bg-hi:#6a7473;--bg-mid:#444d4d;--bg-lo:#283030;
 --ink:#16171B;--ink2:#4A4F5C;--ink3:#6B7080;--line:#E7E9EE;--surface:#FFFFFF;--fill:#F3F4F7;--fill2:#E9EBF0;--sep:rgba(22,23,27,.08);
 --accent:#E11D58;--accent-soft:#FFE9EF;--accent-ink:#C0124A;--coin:#F5A800;--warn-bg:#FFF1E0;--warn-ink:#8A4B00;--bad:#C8102E;--bad-bg:#FDECEE;
 /* what floats over the toy: light glass by day, dark over a night table (studio.js puts data-night on the root). The glass is thick
    enough that its text reads whatever is behind it, even with no blur: ink on the light glass over black, white on the dark glass over
    white are both 4.5:1 or more (tests/stage-layout.test.mjs works it out) */
 --stage:rgba(255,255,255,.78);--stage-line:rgba(255,255,255,.66);--stage-ink:#16171B;--stage-ink2:#4A4F5C;--stage-soft:rgba(22,23,27,.07);--stage-solid:#fff;--stage-on:#16171B;--stage-on-ink:#fff;--stage-dash:rgba(22,23,27,.3);
 --glass-fx:blur(22px) saturate(1.7);--glass-shadow:0 10px 30px rgba(17,19,28,.16),0 1px 3px rgba(17,19,28,.1);
 --float:12px;--spring:cubic-bezier(.3,1.36,.5,1);
 --paper:var(--surface);--dark:var(--ink);
 --tabbar:62px;--tabs:72px;--font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,system-ui,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;
 color-scheme:light;font-family:var(--font);font-synthesis:none}
:root[data-night]{--stage:rgba(26,27,33,.74);--stage-line:rgba(255,255,255,.14);--stage-ink:#fff;--stage-ink2:#C9CDD6;--stage-soft:rgba(255,255,255,.14);--stage-solid:#2A2C33;--stage-on:#fff;--stage-on-ink:#16171B;--stage-dash:rgba(255,255,255,.45);--glass-shadow:0 10px 30px rgba(0,0,0,.36)}
/* without a backdrop blur (an old WebView, or data-fx=lite, which main.js sets on a weak phone) the glass is nearly solid instead */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root{--stage:rgba(255,255,255,.94)}:root[data-night]{--stage:rgba(26,27,33,.93)}}
:root[data-fx=lite]{--glass-fx:none;--stage:rgba(255,255,255,.94)}:root[data-fx=lite][data-night]{--stage:rgba(26,27,33,.93)}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
html{touch-action:pan-x pan-y;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow:hidden;background:radial-gradient(120% 95% at 50% 42%,var(--bg-hi),var(--bg-mid) 55%,var(--bg-lo));color:#fff;font-family:var(--font);font-feature-settings:"ss06";font-size:16px;line-height:1.5;letter-spacing:-.01em;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;letter-spacing:inherit}
button{margin:0;padding:0;border:0;background:none;color:inherit;cursor:pointer;word-break:keep-all}
button:disabled{opacity:.44;cursor:default}
h1,h2,p{margin:0}
:focus-visible{outline:2px solid #fff;outline-offset:2px}
.page :focus-visible,.pg-sheet :focus-visible,.ws-sheet :focus-visible,.detail-info :focus-visible,#app>.tabbar :focus-visible{outline-color:#1B6EF3}
.ic{flex:none;width:24px;height:24px;fill:currentColor;pointer-events:none}
.ic2 .ic-fill{opacity:.2}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#stage{position:fixed;inset:0;width:100%;height:100%;touch-action:none;outline:0}
#app{position:fixed;inset:0;pointer-events:none}
#app button,#app a,#app input,#app select,#app textarea,.page,.carousel{pointer-events:auto}
@keyframes breathe{to{opacity:.25;transform:scale(.7)}}
@keyframes ring{to{opacity:.2;transform:scale(1.12)}}

/* ---- buttons ---- */
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:52px;padding:0 20px;border-radius:26px;font-size:16px;font-weight:700;letter-spacing:-.015em;text-align:center;transition:transform .2s var(--spring),background .15s}
.primary{background:var(--accent);color:#fff}
.secondary{background:var(--fill);color:var(--ink)}
.primary:not(:disabled):active{background:#C41750;transform:scale(.97)}
.secondary:not(:disabled):active{background:var(--fill2);transform:scale(.97)}
.primary .ic,.secondary .ic{width:20px;height:20px}
.icon{position:relative;display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%}
/* an icon button over the stage is a disc of glass (the keys at the top right share one capsule of it); on a page it is the bare icon */
.details>.topbar .icon,.workshop>.topbar .icon{background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink)}
.stage-keys .icon{color:var(--stage-ink)}
.icon{transition:transform .2s var(--spring)}
.stage-keys .icon:active,.details>.topbar .icon:active,.workshop>.topbar .icon:active{transform:scale(.9)}
/* the glass itself: every piece that floats over the toy blurs what is behind it and stands a little off it */
.home-caption,.stage-keys,.details>.topbar .icon,.workshop>.topbar .icon,.tools,.dock,.clip-card,.received-ball,.switch-row button,.stage-name,body.clean .unclean{-webkit-backdrop-filter:var(--glass-fx);backdrop-filter:var(--glass-fx);box-shadow:var(--glass-shadow)}
.page .icon,.pg-sheet .icon{color:var(--ink)}
.page .icon:active,.pg-sheet .icon:active{background:var(--fill)}
.coin-chip{display:inline-flex;align-items:center;gap:5px;flex:none;min-height:44px;padding:0 14px 0 11px;border-radius:22px;background:var(--fill);color:var(--ink);font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.coin-chip .ic{width:20px;height:20px;color:var(--coin)}
.coin-price{display:inline-flex;align-items:center;gap:3px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.coin-price .ic{width:1.15em;height:1.15em;color:var(--coin)}

/* ---- the stage: what stands over the toy ---- */
.chrome{transition:opacity .2s}
.topbar{display:flex;align-items:center;gap:8px}
.actions{display:flex;gap:8px;flex:none;margin-left:auto}
.stage-head{position:absolute;top:max(12px,calc(var(--sat) + 8px));left:12px;right:12px;z-index:3;display:flex;align-items:flex-start;gap:8px;pointer-events:none}
/* left: the name, and under it what belongs to this toy right now (the keyboard's switches, a received ball's card). right: the keys, which never move */
.head-main{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
/* the name card: the toy's name, and one line of how to play until the first touch */
.home-caption{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;min-height:52px;padding:8px 16px;border-radius:24px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);pointer-events:none}
.home-caption>.icon{order:0;margin:-4px 0 -4px -10px}
.home-caption>.icon:active{background:var(--stage-soft)}
/* the name, and beside it a keyboard's switch choice; where the two do not fit one line the choice goes under the name (never a cut name) */
.cap-text{order:1;flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px 8px}
.cap-text h1{flex:0 0 auto;max-width:100%;font-size:17px;font-weight:800;letter-spacing:-.025em;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cap-text p{flex:0 0 100%;font-size:13px;line-height:1.45;color:var(--stage-ink2);text-wrap:balance}
.home-caption>.title-edit{order:2;margin:-4px -8px -4px 0;background:var(--stage-soft)}
.trial-chip{order:3;display:flex;align-items:center;gap:6px;flex:none;padding:6px 10px;border-radius:14px;background:var(--accent);color:#fff;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.trial-chip i{width:6px;height:6px;border-radius:50%;background:#fff;animation:breathe .8s alternate infinite}
.switch-pill{display:inline-flex;align-items:center;gap:3px;min-height:44px;margin:-4px -10px -4px 0;padding:0 10px 0 14px;border-radius:22px;background:var(--stage-soft);color:var(--stage-ink);font-size:13px;font-weight:600;white-space:nowrap}
.switch-pill .ic{width:16px;height:16px;transition:transform .2s}
.switch-pill[aria-expanded=true] .ic{transform:rotate(180deg)}
/* a browser visitor's way to the app (11/26): beside the toy's name, the same pill as a keyboard's switch choice, and under the name where the two do not fit one line. A link: the store opens over the page */
.store-chip{display:inline-flex;align-items:center;gap:4px;flex:none;min-height:44px;margin:-4px -8px -4px 0;padding:0 13px 0 10px;border-radius:22px;background:var(--stage-soft);color:var(--stage-ink);font-size:13px;font-weight:700;white-space:nowrap;text-decoration:none}
.store-chip .ic{width:16px;height:16px}
/* a keyboard already has its switch choice beside the name; a third thing there made three rows in English and Japanese and the two pills touched (11/26 audit), so on a keyboard the way to the app is the card in 나 */
.switch-pill+.store-chip{display:none}
.store-chip:active{background:var(--stage-line)}
a.primary{text-decoration:none}
.switch-row{align-self:stretch;display:flex;gap:6px;margin-left:-12px;padding:0 20px 0 12px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x;pointer-events:auto;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 20px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 20px),transparent)}
.switch-row::-webkit-scrollbar{display:none}
.switch-row button{flex:none;min-height:44px;min-width:48px;padding:0 16px;border-radius:22px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);font-size:14px;font-weight:600;white-space:nowrap}
.switch-row button.on{background:var(--stage-on);border-color:transparent;color:var(--stage-on-ink)}
.dev-note{align-self:flex-start;padding:2px 8px;border-radius:8px;background:var(--stage);font-size:12px;color:var(--stage-ink2)}
/* a ball that came by a link, or an example from 소셜: what it is and what can be done with it */
.received-ball{align-self:stretch;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:8px 8px 8px 16px;border-radius:24px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);font-size:14px;pointer-events:auto}
.received-ball span{min-width:0;flex:1 1 calc(100% - 60px);font-weight:700}
.received-ball span:lang(ko){word-break:keep-all}
.received-ball button{flex:1 1 auto;min-width:0;min-height:44px;padding:0 16px;border-radius:22px;background:var(--stage-on);color:var(--stage-on-ink);font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.received-ball button.reply{background:var(--accent);color:#fff}
.received-ball button[data-pg=gift-close],.received-ball button[data-pg=sample-close]{flex:0 0 44px;display:grid;place-items:center;width:44px;padding:0;background:none;color:var(--stage-ink)}
.received-ball .ic{width:20px;height:20px}
/* the keys: a column at the top right (화면만 보기, 영상 찍기, 새로 만들기) */
.stage-keys{flex:none;display:flex;flex-direction:column;gap:2px;padding:3px;border-radius:26px;background:var(--stage);border:1px solid var(--stage-line)}
.rec .ic{color:#EC2C4C}
.rec.on{background:#E0263F}
.rec.on::before{content:'';position:absolute;inset:-4px;border-radius:50%;border:2px solid #FF8A96;animation:ring .8s alternate infinite}
.rec-count{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:#fff}
/* the bottom: a finished clip, the tools, and on the home screen the person's toys over the tabs */
.stage-foot{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none}
.stage-foot:not(:has(.dock)){padding-bottom:calc(14px + var(--sab))}
.tools{display:flex;gap:2px;width:min(calc(100% - 24px),calc(var(--n,5)*70px + 2px));padding:4px;border-radius:30px;background:var(--stage);border:1px solid var(--stage-line);pointer-events:auto}
.tool{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:52px;padding:4px 0;border-radius:26px;color:var(--stage-ink2);transition:background .2s,color .2s,transform .2s var(--spring)}
.tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.tool span{max-width:100%;font-size:12px;font-weight:600;letter-spacing:-.03em;white-space:nowrap}
.tool.on{background:var(--stage-on);color:var(--stage-on-ink);box-shadow:0 4px 12px rgba(17,19,28,.2)}
.tool:active{transform:scale(.92)}
.clip-card{display:flex;align-items:center;gap:12px;width:min(calc(100% - 24px),352px);padding:10px;border-radius:26px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);pointer-events:auto}
.clip-card video{flex:none;width:64px;height:112px;object-fit:cover;border-radius:18px;background:#000}
.clip-card>div{flex:1;min-width:0}
.clip-card p{margin:0 0 10px;font-size:13px;line-height:1.5;color:var(--stage-ink2)}
.clip-card p b{font-size:15px;font-weight:700;color:var(--stage-ink)}
.clip-buttons{display:flex;gap:8px}
.clip-buttons .primary{flex:1;min-height:44px;padding:0 12px;font-size:14px;border-radius:22px}
.clip-buttons .primary.busy{opacity:1;gap:8px}
.clip-buttons .primary.busy i{width:6px;height:6px;border-radius:50%;background:#fff;animation:breathe .8s alternate infinite}
.clip-buttons .secondary{flex:none;width:44px;min-height:44px;padding:0;border-radius:22px;background:var(--stage-soft);color:var(--stage-ink)}
/* a short phone has no room for both: the clip card takes the tools' place until it is shared or closed */
@media(max-height:700px){.stage-foot:has(.clip-card) .tools{display:none}}
/* the dock: one card of glass, the toys over the tabs, floating clear of the edges like the tab bar of a page */
.dock{align-self:stretch;display:flex;flex-direction:column;margin:0 var(--float) calc(10px + var(--sab));border-radius:32px;background:var(--stage);border:1px solid var(--stage-line);overflow:hidden;pointer-events:auto}
.carousel{display:flex;align-items:center;gap:2px;padding:8px 10px 6px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.carousel::-webkit-scrollbar{display:none}
.carousel button{position:relative;flex:none;display:grid;place-items:center;width:60px;height:60px;border-radius:50%}
.thumb{display:block;width:48px;height:48px;border-radius:50%;overflow:hidden;background:var(--stage-soft);transition:transform .25s var(--spring),box-shadow .2s}
.carousel button:active .thumb{transform:scale(.9)}
.thumb img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.6)}
.pg-thumb{box-shadow:inset 0 -6px 9px #0000002a,inset 0 5px 8px #ffffff40}
.carousel .selected .thumb{box-shadow:0 0 0 2.5px var(--stage-solid),0 0 0 5px var(--accent)}
.carousel .selected .pg-thumb{box-shadow:inset 0 -6px 9px #0000002a,inset 0 5px 8px #ffffff40,0 0 0 2.5px var(--stage-solid),0 0 0 5px var(--accent)}
.today-pill{position:absolute;left:50%;bottom:0;transform:translateX(-50%);padding:0 7px;border-radius:9px;background:var(--accent);color:#fff;font-size:12px;font-style:normal;font-weight:700;letter-spacing:-.04em;line-height:1.5;white-space:nowrap;pointer-events:none}
.carousel .tray-more{width:48px;height:48px;margin:0 6px;border:1.5px dashed var(--stage-dash);color:var(--stage-ink)}
.tray-more .ic{width:22px;height:22px}
/* the tabs: 홈 · 상점 · 만들기 · 소셜 · 나. A capsule of glass that floats over the bottom of a page (the page scrolls on under it);
   on the home screen the same row is the lower half of the dock. The tab that is open has a soft lens behind its icon. The home
   indicator's inset is under the bar (its bottom offset), never inside it */
.tabbar{display:flex;align-items:stretch;height:var(--tabbar);padding:0 6px;pointer-events:auto}
#app>.tabbar{position:absolute;left:var(--float);right:var(--float);bottom:calc(10px + var(--sab));z-index:5;border-radius:31px;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.9);-webkit-backdrop-filter:var(--glass-fx);backdrop-filter:var(--glass-fx);box-shadow:0 12px 32px rgba(17,19,28,.14),0 0 0 1px rgba(17,19,28,.05)}
:root[data-fx=lite] #app>.tabbar{background:rgba(255,255,255,.96)}
.dock .tabbar{border-top:1px solid var(--stage-soft)}
.tab{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;padding-bottom:8px;color:var(--ink3);font-size:12px;font-weight:600;letter-spacing:-.02em;line-height:1.25;white-space:nowrap;transition:transform .2s var(--spring)}
.tab:active{transform:scale(.92)}
.tab .ic,.tab span,.tab i{position:relative}
.tab .ic{width:26px;height:26px}
.tab.on{color:var(--ink);font-weight:700}
.tab.on::before{content:'';position:absolute;left:50%;bottom:26px;width:54px;height:32px;margin-left:-27px;border-radius:16px;background:var(--fill)}
.tab.make{color:var(--ink)}
.dock .tab{color:var(--stage-ink2)}
.dock .tab.on,.dock .tab.make{color:var(--stage-ink)}
.dock .tab.on::before{background:var(--stage-soft)}
.tab.make i{display:grid;place-items:center;width:46px;height:30px;margin-bottom:-2px;border-radius:15px;background:var(--accent);color:#fff;font-style:normal;box-shadow:0 4px 12px rgba(225,29,88,.32)}
.tab.make i .ic{width:20px;height:20px}
.tab.make:active i{background:#C41750}
.tab.has-new::after{content:'';position:absolute;bottom:47px;left:calc(50% + 8px);width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--surface)}
.dock .tab.has-new::after{box-shadow:0 0 0 2px var(--stage-solid)}
/* 화면만 보기: everything over the toy steps away; one labelled button brings it back (a clip records only the canvas, so it is never in a video) */
body.clean .chrome{opacity:0;visibility:hidden;transition:opacity .2s,visibility 0s .2s}
.unclean{display:none}
body.clean .unclean{position:absolute;top:max(12px,calc(var(--sat) + 8px));right:12px;z-index:4;display:flex;align-items:center;gap:6px;height:44px;padding:0 16px 0 13px;border-radius:22px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);font-size:14px;font-weight:700}
body.clean .unclean .ic{width:20px;height:20px}
.stage-error{position:absolute;top:43%;left:20px;right:20px;transform:translateY(-50%);z-index:2;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;font-size:15px;color:#fff}
.stage-error p{padding:10px 16px;border-radius:20px;background:var(--stage);color:var(--stage-ink)}
.stage-error .secondary{min-width:140px;background:#fff;color:var(--ink)}
.loading-dot{position:fixed;left:50%;top:47%;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:#fff;animation:breathe .8s alternate infinite;pointer-events:none}
body[data-screen=shop] #stage,body[data-screen=settings] #stage,body[data-screen=doc] #stage,body[data-screen=pg] #stage,body[data-screen=pgCoins] #stage,body[data-screen=pgJoin] #stage,body[data-screen=pgUpload] #stage,body[data-screen=pgProfile] #stage,body[data-screen=pgActivity] #stage,body[data-screen=pgThread] #stage,body[data-screen=pgMe] #stage{visibility:hidden}

/* ---- pages ---- */
.page{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;padding:calc(8px + var(--sat)) 20px calc(32px + var(--sab));background:var(--surface);color:var(--ink)}
body[data-tabs="1"] .page{bottom:0;padding-bottom:calc(var(--tabs) + 28px + var(--sab))}
body[data-tabs="1"] :is(.pg-room-page,.pg-chatpage){bottom:calc(var(--tabs) + var(--sab));padding-bottom:12px}
/* the room behind a page is the page's own white (the stage is hidden there), so nothing dark shows around the floating bar */
body:has(#app>.page){background:var(--surface)}
/* while something is being typed on a page the keyboard has the bottom: the tabs step away and the page takes their room */
body:has(.page :is(input:not([type=range]):not([type=checkbox]),textarea):focus) #app>.tabbar{display:none}
body[data-tabs="1"]:has(.page :is(input:not([type=range]):not([type=checkbox]),textarea):focus) .page{bottom:0;padding-bottom:calc(32px + var(--sab))}
.page-header{display:flex;align-items:center;gap:6px;min-height:52px;margin-bottom:12px}
/* a page that was not on screen a moment ago (main.js pageEnter): what is under its title rises into place. The page's own sheet is there
   at once (it covers the stage: fading it would flash the toy between two pages) and the title (a chat's too) does not move. `translate`, not
   `transform`, so a child's own transform stays what it is. --enter-at is the short wait before the rise (main.js ENTER_HOLD: the phone
   draws the new page meanwhile, unseen), and negative when a redraw lands while the rise runs */
.page.enter>:not(.page-header,.pg-thread-head){animation:page-in .24s cubic-bezier(.2,.8,.2,1) var(--enter-at,0ms) backwards}
@keyframes page-in{from{opacity:0;translate:0 12px}}
.page-header h1{flex:1;min-width:0;font-size:30px;font-weight:800;letter-spacing:-.04em;line-height:1.2}
.page-header.pushed h1{font-size:18px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-back{margin-left:-12px}
.head-actions{display:flex;align-items:center;gap:4px;flex:none}
.intro{margin:0 0 16px;font-size:15px;line-height:1.55;color:var(--ink2)}
.empty{padding:48px 0;text-align:center;font-size:15px;line-height:1.6;color:var(--ink2)}
.operator-note{margin:0 0 12px;font-size:13px;color:var(--ink3)}
/* one of several: the shop's 장난감 · 배경 · 배경음, and 소셜's weekly view */
/* equal parts while every label fits its part; a label wider than that (English 'Backgrounds' on a 320 px phone) takes what it needs
   and the others share the rest, so no label runs into its neighbour */
.seg,.pg-seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(max-content,1fr);margin:0 0 16px}
.seg{border-bottom:1px solid var(--line)}
.seg button{position:relative;min-width:0;min-height:48px;padding:0 10px;color:var(--ink3);font-size:16px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}
.seg button[aria-selected=true]{color:var(--ink);font-weight:800}
.seg button[aria-selected=true]::after,.pg-tab.on::after{content:'';position:absolute;left:50%;bottom:-1px;width:44px;height:3px;margin-left:-22px;border-radius:3px 3px 0 0;background:var(--ink)}
.pg-seg{gap:2px;padding:4px;border-radius:26px;background:var(--fill)}
.pg-seg button{min-width:0;min-height:44px;padding:0 10px;border-radius:22px;color:var(--ink2);font-size:15px;font-weight:600;white-space:nowrap}
.pg-seg button[aria-selected=true]{background:var(--surface);color:var(--ink);font-weight:700;box-shadow:0 1px 3px rgba(22,23,27,.14)}
.filters{display:flex;gap:8px;margin:0 -20px 18px;padding:0 20px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.filters::-webkit-scrollbar{display:none}
.filter{flex:none;min-width:44px;min-height:44px;padding:0 16px;border-radius:22px;background:var(--fill);color:var(--ink2);font-size:14px;font-weight:600;white-space:nowrap}
.filter.active{background:var(--ink);color:#fff}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 12px}
.card{display:flex;flex-direction:column;min-width:0;text-align:left;color:var(--ink)}
.card-image{position:relative;display:block;aspect-ratio:1;margin-bottom:10px;border-radius:24px;overflow:hidden;background:var(--fill);transition:transform .15s}
.card:active .card-image{transform:scale(.96)}
.card-image img{display:block;width:100%;height:100%;object-fit:cover}
.card-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:15px;font-weight:700;letter-spacing:-.025em;line-height:1.35}
.card-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:2px;font-size:14px;line-height:1.4;color:var(--ink2)}
.card-state{display:flex;align-items:center;flex-wrap:wrap;gap:2px 4px;margin-top:6px;font-size:14px;font-weight:700;color:var(--ink)}
.card-state>.ic{width:16px;height:16px;color:var(--ink3)}
.card-state>.ic.on,.pg-actions .ic.on,.pg-likers .ic.on,.pg-mine-rank .ic,.pg-maker small .ic{color:var(--accent)}
.own{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:600;color:var(--ink3)}
.own .ic{width:14px;height:14px}
.badge{position:absolute;top:8px;left:8px;padding:2px 8px;border-radius:11px;background:#fff;color:var(--ink);font-size:12px;font-weight:700;line-height:1.5}
.badge.today{background:var(--accent);color:#fff}
.badge.on,.badge.rank{background:var(--ink);color:#fff;font-variant-numeric:tabular-nums}
.badge.sample,.pg-sample-tag,.sample-tag{background:#FFE08A;color:#4D3900}
.today-banner,.all-banner{display:flex;align-items:center;gap:12px;width:100%;min-height:68px;margin:0 0 10px;padding:10px 12px 10px 10px;border-radius:24px;text-align:left;color:var(--ink)}
.today-banner{background:var(--accent-soft)}
.all-banner{background:var(--fill)}
.all-banner+.filters,.today-banner+.filters{margin-top:16px}
.banner-thumb{flex:none;width:48px;height:48px;border-radius:50%;object-fit:cover}
.all-banner>.ic:first-child{width:28px;height:28px;margin:0 10px;color:var(--coin)}
.banner-text{flex:1;min-width:0;display:flex;flex-direction:column}
.today-tag{font-size:12px;font-weight:700;color:var(--accent-ink)}
.banner-text b{font-size:15px;font-weight:700;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.banner-text small{font-size:14px;line-height:1.4;color:var(--ink2)}
.today-banner>.ic:last-child,.all-banner>.ic:last-child{width:18px;height:18px;color:var(--ink3)}
/* 배경: three to a row, each a piece of the surface itself */
.bg-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px}
.bg-thumb{margin-bottom:8px;background-size:140%;background-position:center;background-blend-mode:multiply;box-shadow:inset 0 0 0 1px var(--sep)}
.bg-card.on .bg-thumb{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--ink)}
.bg-card .card-name{font-size:14px}
.bg-card .card-state{margin-top:2px;font-size:13px;font-weight:600;color:var(--ink3)}
.bg-card .coin-price{color:var(--ink)}
/* 배경음: a row each: what it is, a 15-second listen, and the switch (or the price) */
.amb-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.amb-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto auto;grid-template-areas:"ico name try use" "ico note note note";align-items:center;column-gap:10px;padding:12px;border-radius:24px;background:var(--fill)}
.amb-row.on{background:var(--accent-soft)}
.amb-ico{grid-area:ico;align-self:start;display:grid;place-items:center;width:44px;height:44px;border-radius:16px;background:var(--surface);color:var(--ink)}
/* each sound in its own colour (11/14): ten grey tiles and ten pink buttons in a column read as one block; now colour says which sound, and pink only says which one is on */
:is(.amb-ico,.me-amb)[data-a=rain]{background:#E1EDFB;color:#245FAE}:is(.amb-ico,.me-amb)[data-a=waves]{background:#DAF2F3;color:#0F6B75}:is(.amb-ico,.me-amb)[data-a=forest]{background:#DFF2E2;color:#28743B}
:is(.amb-ico,.me-amb)[data-a=stream]{background:#DBF0FA;color:#196891}:is(.amb-ico,.me-amb)[data-a=cafe]{background:#F2E7DC;color:#76502E}:is(.amb-ico,.me-amb)[data-a=fountain]{background:#F8E3EA;color:#97324F}:is(.amb-ico,.me-amb)[data-a=bamboo]{background:#EAF3D6;color:#4D6B12}:is(.amb-ico,.me-amb)[data-a=waterfall]{background:#DDF4EC;color:#1E6B55}
.amb-row.on .amb-ico{background:var(--accent);color:#fff}
.amb-main{display:contents}
.amb-main b{grid-area:name;min-width:0;font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.amb-main small{grid-area:note;margin-top:2px;font-size:14px;line-height:1.4;color:var(--ink2)}
.amb-row.on .amb-main small{color:var(--accent-ink);font-weight:600}
.amb-try{grid-area:try;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--surface);color:var(--ink)}
.amb-try[aria-pressed=true]{background:var(--ink);color:#fff}
.amb-try .ic{width:18px;height:18px}
.amb-use{grid-area:use;min-width:72px;min-height:44px;padding:0 14px;border-radius:22px;font-size:14px}
.amb-row .secondary{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.setting.amb-volume{padding:8px 16px;border:0;border-radius:24px;background:var(--fill)}
/* the narrowest phones (320 px): the fixed parts give way so that a name such as 'Summer night' is not cut; a longer one takes two lines */
@media(max-width:350px){.seg button{padding:0 6px}.bg-cards{gap:16px 8px}.bg-card .card-name{font-size:13px}.amb-row{grid-template-columns:36px minmax(0,1fr) auto auto;column-gap:8px;padding:10px}.amb-ico{width:36px;height:36px;border-radius:13px}.amb-use{min-width:60px;padding:0 10px}.amb-main b{font-size:15px;line-height:1.25;white-space:normal}}

/* ---- 나, and every list of settings ---- */
.me-card{display:flex;align-items:center;gap:14px;width:100%;padding:16px;border-radius:24px;background:var(--fill);color:var(--ink);text-align:left}
.me-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.me-main b{font-size:18px;font-weight:800;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-main small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;line-height:1.45;color:var(--ink2)}
.me-card>.ic,.me-coins>.ic:last-child,.setting.go>.ic{width:18px;height:18px;color:var(--ink3)}
.me-card.out{flex-wrap:wrap}
.me-card.out .me-main b{white-space:normal}
.me-card.out .primary{flex:1 1 100%;min-height:48px}
/* the app, for a browser visitor (11/26): what the app adds may take a third line, and under a profile card it keeps the gap the coin row keeps */
.store-card .me-main small{-webkit-line-clamp:4}
.me-card+.store-card,.me-coins+.store-card{margin-top:8px}
.me-coins{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;margin-top:8px;padding:0 16px;border-radius:24px;background:var(--fill);color:var(--ink);font-size:16px;font-weight:600;text-align:left}
.me-coins>.ic:first-child{width:22px;height:22px;color:var(--coin)}
.me-coins span{flex:1;min-width:0}
.me-coins b{font-weight:800;font-variant-numeric:tabular-nums}
.group{margin:26px 4px 8px;font-size:14px;font-weight:700;color:var(--ink2)}
.group-box{border-radius:24px;background:var(--fill);overflow:hidden}
/* 꾸미기 on 나: the background and the sound that are on, as two pictures side by side (main.js styleTile) */
.me-style{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.me-tile{display:flex;flex-direction:column;min-width:0;padding:0;border-radius:24px;background:var(--fill);color:var(--ink);text-align:left;overflow:hidden}
.me-tile:active{background:var(--fill2)}
.me-pic{display:grid;place-items:center;height:88px;margin:0;box-shadow:none}
.me-pic.bg-thumb{background-size:cover;background-position:center}
.me-amb{background:var(--fill2);color:var(--ink3)}.me-amb .ic{width:32px;height:32px}
.me-tile-text{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 14px 12px}
.me-tile-text small{font-size:14px;color:var(--ink2)}
.me-tile-text b{font-size:16px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.setting{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:60px;padding:8px 0;border-bottom:1px solid var(--line);color:var(--ink);text-align:left}
.group-box>.setting{min-height:64px;padding:8px 16px;border-bottom:0}
.group-box>.setting+.setting{box-shadow:inset 0 1px 0 var(--sep)}
.setting label,.setting-title{flex:1;min-width:0;font-size:16px;font-weight:600}
.setting small{display:block;margin-top:2px;font-size:14px;font-weight:400;line-height:1.45;color:var(--ink2);text-wrap:pretty}
.setting.go:active{background:var(--fill2)}
.setting button{flex:none;min-width:48px;min-height:44px;padding:0 14px;border-radius:22px;background:var(--fill);color:var(--ink);font-size:14px;font-weight:700;white-space:nowrap}
.group-box .setting button{background:var(--surface)}
.setting input[type=range]{-webkit-appearance:none;appearance:none;flex:none;width:148px;height:44px;margin:0;background:none;accent-color:var(--accent);cursor:pointer}
.setting input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--accent) var(--p,50%),#D5D8E0 var(--p,50%))}
.setting input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-9px;border-radius:50%;background:#fff;box-shadow:0 0 0 .5px rgba(17,19,28,.08),0 2px 6px rgba(17,19,28,.24)}
.setting input[type=range]::-moz-range-track{height:8px;border-radius:4px;background:#D5D8E0}
.setting input[type=range]::-moz-range-progress{height:8px;border-radius:4px;background:var(--accent)}
.setting input[type=range]::-moz-range-thumb{width:26px;height:26px;border:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(17,19,28,.24)}
.setting input[type=checkbox]{-webkit-appearance:none;appearance:none;position:relative;flex:none;width:52px;height:44px;margin:0;border:0;background:none;cursor:pointer}
.setting input[type=checkbox]::before{content:'';position:absolute;left:0;right:0;top:7px;height:30px;border-radius:15px;background:#868C9B;transition:background .15s}
.setting input[type=checkbox]::after{content:'';position:absolute;left:3px;top:10px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .15s}
.setting input[type=checkbox]:checked::before{background:var(--accent)}
.setting input[type=checkbox]:checked::after{transform:translateX(22px)}
.setting select{-webkit-appearance:none;appearance:none;flex:none;max-width:58%;min-height:44px;padding:0 34px 0 12px;border:1px solid var(--line);border-radius:22px;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4F5C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/14px;color:var(--ink);font-size:15px;font-weight:600;text-overflow:ellipsis}
.settings-footer{margin-top:28px;font-size:12px;line-height:1.8;color:var(--ink3)}
summary.settings-footer{min-height:44px;cursor:pointer}
.dev-items{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.dev-items button{min-height:44px;padding:0 12px;border-radius:22px;background:var(--fill);color:var(--ink);font-size:13px}
/* privacy, terms and support, read inside the app */
.doc-body{padding:2px 0 40px;font-size:15px;line-height:1.7;color:var(--ink);-webkit-user-select:text;user-select:text}
.doc-body h2{margin:24px 0 6px;font-size:16px;font-weight:700}
.doc-body p,.doc-body li{margin:6px 0;color:var(--ink2)}
.doc-body ul{margin:6px 0;padding-left:18px}
.doc-body .meta{font-size:13px;color:var(--ink3)}
.doc-body table{width:100%;margin:8px 0;border-collapse:collapse;font-size:14px}
.doc-body th,.doc-body td{padding:7px 8px;border:1px solid var(--line);text-align:left;vertical-align:top;color:var(--ink2)}
.doc-body th{background:var(--fill);color:var(--ink)}
.doc-link{display:inline;padding:0;border:0;background:none;color:var(--accent-ink);font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}

/* ---- a toy's page, a background's page, a ball on 소셜: the live toy above, a white sheet below ---- */
.details{position:absolute;inset:0;pointer-events:none}
.details>.topbar{position:absolute;top:max(12px,calc(var(--sat) + 8px));left:12px;right:12px;z-index:3}
.detail-info{position:absolute;left:0;right:0;bottom:0;padding:24px 22px calc(18px + var(--sab));border-radius:32px 32px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -8px 28px rgba(0,0,0,.2);pointer-events:auto}
.detail-info h1{font-size:22px;font-weight:800;letter-spacing:-.035em;line-height:1.25;overflow-wrap:anywhere}
.detail-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tag{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:13px;background:var(--fill);color:var(--ink2);font-size:13px;font-weight:600}
.tag.on{background:var(--accent-soft);color:var(--accent-ink)}
.tag .coin-price{color:var(--ink)}
.detail-info>p{max-width:34em;margin:10px 0 0;font-size:15px;line-height:1.55;color:var(--ink2)}
.detail-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.detail-buttons>button{flex:1 1 auto;padding-left:14px;padding-right:14px;white-space:nowrap}
.all-link{display:flex;align-items:center;min-height:44px;margin-top:6px;padding:0 2px;color:var(--accent-ink);font-size:14px;font-weight:700;text-align:left}
.detail-info>.trial-copy{margin-top:8px;font-size:13px;line-height:1.5;color:var(--ink3);text-wrap:balance;word-break:keep-all}
.all-link+.trial-copy{margin-top:0}

/* ---- 나만의 공방: a white sheet under the live ball ---- */
.workshop{position:absolute;inset:0;pointer-events:none}
.workshop>.topbar{position:absolute;top:max(12px,calc(var(--sat) + 8px));left:12px;right:12px;z-index:3}
.stage-name{min-height:44px;display:flex;align-items:center;padding:0 16px;border-radius:22px;background:var(--stage);border:1px solid var(--stage-line);color:var(--stage-ink);font-size:15px;font-weight:800;letter-spacing:-.02em;white-space:nowrap}
.ws-sheet{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:10px;padding:14px 18px calc(14px + var(--sab));border-radius:32px 32px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -8px 28px rgba(0,0,0,.2);pointer-events:auto}
.ws-sheet>*{flex:none}
.ws-tabs{display:flex;gap:6px;margin:0 -18px;padding:0 18px 2px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
/* the fade at the far end only while something waits there (playground.js edgeFade): always on, it made the last tab, colour or line look cut */
.ws-tabs[data-more="1"],.ws-row[data-more="1"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
.ws-tabs[data-back="1"],.ws-row[data-back="1"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px);mask-image:linear-gradient(90deg,transparent,#000 28px)}
.ws-tabs[data-back="1"][data-more="1"],.ws-row[data-back="1"][data-more="1"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 28px),transparent)}
.ws-tabs::-webkit-scrollbar,.ws-row::-webkit-scrollbar,.ws-saved::-webkit-scrollbar{display:none}
.ws-tabs .filter{flex:1 0 auto;padding:0 8px}
/* the last rows fade under the name bar, so a panel that scrolls says so (11/6, persona QA) */
.ws-panel{height:clamp(150px,27vh,250px);overflow-y:auto;overscroll-behavior:contain;margin:0 -5px;padding:4px 5px 20px}
.ws-panel[data-more="1"]{-webkit-mask-image:linear-gradient(#000 calc(100% - 22px),transparent);mask-image:linear-gradient(#000 calc(100% - 22px),transparent)}
.ws-panel[data-tab=media]{height:clamp(176px,31vh,252px)}
.ws-label{margin:4px 0 8px;font-size:14px;font-weight:600;color:var(--ink2)}
.ws-label b{margin-left:6px;font-weight:700;color:var(--ink)}
.ws-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px 4px;justify-items:center}
.ws-row{display:flex;gap:8px;padding:4px 3px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.sw{position:relative;flex:none;width:44px;height:44px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001f,inset 0 -7px 10px #00000012,inset 0 7px 10px #ffffff48}
.sw.on{outline:2px solid var(--ink);outline-offset:2px}
.sw.none{background:var(--surface);box-shadow:inset 0 0 0 1px #0000002e}
.sw.none::after{content:'';position:absolute;left:9px;right:9px;top:21px;height:2px;border-radius:2px;background:var(--ink3);transform:rotate(-45deg)}
.ws-chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:6px}
/* chips that do not fit one line stand in even rows (five: three and two), set by playground.js evenChips: never four and one left alone */
.ws-chips.rows{display:grid}.ws-chips.rows .filter{min-width:0;padding:0 8px}
.ws-link{min-width:44px;min-height:44px;padding:0 6px;color:var(--accent-ink);font-size:14px;font-weight:600}
.ws-hint,.pg-hint{margin:8px 0 0;font-size:14px;line-height:1.5;color:var(--ink2)}
.pg-hint{margin:0}
.ws-hint.warn,.pg-hint.warn{color:var(--bad)}
.ws-foot{display:flex;align-items:center;gap:8px}
.ws-foot input{flex:1;min-width:0;height:48px;padding:0 12px;border:1px solid var(--line);border-radius:24px;background:var(--fill);color:var(--ink);font-size:15px;-webkit-user-select:text;user-select:text}
.ws-foot input:focus{border-color:var(--ink);background:var(--surface)}
.ws-sheet .secondary{flex:none;min-height:48px;padding:0 14px;font-size:14px}
.ws-play{flex:none;min-height:48px;padding:0 20px;border-radius:24px;background:var(--accent);color:#fff;font-size:15px;font-weight:700}
.ws-saved{display:flex;gap:10px;padding-bottom:4px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.ws-ball{flex:none;display:flex;flex-direction:column;align-items:center;gap:3px;width:76px;font-size:13px}
.ws-ball span{max-width:76px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-thumb{position:relative;width:56px;height:56px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001f}
.ws-ball.on .ws-thumb{outline:2px solid var(--ink);outline-offset:2px}
.ws-thumb.snd::after{content:'\266A';position:absolute;right:-3px;bottom:-3px;width:20px;height:20px;border-radius:50%;background:var(--ink);color:#fff;font-size:12px;line-height:20px;text-align:center}
.ws-x{min-width:44px;min-height:44px;padding:0 6px;color:var(--ink2);font-size:13px;white-space:nowrap}
.ws-code{display:flex;align-items:stretch;gap:8px}
/* the link to a friend is two buttons: send (the share sheet) and copy; the address itself is not shown (11/14 review: a raw URL in a box) */
.ws-send{display:flex;gap:8px}.ws-send .primary{flex:1;min-width:0;min-height:48px;padding:0 14px;font-size:15px}.ws-send .ic{width:18px;height:18px}
.ws-code input,.ws-code textarea{flex:1;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:var(--fill);color:var(--ink);font:12px/1.5 ui-monospace,Menlo,monospace;resize:none;-webkit-user-select:text;user-select:text}
.ws-code-backup{margin-top:8px;font-size:13px;color:var(--ink2)}
.ws-code-backup summary{display:flex;align-items:center;min-height:44px;cursor:pointer}
.ws-code-backup input{width:100%;padding:10px;border:1px solid var(--line);border-radius:14px;font:12px/1.5 ui-monospace,Menlo,monospace;-webkit-user-select:text;user-select:text}
/* 사진·소리: two rows (photo, sound) that fit 360px; labels never break inside a word */
.ws-media{display:flex;align-items:center;gap:10px;margin:2px 0 8px}
.ws-pic{flex:none;width:52px;height:52px;padding:0;border-radius:50%;background:var(--fill) center/cover;box-shadow:inset 0 0 0 1px #0000001f}
.ws-pic.empty{border:1.5px dashed #A9AEBB;box-shadow:none}
.ws-playbtn{display:flex;align-items:center;justify-content:center;border:0;background:var(--ink);color:#fff}
.ws-media-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;line-height:1.4}
.ws-media-text b{font-size:14px;font-weight:700;color:var(--ink)}
.ws-media-text span{font-size:13px;color:var(--ink2)}
.ws-media .secondary{white-space:nowrap}
.ws-media .secondary.on{background:var(--bad-bg);color:var(--bad)}
.ws-allow{width:100%;margin-top:8px;white-space:nowrap}
.ws-pan{display:flex;align-items:center;gap:12px;padding:2px 2px 10px 56px}
.ws-pan label{font-size:13px;color:var(--ink2);white-space:nowrap}
.ws-pan input{flex:1;min-width:0;min-height:44px;accent-color:var(--accent)}
.ws-share{align-items:center}
.ws-share .ws-hint{flex:1;margin:0}

/* ---- 소셜 ---- */
.pg-bar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.pg-up{display:flex;align-items:center;justify-content:center;gap:6px;flex:1 1 0;min-width:0;min-height:44px;padding:0 12px;border-radius:22px;background:var(--accent);color:#fff;font-size:15px;font-weight:700;white-space:nowrap}
.pg-up .ic{width:20px;height:20px}
.pg-up.pg-me{background:var(--fill);color:var(--ink)}
.pg-tabs{display:flex;margin:0 0 14px;border-bottom:1px solid var(--line)}
.pg-tab{position:relative;flex:1;min-height:48px;padding:0 6px;color:var(--ink3);font-size:16px;font-weight:600;letter-spacing:-.02em}
.pg-tab.on{color:var(--ink);font-weight:800}
.pg-dot{position:absolute;top:12px;width:8px;height:8px;margin-left:5px;border-radius:50%;background:var(--accent)}
.pg-image{display:grid;place-items:center}
.pg-ball{display:block;width:76%;aspect-ratio:1;border-radius:50%;box-shadow:inset 0 -14px 22px #0000002a,inset 0 12px 18px #ffffff40,0 12px 20px #00000026}
.pg-ball.big{width:132px}
.pg-cc{display:inline-flex;align-items:center;gap:2px;margin-left:6px;white-space:nowrap}
.pg-cc .ic{width:16px;height:16px;color:var(--ink3)}
.pg-card .card-state{font-weight:600;color:var(--ink2)}
/* 예시 작품: the board's examples while a list is empty */
.pg-empty-line{padding:4px 0 14px}
.pg-sample-note{margin:0 0 20px;padding:12px 14px;border-radius:18px;background:var(--fill);color:var(--ink2);font-size:14px;line-height:1.6}
.pg-sample-tag,.sample-tag{display:inline-block;margin-right:4px;padding:1px 8px;border-radius:8px;font-size:12px;font-weight:700;line-height:1.6;vertical-align:1px}
.pg-more,.pg-text{display:block;min-height:44px;margin:20px auto 0;padding:0 18px;border-radius:22px;background:var(--fill);color:var(--ink);font-size:14px;font-weight:700}
.pg-log .pg-older{margin:2px auto 12px}
.pg-av{display:block;flex:none;width:var(--s,36px);height:var(--s,36px);border-radius:50%;box-shadow:inset 0 -5px 8px #0000002a,inset 0 4px 7px #ffffff40,0 0 0 1px #0000001a}
.pg-av.sample{border:1.5px dashed #A9AEBB;background:var(--fill);box-shadow:none}
.pg-state{padding:36px 0}
.pg-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.pg-row>.pg-wide{flex:1 1 140px;width:auto}
.pg-wide{display:flex;width:100%;min-height:52px}
/* signed out: the way in stands first, the rules and the sign-in buttons it leads to are further down */
.pg-jump .ic{width:18px;height:18px}
.pg-jump-note{margin:8px 0 20px;text-align:center;font-size:13px;color:var(--ink2)}
.pg-conn{margin:0 0 6px;padding:8px 10px;border-radius:14px;background:var(--bad-bg);color:var(--bad);font-size:13px;text-align:center}
.pg-h2{margin:28px 0 4px;font-size:17px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.pg-h2.first{margin-top:6px}
.pg-warn{margin:0 0 16px;padding:12px 14px;border-radius:18px;background:var(--warn-bg);color:var(--warn-ink);font-size:14px;line-height:1.6}
.pg-notes{margin:18px 0 0;padding-left:18px;font-size:13px;line-height:1.7;color:var(--ink2)}
.pg-notes li{margin:4px 0}
.pg-rules{font-size:14px;color:var(--ink2)}
.pg-upload{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 0 18px}
.pg-upload b{margin-top:10px;font-size:18px;font-weight:800}
.pg-upload small{font-size:13px;color:var(--ink2)}
.pg-wallet{display:grid;grid-template-columns:auto auto 1fr;align-items:baseline;gap:4px 8px;padding:20px 18px 18px;border-radius:24px;background:var(--ink);color:#fff}
.pg-wallet .ic{align-self:center;width:28px;height:28px;color:#FFC533}
.pg-wallet b{font-size:34px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.pg-wallet span{font-size:14px;color:#C9CDD6}
.pg-wallet small{grid-column:1/-1;font-size:13px;color:#C9CDD6}
.setting .pg-price{min-width:86px;background:var(--fill)}
.pg-linked{min-width:86px;text-align:center;font-size:14px;color:var(--ink2)}
.pg-coin-total{font-weight:800;font-variant-numeric:tabular-nums}
.pg-login{display:flex;flex-direction:column;gap:10px;margin:18px 0 6px}
.pg-sso{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;padding:0 16px;border-radius:26px;font-size:16px;font-weight:700;letter-spacing:-.01em}
.pg-sso svg{flex:none;width:22px;height:22px}
.pg-sso small{font-size:12px;font-weight:500;opacity:.8}
.pg-sso.google{background:#fff;color:#3c4043;border:1px solid #D0D4DC}
.pg-sso.kakao{background:#fee500;color:#000000d9;border:1px solid #fee500}
.pg-sso.kakao svg{fill:#000}
.pg-sso.apple{background:#000;color:#fff;border:1px solid #000}
.pg-sso.apple svg{fill:#fff}
/* 출석 선물: a card over the board until it is taken or put away */
/* the attendance gift: as wide as its words up to the screen (left/right + fit-content: with left:50% it could only use half the screen).
   Where the line and the chip do not fit side by side (Japanese on a 360 px phone) the chip goes under the line, and the close button
   stays on screen. pg-hub.js measures the bar's height into --gift-h for the toast and the page's bottom room */
.pg-gift{position:fixed;left:16px;right:16px;bottom:calc(var(--tabs) + 12px + var(--sab));z-index:6;width:fit-content;margin:0 auto;display:flex;align-items:center;border-radius:26px;background:var(--ink);color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.24);pointer-events:auto;transition:opacity .2s,transform .2s}
.pg-gift button{min-height:52px;color:inherit}
.pg-gift-take{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-width:0;padding:8px 4px 8px 16px;font-size:14px;line-height:1.3;text-align:left}
.pg-gift-take b{font-weight:600}
.pg-gift-take span{flex:none;padding:6px 12px;border-radius:14px;background:var(--accent);color:#fff;font-weight:700;white-space:nowrap}
.pg-gift-close{flex:none;align-self:stretch;display:grid;place-items:center;width:44px}
.pg-gift-close .ic{width:18px;height:18px}
/* the board always has the tab bar under it, and that rule (body[data-tabs="1"] .page, 32 px) is more specific than .pg-page:has() alone:
   until 11/14 this room never applied and the last card of the list stayed under the bar */
body[data-tabs="1"] .pg-page:has(.pg-gift){padding-bottom:calc(var(--tabs) + 40px + var(--gift-h,52px) + var(--sab))}
/* 로그인하고 시작하기 scrolls to the rules: not up under the status bar */
#pg-join-rules{scroll-margin-top:calc(var(--sat) + 20px)}
/* a ball's page: who made it, what can be done, and the comments sheet */
.pg-uploader{display:flex;align-items:center;gap:9px;max-width:100%;min-height:44px;margin:-6px 0 4px;color:var(--ink2);font-size:14px;font-weight:600;text-align:left}
.pg-uploader .ic{width:14px;height:14px;color:var(--ink3)}
.pg-uploader-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-actions{display:flex;flex-wrap:wrap;gap:0 16px;margin-top:8px}
.pg-actions button{display:flex;align-items:center;gap:5px;min-height:44px;padding:0 2px;color:var(--ink2);font-size:14px;font-weight:600}
.pg-actions .ic{width:20px;height:20px}
.pg-reasons{display:flex;flex-wrap:wrap;gap:7px;margin-top:4px}
.pg-detail.sheet-open .detail-info{visibility:hidden}
.pg-sheet{position:absolute;left:0;right:0;bottom:0;z-index:6;display:flex;flex-direction:column;height:min(62%,520px);padding:12px 18px calc(10px + var(--sab));border-radius:32px 32px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -8px 28px rgba(0,0,0,.2);pointer-events:auto}
.pg-sheet-head{flex:none;display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.pg-sheet-head h2{font-size:18px;font-weight:800;letter-spacing:-.03em}
.pg-sheet-head .icon{margin-right:-10px}
.pg-sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-user-select:text;user-select:text}
.pg-sheet-foot{margin:8px 0 0;padding-top:8px;border-top:1px solid var(--line);font-size:13px;line-height:1.55;color:var(--ink2)}
/* 채팅방: the head and the tabs stay, only the log scrolls, the input sits at the bottom */
.pg-room-page,.pg-chatpage{display:flex;flex-direction:column;overflow:hidden}
.pg-room-page>.page-header,.pg-room-page>.pg-tabs,.pg-chatpage>*{flex:none}
.pg-room{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.pg-log{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:4px 0 12px;-webkit-user-select:text;user-select:text}
.pg-chatpage>.pg-log{flex:1 1 auto}
/* 11/8: the on-screen keyboard leaves ~460px. Then the room keeps the conversation in view: the title shrinks, the tabs tighten and the
   house notice folds to its head unless the person opened it themselves */
@media(max-height:560px){.pg-room-page>.page-header{min-height:44px;margin-bottom:4px}.pg-room-page>.page-header h1{font-size:20px}
 .pg-room-page>.pg-tabs{margin-bottom:6px}.pg-room-page>.pg-tabs button,.pg-room-page>.pg-tabs [role=tab]{min-height:44px}
 .pg-notice.auto .pg-notice-lines{display:none}.pg-notice.auto .pg-chev{transform:none}.pg-notice{margin-bottom:4px}
 .pg-compose{padding-top:6px}.pg-compose-meta{min-height:0}}
.pg-notice{flex:none;margin:0 0 6px;border-radius:18px;background:var(--fill)}
.pg-notice-head{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:0 12px;color:var(--ink);text-align:left}
.pg-notice-tag{padding:1px 8px;border-radius:8px;background:var(--ink);color:#fff;font-size:12px;font-weight:700;line-height:1.7}
.pg-notice-by{flex:1;font-size:14px;font-weight:700}
.pg-chev{width:18px;height:18px;color:var(--ink3);transition:transform .2s}
.pg-chev.open{transform:rotate(180deg)}
.pg-notice-lines{margin:0;padding:0 14px 12px 30px;font-size:14px;line-height:1.65;color:var(--ink2)}
.pg-notice-lines li{margin:3px 0}
.pg-msg{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr) auto;column-gap:4px;align-items:start;padding:7px 0}
.pg-msg>.pg-av{justify-self:center;margin-top:4px}
.pg-who{display:grid;place-items:start center;min-width:44px;min-height:44px;line-height:0}
.pg-msg-main{min-width:0;padding-top:2px}
.pg-msg-main header{display:flex;align-items:baseline;gap:8px;min-width:0;margin-bottom:2px}
.pg-name{min-width:0;max-width:62%;min-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:14px;font-weight:700;text-align:left}
.pg-msg.mine .pg-name{color:var(--accent-ink)}
.pg-msg time,.pg-bubble time{font-size:12px;color:var(--ink3);font-variant-numeric:tabular-nums;white-space:nowrap}
.pg-msg p,.pg-bubble p{font-size:15px;line-height:1.5;color:var(--ink);overflow-wrap:anywhere;white-space:pre-wrap}
.pg-gone{color:var(--ink3)!important}
.pg-msg.sample .pg-msg-main{padding-top:8px}
.pg-msg.sample .pg-msg-main p{color:var(--ink2)}
.pg-msg.sample .sample-tag{margin-right:6px}
.pg-more-btn{display:grid;place-items:center;width:44px;height:44px;margin:-6px 0;color:var(--ink3)}
.pg-dots{width:20px;height:20px}
.pg-menu{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:6px;padding:4px 0 2px}
.pg-chip{min-height:44px;padding:0 14px;border-radius:22px;background:var(--fill);color:var(--ink);font-size:14px;font-weight:600}
.pg-chip.quiet{background:none;color:var(--ink3)}
.pg-profile>.pg-menu{justify-content:flex-end;margin-bottom:6px}
.pg-examples{padding:2px 0}
.pg-examples .pg-sample-note{margin:0 0 8px}
.pg-compose{flex:none;padding:8px 0 calc(6px + var(--sab));border-top:1px solid var(--line);background:var(--surface)}
body[data-tabs="1"] .pg-compose{padding-bottom:6px}
.pg-compose-row{display:flex;align-items:flex-end;gap:8px}
.pg-input{flex:1;min-width:0;min-height:44px;max-height:120px;padding:10px 12px;border:1px solid transparent;border-radius:22px;background:var(--fill);color:var(--ink);font-size:15px;line-height:1.4;resize:none;-webkit-user-select:text;user-select:text}
.pg-input:focus-visible{outline:0;border-color:var(--ink);background:var(--surface)}
.pg-send{flex:none;display:flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:22px;background:var(--accent);color:#fff;font-size:14px;font-weight:700}
.pg-send .ic{width:18px;height:18px}
.pg-compose-meta{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;min-height:20px;margin:5px 2px 0}
.pg-compose-meta .pg-count,.pg-field .pg-count{position:static;min-width:0;height:auto;padding:0;border-radius:0;background:none;box-shadow:none;color:var(--ink3);font-size:12px;font-weight:400;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap}
.pg-compose-meta .pg-count.over,.pg-field .pg-count.over{color:var(--bad);font-weight:700}
.pg-gate,.pg-howto{padding:20px 18px;border-radius:24px;background:var(--fill)}
.pg-gate h2,.pg-howto h2{margin:0 0 8px;font-size:18px;font-weight:800;letter-spacing:-.03em}
.pg-gate p,.pg-howto p{margin:0 0 12px;font-size:15px;line-height:1.6;color:var(--ink2)}
.pg-gate p.pg-gate-note{font-size:13px;color:var(--ink3)}
.pg-gate .secondary,.pg-howto .secondary{background:var(--surface)}
.pg-steps{margin:0 0 16px;padding-left:20px;font-size:15px;line-height:1.8;color:var(--ink2)}
/* 메시지: the list of conversations, and one conversation */
.pg-threads{display:flex;flex-direction:column}
.pg-thread-row{display:flex;align-items:center;gap:12px;width:100%;min-height:68px;padding:10px 2px;border-bottom:1px solid var(--line);color:var(--ink);text-align:left}
.pg-thread-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pg-thread-main b{font-size:16px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-thread-main small{font-size:14px;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-thread-side{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.pg-thread-side time{font-size:12px;color:var(--ink3)}
.pg-unread{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--accent);color:#fff;font-size:12px;font-style:normal;font-weight:700;line-height:20px;text-align:center}
.pg-thread-head{display:flex;align-items:center;gap:4px;min-height:52px;margin-bottom:8px}
.pg-thread-head>.icon{margin-left:-12px}
.pg-who-head{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:48px;padding:0 4px;color:var(--ink);font-size:17px;text-align:left}
.pg-who-head b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.pg-who-head .ic{width:16px;height:16px;margin-left:auto;color:var(--ink3)}
.pg-bubble{display:flex;flex-wrap:wrap;align-items:flex-end;gap:2px;padding:3px 0}
.pg-bubble.mine{justify-content:flex-end}
.pg-bubble-body{max-width:78%;padding:9px 13px 7px;border-radius:18px 18px 18px 6px;background:var(--fill)}
.pg-bubble.mine .pg-bubble-body{border-radius:18px 18px 6px 18px;background:var(--accent)}
.pg-bubble.mine p{color:#fff}
.pg-bubble.mine time{color:#fff}
.pg-bubble time{display:block;margin-top:2px;text-align:right}
.pg-bubble .pg-more-btn{margin:0 0 0 -4px}
.pg-bubble.mine .pg-more-btn{order:-1;margin:0 -4px 0 0}
.pg-bubble .pg-menu{flex:1 0 100%;grid-column:auto}
.pg-bubble.mine .pg-menu{justify-content:flex-end}
/* 프로필 */
.pg-prof-top{display:flex;align-items:center;justify-content:space-between;min-height:52px;margin-bottom:4px}
.pg-prof-top>.icon:first-child{margin-left:-12px}
.pg-prof-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 0 14px;text-align:center}
.pg-prof-card h1{margin:6px 0 0;font-size:22px;font-weight:800;letter-spacing:-.035em;overflow-wrap:anywhere}
.pg-bio{max-width:30em;font-size:15px;line-height:1.6;color:var(--ink2);overflow-wrap:anywhere}
.pg-bio.dim{color:var(--ink3)}
.pg-stats{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);margin:0 0 16px;border-radius:24px;background:var(--fill)}
.pg-stat{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 4px}
.pg-stat b{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.pg-stat span{font-size:13px;line-height:1.3;color:var(--ink2);text-align:center}
.pg-profile .cards{margin-top:12px}
.pg-rank-chip{margin:2px 0 0;padding:4px 10px;border-radius:8px;background:var(--ink);color:#fff;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
/* 내 정보: the profile card and editing it */
.pg-me-card{display:flex;align-items:center;gap:14px;padding:6px 0 14px}
.pg-me-main{min-width:0;display:flex;flex-direction:column;gap:4px}
.pg-me-main b{font-size:18px;font-weight:800;overflow-wrap:anywhere}
.pg-me-main small{font-size:14px;line-height:1.5;color:var(--ink2);overflow-wrap:anywhere}
.pg-me-main .pg-rank-chip{align-self:flex-start;margin-top:6px}
.pg-edit{display:flex;flex-direction:column;gap:14px;padding:4px 0 6px}
.pg-edit-av{display:flex;align-items:center;gap:12px;font-size:14px;color:var(--ink2)}
.pg-field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;color:var(--ink2)}
.pg-field .pg-count{align-self:flex-end}
.pg-sub{margin:8px 0;font-size:13px;color:var(--ink2)}
.pg-swatches,.pg-avatars{display:flex;flex-wrap:wrap;gap:10px}
.pg-swatch{flex:none;width:44px;height:44px;border-radius:50%;box-shadow:inset 0 -5px 8px #0000002a,inset 0 4px 7px #ffffff40,0 0 0 1px #0000001a}
.pg-swatch.on{outline:2px solid var(--ink);outline-offset:3px}
/* 인정 (11/12): 반응 (what my balls received), this week's makers, who liked my ball */
.pg-bell .pg-count{position:absolute;top:0;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--accent);color:#fff;font-size:12px;font-style:normal;font-weight:700;line-height:20px;text-align:center;font-variant-numeric:tabular-nums;box-shadow:0 0 0 2px var(--surface)}
.pg-acts{display:flex;flex-direction:column;gap:2px;margin:0 -10px}
.pg-act{display:flex;align-items:flex-start;gap:2px;padding:4px 10px;border-radius:24px}
.pg-act.new{background:var(--accent-soft)}
.pg-act .pg-who{position:relative;flex:none;place-items:center;width:52px;min-height:60px}
.pg-kind{position:absolute;right:0;bottom:6px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--surface);box-shadow:0 0 0 1px var(--sep);color:var(--ink)}
.pg-kind .ic{width:13px;height:13px}
.pg-kind.like{color:var(--accent)}
.pg-act-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:60px;padding:6px 0 6px 8px;color:var(--ink);text-align:left}
.pg-act-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pg-act-text b{display:flex;align-items:center;gap:6px;overflow:hidden;font-size:15px;font-weight:700;letter-spacing:-.015em;white-space:nowrap}
.pg-newdot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--accent)}
.pg-act-text>span{font-size:14px;line-height:1.5;color:var(--ink2);overflow-wrap:anywhere}
.pg-act-text q{quotes:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:4px 0 2px;padding:7px 11px;border-radius:12px;background:var(--sep);font-size:14px;line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
.pg-act-text time{font-size:12px;color:var(--ink3)}
.pg-act-ball{flex:none;width:42px;height:42px;border-radius:50%;box-shadow:inset 0 -5px 8px #0000002a,inset 0 4px 7px #ffffff40,0 0 0 1px #0000001a}
.pg-act-open{display:flex;align-items:center;justify-content:center;gap:8px;margin:2px 0 6px}
.pg-seg{display:inline-grid;grid-auto-columns:max-content;margin:-4px 0 16px}
.pg-seg button{padding:0 18px}
.pg-mine-rank{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:0 0 8px;padding:13px 16px;border-radius:20px;background:var(--fill);font-size:14px;line-height:1.5;color:var(--ink2)}
.pg-mine-rank b{font-size:16px;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}
.pg-mine-rank .ic,.pg-maker small .ic,.pg-likers .ic{width:14px;height:14px;margin-right:3px;vertical-align:-2px}
.pg-rank-n{flex:none;width:24px;text-align:center;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--ink3)}
.pg-maker.top .pg-rank-n{font-size:19px;color:var(--accent-ink)}
.pg-maker.me .pg-thread-main b{color:var(--accent-ink)}
.pg-maker>.ic{width:16px;height:16px;color:var(--ink3)}
.pg-maker .pg-thread-main small,.pg-likers .pg-thread-side time{font-size:13px;color:var(--ink2)}

/* ---- messages over everything ---- */
/* as wide as its words, up to the screen less a margin, and centred between the two edges */
#toast{position:fixed;left:20px;right:20px;bottom:calc(28px + var(--sab));z-index:100;width:fit-content;margin:0 auto;padding:12px 20px;border-radius:24px;background:rgba(22,23,27,.92);color:#fff;font-size:14px;font-weight:600;line-height:1.5;text-align:center;opacity:0;transform:translateY(12px);transition:opacity .2s,transform .2s;pointer-events:none;box-shadow:0 6px 20px rgba(0,0,0,.25)}
#toast:lang(ko){word-break:keep-all}
#toast.visible{opacity:1;transform:none}
body[data-tabs="1"] #toast{bottom:calc(var(--tabs) + 14px + var(--sab))}
/* never over the attendance gift's card or the line being typed */
/* one message at a time above the tabs (11/14 review: the welcome toast stood on the gift bar and the two hid a card): while a toast is up the
   gift bar steps aside and the toast takes its place; the bar comes back when the toast goes */
body[data-tabs="1"]:has(.pg-gift) #toast{bottom:calc(var(--tabs) + 12px + var(--sab))}
body:has(#toast.visible) .pg-gift{opacity:0;transform:translateY(8px);pointer-events:none}
body:has(.page .pg-compose) #toast{bottom:calc(var(--tabs) + 104px + var(--sab))}
/* over the stage a toast is a message over the toy, not over the controls: right under whatever stands at the top (the controls and the
   sheets are at the bottom). main.js placeToast() measures where the name card's column ends (--toast-top) and keeps the toast beside
   the keys at the right edge while it is level with them (--toast-right); the numbers here are only what applies before a measurement */
body:is([data-screen=home],[data-screen=inspect],[data-screen=trial],[data-screen=pgTrial],[data-screen=detail],[data-screen=theme],[data-screen=pgItem]) #toast{bottom:auto;top:var(--toast-top,calc(max(12px,calc(var(--sat) + 8px)) + 84px));left:12px;right:var(--toast-right,72px);transform:translateY(-12px);border:1px solid rgba(255,255,255,.14);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--toast-lines,6);overflow:hidden}
body:is([data-screen=detail],[data-screen=theme],[data-screen=pgItem]) #toast{top:calc(max(12px,calc(var(--sat) + 8px)) + 56px);left:20px;right:20px}
body:is([data-screen=home],[data-screen=inspect],[data-screen=trial],[data-screen=pgTrial],[data-screen=detail],[data-screen=theme],[data-screen=pgItem]) #toast.visible{transform:none}
body[data-screen=workshop] #toast{bottom:calc(clamp(138px,25vh,236px) + 190px);border:1px solid rgba(255,255,255,.14)}
#fatal{position:fixed;inset:22% 28px auto;color:#fff;font-size:15px;line-height:1.7;text-align:center}
#fatal p{margin:0 0 12px}
#fatal .fatal-tip{font-size:13px;color:#C9CDD6}
.fatal-actions{display:flex;justify-content:center;gap:10px;margin-top:18px}
.fatal-actions button{min-height:48px;padding:0 20px;border-radius:24px;background:#fff;color:var(--ink);font-size:15px;font-weight:700}
.fatal-actions button+button{background:none;border:1px solid rgba(255,255,255,.4);color:#fff}
/* before app.js has run (a few seconds on a slow link): the brand, softly breathing, instead of an empty screen. Replaced by the first render */
.boot{position:absolute;inset:0;display:grid;place-items:center;padding-left:.3em;letter-spacing:.3em;font:800 16px/1 var(--font);color:#ffffffb8;animation:boot-breathe 1.6s ease-in-out infinite}
@keyframes boot-breathe{50%{opacity:.35}}

/* ---- every language ---- */
/* Korean and English break at spaces (keep-all keeps a Korean word whole). Japanese and Chinese have no spaces: keep-all would stop every
   break, so they break between phrases where the browser can tell (auto-phrase), else between characters, and never run out of the box */
:lang(ko) p,:lang(ko) small,:lang(ko) #toast{word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
/* (until 11/14 Japanese and Chinese paragraphs had keep-all too: a sentence then broke only at its full stop, or anywhere when it was
   longer than the line, which left 'ます。' and 'い。' alone on a line of the name card) */
:lang(ja) p,:lang(zh) p{text-wrap:pretty}
:lang(ja),:lang(zh){word-break:normal;word-break:auto-phrase;line-break:strict;overflow-wrap:break-word}
:lang(ja) button,:lang(ja) .trial-copy,:lang(zh) button,:lang(zh) .trial-copy{word-break:normal;word-break:auto-phrase;line-break:strict;overflow-wrap:anywhere}
.cap-text p{text-wrap:balance}
:lang(ja) body{--font:"Pretendard Variable",-apple-system,BlinkMacSystemFont,"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif}
:lang(zh-Hant) body{--font:"Pretendard Variable",-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif}
/* the widest tool names (つまようじ, Toothpick) on the narrowest phone */
@media(max-width:350px){.tool span{letter-spacing:-.05em}:lang(ja) .tool span{font-size:11px}}

/* ---- a tablet: the same screens, held to a comfortable width ---- */
@media(min-width:700px){
 .page{padding-left:max(32px,calc((100vw - 820px)/2));padding-right:max(32px,calc((100vw - 820px)/2))}
 .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 18px}
 .bg-cards{grid-template-columns:repeat(5,minmax(0,1fr))}
 .filters{margin-left:0;margin-right:0;padding:0}
 .stage-head{left:max(20px,calc((100vw - 820px)/2));right:max(20px,calc((100vw - 820px)/2))}
 .home-caption{max-width:420px}
 .dock{align-self:center;width:min(560px,100%)}
 #app>.tabbar{padding-left:max(6px,calc((100vw - 560px)/2));padding-right:max(6px,calc((100vw - 560px)/2))}
 .detail-info,.ws-sheet,.pg-sheet{left:50%;right:auto;width:min(520px,100%);transform:translateX(-50%)}
 .details>.topbar,.workshop>.topbar{left:max(20px,calc((100vw - 820px)/2));right:max(20px,calc((100vw - 820px)/2))}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
