/* Emberleaf UI \002014 cel-shaded cozy interface. Game is a single dark-framed world, so one deliberate palette. */
:root {
  --ink: #2a1d3a;
  --ink-soft: #4a3a5e;
  --paper: #fff8ea;
  --paper-2: #f6ead2;
  --paper-3: #ecdcbc;
  --amber: #ffcf6b;
  --amber-deep: #f2a93b;
  --ember: #ff8a3c;
  --hp: #ff5a78;
  --hp-deep: #d9304f;
  --mp: #5ab0ff;
  --mp-deep: #356fe0;
  --exp: #ffd25e;
  --exp-deep: #f0a020;
  --good: #4fbf6a;
  --bad: #e8434a;
  --main: #ffcf3f;
  --side: #7fd3ff;
  --night: #0b0820;
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --r: 14px;
  --shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(20, 10, 40, .35);
  color-scheme: dark;
}
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--night); }
body { font-family: var(--font-body); color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; }
#game { position: fixed; inset: 0; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui * { box-sizing: border-box; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  pointer-events: auto; cursor: pointer; border: 2.5px solid var(--ink); border-radius: 999px; padding: 7px 16px;
  background: linear-gradient(#fff6dc, #ffe2a0); box-shadow: 0 3px 0 var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 15px;
  transition: transform .08s, box-shadow .08s, filter .15s; color: var(--ink); white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: linear-gradient(#ffd98a, #ffad3c); }
.btn.cool { background: linear-gradient(#bfe6ff, #6fb6ff); }
.btn.ghost { background: rgba(255, 248, 234, .12); color: #fff8ea; border-color: rgba(255, 248, 234, .6); box-shadow: none; }
.btn.small { padding: 3px 10px; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: grayscale(.5); }
.plus { pointer-events: auto; cursor: pointer; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ink); background: linear-gradient(#c8ffb0, #4fbf6a); font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 2px 0 var(--ink); padding: 0; font-size: 15px; }
.plus:active { transform: translateY(2px); box-shadow: none; }
.plus:disabled { visibility: hidden; }

/* ---------- panels / windows ---------- */
.panel { background: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); }
.win { position: absolute; pointer-events: auto; min-width: 260px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); animation: winIn .18s cubic-bezier(.2, 1.4, .4, 1); display: flex; flex-direction: column; max-height: calc(100vh - 120px); }
@keyframes winIn { from { transform: scale(.92) translateY(8px); opacity: 0; } }
.win-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: linear-gradient(#ffe39a, #ffc95e); border-bottom: 2.5px solid var(--ink); border-radius: 11px 11px 0 0; cursor: grab; }
.win-head:active { cursor: grabbing; }
.win-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; flex: 1; letter-spacing: .2px; }
.win-key { font-family: var(--font-display); font-size: 11px; background: var(--ink); color: var(--amber); border-radius: 6px; padding: 1px 6px; }
.win-x { pointer-events: auto; cursor: pointer; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--ink); background: #ffb3b3; font-weight: 800; line-height: 20px; padding: 0; box-shadow: 0 2px 0 var(--ink); }
.win-x:active { transform: translateY(2px); box-shadow: none; }
.win-body { padding: 12px; overflow: auto; min-height: 0; }
.tabs { display: flex; gap: 4px; padding: 8px 10px 0; }
.tab { pointer-events: auto; cursor: pointer; flex: 1; padding: 5px 8px; border: 2px solid var(--ink); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--paper-3); font-family: var(--font-display); font-weight: 500; font-size: 14px; text-align: center; }
.tab.on { background: var(--paper); font-weight: 600; transform: translateY(2px); }
.tabline { border-top: 2px solid var(--ink); margin: 0 10px; }
.muted { color: #7a6a80; }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }

/* ---------- item grid ---------- */
.grid { display: grid; grid-template-columns: repeat(6, 46px); gap: 5px; }
.slot { position: relative; width: 46px; height: 46px; border-radius: 10px; background: var(--paper-2); border: 2px solid #cdb994; pointer-events: auto; display: grid; place-items: center; }
.slot.filled { background: radial-gradient(circle at 40% 35%, #fffdf6, var(--paper-2)); border-color: var(--ink-soft); cursor: pointer; }
.slot.filled:hover { border-color: var(--ink); transform: translateY(-1px); }
.slot img { width: 36px; height: 36px; image-rendering: auto; pointer-events: none; }
.slot .qty { position: absolute; right: 3px; bottom: 1px; font-family: var(--font-display); font-weight: 600; font-size: 12px; color: #fff; text-shadow: -1.5px 0 var(--ink), 1.5px 0 var(--ink), 0 -1.5px var(--ink), 0 1.5px var(--ink); pointer-events: none; }
.slot.r1 { box-shadow: inset 0 0 0 2px #7fd3ff; } .slot.r2 { box-shadow: inset 0 0 0 2px #c48aff; } .slot.r3 { box-shadow: inset 0 0 0 2px #ffcf3f; }
.slot.newpulse { animation: newpulse 1s ease-out 2; }
@keyframes newpulse { 50% { background: #fff1b8; } }
.slot .lbl { position: absolute; inset: auto 0 2px; text-align: center; font-size: 9px; color: #a8957a; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; pointer-events: none; }
.slot.dropok { outline: 3px solid var(--good); }
.meso-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 10px; border-radius: 10px; background: var(--paper-2); border: 2px solid #cdb994; font-family: var(--font-display); font-weight: 600; }
.meso-row img { width: 20px; height: 20px; }

/* ---------- HUD ---------- */
#hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 10px 14px; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
#status { pointer-events: auto; display: flex; align-items: stretch; gap: 10px; padding: 8px 12px 8px 8px; background: linear-gradient(#3b2c55, #2a1d3a); border: 2.5px solid #120c1e; border-radius: 16px; box-shadow: 0 3px 0 #120c1e, 0 10px 24px rgba(0, 0, 0, .4); color: #fff; }
#lvbadge { width: 58px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(#ffe39a, #ffb84a); border: 2px solid #120c1e; color: var(--ink); text-align: center; padding: 2px 0; }
#lvbadge .lv-l { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 1px; line-height: 1; }
#lvbadge .lv-n { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; }
#lvbadge.pop { animation: lvpop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes lvpop { 30% { transform: scale(1.35) rotate(-6deg); } }
#bars { display: flex; flex-direction: column; gap: 4px; width: 230px; justify-content: center; }
#who { display: flex; gap: 8px; align-items: baseline; font-family: var(--font-display); font-size: 14px; }
#who .job { font-size: 12px; color: #c9b6ff; }
.bar { position: relative; height: 16px; border-radius: 8px; background: #160f24; border: 2px solid #120c1e; overflow: hidden; }
.bar .fill { position: absolute; inset: 0; width: 100%; transform-origin: left; border-radius: 6px; transition: width .25s cubic-bezier(.2, .9, .3, 1); }
.bar .lag { position: absolute; inset: 0; width: 100%; background: #fff; opacity: .55; transition: width .7s .25s ease-out; border-radius: 6px; }
.bar .fill::after { content: ''; position: absolute; left: 4px; right: 4px; top: 2px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.bar.hp .fill { background: linear-gradient(#ff8aa0, var(--hp) 50%, var(--hp-deep)); }
.bar.mp .fill { background: linear-gradient(#9ad2ff, var(--mp) 50%, var(--mp-deep)); }
.bar .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-display); font-weight: 600; font-size: 11.5px; color: #fff; text-shadow: -1px 0 #120c1e, 1px 0 #120c1e, 0 -1px #120c1e, 0 1px #120c1e; letter-spacing: .3px; }
.bar .tag { position: absolute; left: 6px; top: 0; bottom: 0; display: flex; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 10px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px #120c1e; }
.bar.low .fill { animation: lowpulse .8s infinite; }
@keyframes lowpulse { 50% { filter: brightness(1.5); } }
#quick { pointer-events: auto; display: grid; grid-template-columns: repeat(6, 44px); gap: 4px; padding: 6px; background: linear-gradient(#3b2c55, #2a1d3a); border: 2.5px solid #120c1e; border-radius: 16px; box-shadow: 0 3px 0 #120c1e, 0 10px 24px rgba(0, 0, 0, .4); margin-left: auto; }
.qs { position: relative; width: 44px; height: 44px; border-radius: 10px; background: #1d1430; border: 2px solid #4a3a66; display: grid; place-items: center; cursor: pointer; }
.qs:hover { border-color: var(--amber); }
.qs img { width: 34px; height: 34px; border-radius: 7px; pointer-events: none; }
.qs .key { position: absolute; left: 2px; top: 0; font-family: var(--font-display); font-size: 10px; font-weight: 700; color: #ffd98a; text-shadow: 0 1px 2px #000; pointer-events: none; }
.qs .cnt { position: absolute; right: 2px; bottom: 0; font-family: var(--font-display); font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 0 3px #000, 0 1px 1px #000; pointer-events: none; }
.qs .cd { position: absolute; inset: 0; border-radius: 8px; pointer-events: none; }
.qs.nomp img { filter: grayscale(.7) brightness(.6); }
.qs.flash { animation: qsflash .25s; }
@keyframes qsflash { 50% { transform: scale(.9); border-color: #fff; } }
.qs.dropok { border-color: var(--good); box-shadow: 0 0 0 2px var(--good); }
#menu { pointer-events: auto; display: grid; grid-template-columns: repeat(5, 38px); gap: 4px; padding: 6px; background: linear-gradient(#3b2c55, #2a1d3a); border: 2.5px solid #120c1e; border-radius: 16px; box-shadow: 0 3px 0 #120c1e, 0 10px 24px rgba(0, 0, 0, .4); }
.mb { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 2px solid #120c1e; background: linear-gradient(#5a4680, #3b2c55); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.mb:hover { background: linear-gradient(#6e58a0, #4a3a6a); }
.mb svg { width: 20px; height: 20px; }
.mb .k { position: absolute; right: 2px; bottom: 0; font-family: var(--font-display); font-size: 9px; color: #ffd98a; }
.mb.alert::after { content: ''; position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid #120c1e; animation: alertb 1s infinite; }
@keyframes alertb { 50% { transform: scale(1.3); } }
#expbar { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: #160f24; border-top: 2px solid #120c1e; }
#expbar .fill { height: 100%; width: 0; background: linear-gradient(#ffe89a, var(--exp) 50%, var(--exp-deep)); transition: width .4s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 0 10px rgba(255, 210, 94, .6); }
#expbar .txt { position: absolute; right: 12px; bottom: 12px; font-family: var(--font-display); font-weight: 600; font-size: 11px; color: #ffe89a; text-shadow: 0 1px 2px #000, 0 0 2px #000; }

/* ---------- minimap ---------- */
#left-top { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#minimap { position: relative; pointer-events: auto; background: rgba(28, 19, 48, .82); border: 2.5px solid #120c1e; border-radius: 14px; box-shadow: 0 3px 0 #120c1e; color: #fff; overflow: hidden; }
#minimap .mm-head { display: flex; gap: 8px; align-items: center; padding: 5px 10px; cursor: pointer; }
#minimap .mm-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
#minimap .mm-area { font-size: 11px; color: #c9b6ff; }
#minimap canvas { display: block; }
#minimap.collapsed canvas { display: none; }

/* ---------- tracker / buffs ---------- */
#right-top { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#buffs { display: flex; gap: 4px; }
.buff { position: relative; width: 32px; height: 32px; border-radius: 8px; border: 2px solid #120c1e; overflow: hidden; pointer-events: auto; }
.buff img { width: 100%; height: 100%; }
.buff .t { position: absolute; inset: auto 0 0; font-family: var(--font-display); font-size: 9px; color: #fff; text-align: center; background: rgba(0, 0, 0, .55); }
.buff.ending { animation: buffend .5s infinite; }
@keyframes buffend { 50% { opacity: .4; } }
#tracker { pointer-events: auto; width: 264px; background: rgba(28, 19, 48, .8); border: 2.5px solid #120c1e; border-radius: 14px; color: #fff; padding: 8px 10px; box-shadow: 0 3px 0 #120c1e; }
#tracker .tk-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; color: #c9b6ff; cursor: pointer; }
.tq { margin-top: 7px; cursor: pointer; border-radius: 8px; padding: 3px 4px; }
.tq:hover { background: rgba(255, 255, 255, .06); }
.tq .tq-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.tq .tq-name::before { content: ''; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--side); flex: none; }
.tq.main .tq-name { color: #ffe39a; } .tq.main .tq-name::before { background: var(--main); }
.tq .obj { font-size: 12.5px; color: #e8e2f2; padding-left: 14px; line-height: 1.35; }
.tq .obj.done { color: #8fe38a; text-decoration: line-through; text-decoration-color: rgba(143, 227, 138, .5); }
.tq .where { font-size: 11px; color: #ffcf6b; padding-left: 14px; }
.tq.ready .obj { color: #8fe38a; }
#tracker.collapsed .tq { display: none; }
/* party people on the same quest (UX \0000a71.2): a chip each, in their party color, under the objective */
.tq-chips { display: flex; flex-wrap: wrap; gap: 3px 4px; padding: 2px 0 3px 14px; }
.tq-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 7px 1px 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: 11px; font-weight: 700; line-height: 1.35; color: #e8e2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tq-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc, #b6ff9a); box-shadow: 0 0 0 1.5px #120c1e; flex: none; }
.tq-chip.done { color: #8fe38a; }
.tq-chip.done::after { content: '\2713'; margin-left: 1px; }

/* ---------- chat log ---------- */
#log { position: absolute; left: 12px; bottom: 96px; width: 360px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.logl { font-size: 12.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; transition: opacity 1s; }
.logl.exp { color: #fff3a8; } .logl.meso { color: #ffd25e; } .logl.item { color: #9fe8ff; } .logl.quest { color: #b6ff9a; } .logl.level { color: #ffb36b; } .logl.sys { color: #e2d6ff; } .logl.bad { color: #ff9a9a; }
.logl.old { opacity: .0; }

/* ---------- toasts / banners ---------- */
#toasts { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: top .25s cubic-bezier(.2, .9, .3, 1); }
.toast { padding: 6px 14px; border-radius: 999px; background: rgba(28, 19, 48, .9); border: 2px solid #120c1e; color: #fff; font-weight: 700; font-size: 14px; animation: toastIn .25s cubic-bezier(.2, 1.5, .4, 1), toastOut .4s 2.2s forwards; }
.toast.bad { color: #ffb3b3; } .toast.good { color: #b6ff9a; }
/* kill credit from a party member: "Green Snails 4/6" + their name in a chip in their party color */
.toast.credit { display: inline-flex; align-items: center; gap: 0; padding-right: 6px; }
.toast .tc-from { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; padding: 1px 9px 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1.5px solid var(--pc, #c9b6ff); color: #fff; font-size: 13px; }
.toast .tc-from i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, #c9b6ff); flex: none; }
.toast .tc-p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes toastIn { from { transform: translateY(-10px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }
#pickups { position: absolute; right: 14px; bottom: 130px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pick { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(28, 19, 48, .85); border: 2px solid #120c1e; color: #fff; font-size: 13px; font-weight: 700; animation: pickIn .3s cubic-bezier(.2, 1.5, .4, 1), toastOut .5s 2.5s forwards; }
.pick img { width: 26px; height: 26px; }
.pick b { color: #9fe8ff; }
@keyframes pickIn { from { transform: translateX(30px); opacity: 0; } }
#banner { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; transition: top .25s cubic-bezier(.2, .9, .3, 1); }
.bn { animation: bnIn .5s cubic-bezier(.2, 1.4, .4, 1), bnOut .6s 2.6s forwards; }
.bn .bn-k { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 4px; color: #ffe39a; text-shadow: 0 2px 0 var(--ink); }
.bn .bn-t { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 20px rgba(0, 0, 0, .5); -webkit-text-stroke: 1.5px var(--ink); }
.bn .bn-s { margin-top: 2px; font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.bn.done .bn-k { color: #b6ff9a; }
@keyframes bnIn { from { transform: scale(.6); opacity: 0; } }
@keyframes bnOut { to { opacity: 0; transform: translateY(-14px); } }
#area-title { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.at { animation: atIn 1.1s ease-out, bnOut 1s 3s forwards; }
.at .at-area { font-family: var(--font-display); font-size: 15px; letter-spacing: 6px; text-transform: uppercase; color: #ffe39a; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.at .at-name { font-family: var(--font-display); font-weight: 700; font-size: 40px; color: #fff; -webkit-text-stroke: 2px var(--ink); text-shadow: 0 4px 0 var(--ink), 0 0 30px rgba(0, 0, 0, .4); }
.at .at-rule { height: 3px; margin: 6px auto 0; width: 0; background: linear-gradient(90deg, transparent, #ffe39a, transparent); animation: rule 1.4s .2s ease-out forwards; }
@keyframes rule { to { width: 340px; } }
@keyframes atIn { from { opacity: 0; letter-spacing: 12px; filter: blur(4px); } }

/* ---------- dialog ---------- */
#dialog { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(860px, calc(100vw - 32px)); pointer-events: auto; animation: dlgIn .25s cubic-bezier(.2, 1.3, .4, 1); z-index: 30; }
@keyframes dlgIn { from { transform: translate(-50%, 20px); opacity: 0; } }
#dialog .dlg-box { position: relative; min-height: 150px; padding: 18px 22px 16px 210px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink), 0 18px 40px rgba(10, 5, 30, .5); }
#dialog.noport .dlg-box { padding-left: 24px; }
#dialog .dlg-port { position: absolute; left: 6px; bottom: 0; width: 200px; height: 220px; pointer-events: none; }
#dialog .dlg-port canvas { width: 200px; height: 200px; position: absolute; bottom: 4px; left: 0; filter: drop-shadow(0 3px 0 rgba(42, 29, 58, .25)); }
#dialog.noport .dlg-port { display: none; }
#dialog .dlg-name { position: absolute; top: -18px; left: 200px; padding: 3px 16px; border-radius: 999px; border: 2.5px solid var(--ink); background: linear-gradient(#ffe39a, #ffc95e); font-family: var(--font-display); font-weight: 600; font-size: 17px; box-shadow: 0 3px 0 var(--ink); }
#dialog .dlg-name .ti { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-left: 6px; }
#dialog.noport .dlg-name { left: 20px; }
#dialog .dlg-text { font-size: 17.5px; line-height: 1.55; font-weight: 600; min-height: 3.1em; white-space: pre-wrap; max-width: 62ch; }
#dialog .dlg-text em { color: #8a4a2a; font-style: italic; }
#dialog .dlg-text .q { color: #b8640a; font-weight: 800; }
#dialog .dlg-text.narr { font-style: italic; color: var(--ink-soft); text-align: center; max-width: none; }
#dialog .dlg-next { position: absolute; right: 18px; bottom: 10px; font-size: 14px; color: var(--ember); animation: nextb .8s infinite; font-family: var(--font-display); font-weight: 600; }
@keyframes nextb { 50% { transform: translateY(3px); } }
#dialog .dlg-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.opt { pointer-events: auto; cursor: pointer; text-align: left; padding: 8px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 700; font-size: 15.5px; box-shadow: 0 3px 0 var(--ink); display: flex; gap: 10px; align-items: center; animation: optIn .25s backwards; }
.opt .n { font-family: var(--font-display); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--paper-3); font-size: 13px; flex: none; }
.opt:hover, .opt.sel { background: #fff1c8; transform: translateX(4px); }
.opt.quest .n { background: var(--main); }
.opt.side .n { background: var(--side); }
@keyframes optIn { from { opacity: 0; transform: translateX(-10px); } }
.dlg-reward { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rw { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--paper-2); border: 2px solid #cdb994; font-weight: 800; font-size: 13px; }
.rw img { width: 22px; height: 22px; }

/* ---------- letterbox / cutscene ---------- */
.lb { position: absolute; left: 0; right: 0; height: 0; background: #07050f; transition: height .5s cubic-bezier(.3, .9, .3, 1); z-index: 5; }
#lb-top { top: 0; } #lb-bot { bottom: 0; }
body.cine .lb { height: 9vh; }
body.cine #hud, body.cine #left-top, body.cine #right-top, body.cine #log, body.cine #pickups, body.cine #chatbox, body.cine #emotes, body.cine #invites, body.cine #pcard { opacity: 0; pointer-events: none !important; }
#hud, #left-top, #right-top, #log { transition: opacity .4s; }
#skip { position: absolute; right: 18px; top: 2vh; z-index: 6; font-size: 12px; color: rgba(255, 255, 255, .6); font-weight: 700; pointer-events: auto; cursor: pointer; display: none; }
body.cine #skip { display: none; }

/* ---------- letter reader ---------- */
#letter { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 5, 20, .72); pointer-events: auto; z-index: 40; animation: fadeIn .4s; }
@keyframes fadeIn { from { opacity: 0; } }
.paper { position: relative; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; padding: 34px 40px 30px; background: #fbf3df; border-radius: 6px; box-shadow: 0 2px 0 #d9c69a, 0 30px 60px rgba(0, 0, 0, .5); transform: rotate(-.8deg); animation: paperIn .6s cubic-bezier(.2, 1.1, .3, 1); color: #3a2c2a; background-image: repeating-linear-gradient(transparent 0 33px, rgba(120, 150, 200, .22) 33px 34px); }
@keyframes paperIn { from { transform: rotate(-6deg) translateY(40px); opacity: 0; } }
.paper .hand { font-family: var(--font-hand); font-size: 25px; line-height: 34px; white-space: pre-wrap; }
.paper .sig { text-align: right; margin-top: 10px; }
.paper .stamp { position: absolute; right: 26px; top: 20px; transform: rotate(8deg); border: 3px solid #c94f4f; color: #c94f4f; font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 6px; opacity: .8; }
.paper .close { display: flex; justify-content: center; margin-top: 18px; }
#letter .lt-more { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: rgba(18, 12, 30, .86); color: #ffe9c0; font: 700 13px var(--font-body); pointer-events: none; animation: fadeIn .4s .6s backwards; }
#letter .lt-more::before { content: '\2193  '; }

/* ---------- tooltip ---------- */
#tip { position: fixed; z-index: 100; pointer-events: none; width: max-content; max-width: 300px; padding: 10px 12px; background: rgba(28, 19, 48, .97); color: #fff; border: 2px solid #120c1e; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); font-size: 13px; line-height: 1.4; }
#tip .tt-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
#tip .tt-name.r1 { color: #7fd3ff; } #tip .tt-name.r2 { color: #c48aff; } #tip .tt-name.r3 { color: #ffcf3f; }
#tip .tt-sub { color: #c9b6ff; font-size: 12px; margin-bottom: 4px; }
#tip .tt-req { font-size: 12px; } #tip .tt-req .no { color: #ff8a8a; }
#tip .tt-stat { display: flex; justify-content: space-between; gap: 12px; }
#tip .up { color: #8fe38a; } #tip .down { color: #ff8a8a; }
#tip .tt-desc { margin-top: 6px; color: #e2d6ff; font-style: italic; }
#tip .tt-hint { margin-top: 6px; font-size: 11px; color: #ffcf6b; }
#tip .tt-uniq { margin-top: 6px; font-size: 11px; font-weight: 800; color: #ffcf3f; letter-spacing: .3px; }
#tip hr { border: none; border-top: 1px solid rgba(255, 255, 255, .15); margin: 6px 0; }
#tip .tt-head { display: flex; gap: 8px; align-items: center; }
#tip .tt-head img { width: 36px; height: 36px; background: rgba(255, 255, 255, .08); border-radius: 8px; }

/* ---------- drag ghost ---------- */
#ghost { position: fixed; z-index: 120; pointer-events: none; width: 40px; height: 40px; transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }

/* ---------- stats window ---------- */
.stats-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 10px; align-items: center; }
.stat-name { font-family: var(--font-display); font-weight: 600; }
.stat-val { font-family: var(--font-display); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 40px; }
.stat-val .bonus { color: var(--good); font-size: 12px; }
.ap-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; padding: 6px 10px; border-radius: 10px; background: var(--paper-2); border: 2px solid #cdb994; font-family: var(--font-display); font-weight: 600; }
.ap-row b { color: var(--ember); font-size: 18px; }
.kv { display: flex; justify-content: space-between; font-size: 13.5px; padding: 2px 0; border-bottom: 1px dashed #e0cfa8; }
.kv b { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.section-t { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #9a7a5a; margin: 12px 0 4px; }

/* ---------- skills window ---------- */
.sk { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 2px solid #e0cfa8; background: #fffdf6; margin-bottom: 6px; }
.sk .ic { width: 42px; height: 42px; border-radius: 10px; cursor: grab; pointer-events: auto; flex: none; }
.sk .ic.locked { filter: grayscale(1) brightness(.7); cursor: default; }
.sk .nm { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.sk .lvl { font-family: var(--font-display); font-size: 12px; color: #9a7a5a; }
.sk .inf { font-size: 12px; color: #6a5a70; line-height: 1.3; }
.sk .pas { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #fff; background: #9a8ab0; border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.sp-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 6px 10px; border-radius: 10px; background: var(--paper-2); border: 2px solid #cdb994; font-family: var(--font-display); font-weight: 600; }
.sp-row b { color: var(--ember); font-size: 18px; }

/* ---------- quest window ---------- */
.ql { display: grid; grid-template-columns: 210px 1fr; gap: 12px; min-height: 300px; }
.ql-list { border-right: 2px dashed #e0cfa8; padding-right: 10px; overflow: auto; }
.ql-item { padding: 6px 8px; border-radius: 9px; cursor: pointer; pointer-events: auto; font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.ql-item:hover { background: var(--paper-2); }
.ql-item.on { background: #ffeec4; }
.ql-item .dot { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--side); flex: none; }
.ql-item.main .dot { background: var(--main); }
.ql-item.done { color: #9a8a80; }
.ql-item .st { margin-left: auto; font-size: 11px; color: var(--good); }
.ql-detail h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 20px; }
.ql-detail .ql-sum { font-size: 14px; line-height: 1.5; color: #4a3a50; }
.ql-detail .ql-obj { margin: 4px 0; font-weight: 700; font-size: 14px; }
.ql-detail .ql-obj.done { color: var(--good); }
.ltr { padding: 8px 10px; border-radius: 10px; border: 2px solid #e0cfa8; background: #fffdf6; margin-bottom: 6px; cursor: pointer; pointer-events: auto; display: flex; gap: 8px; align-items: center; font-family: var(--font-hand); font-size: 22px; }
.ltr:hover { background: #fff1c8; }
.ltr.missing { font-family: var(--font-body); font-size: 13px; color: #b0a090; cursor: default; font-style: italic; }

/* ---------- shop ---------- */
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop-col { min-width: 0; }
.shop-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; padding-right: 4px; }
.si { display: flex; gap: 8px; align-items: center; padding: 4px 8px 4px 4px; border-radius: 10px; border: 2px solid #e0cfa8; background: #fffdf6; cursor: pointer; pointer-events: auto; }
.si:hover { background: #fff1c8; border-color: var(--ink-soft); }
.si img { width: 34px; height: 34px; }
.si .nm { font-weight: 800; font-size: 13.5px; }
.si .pr { margin-left: auto; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #9a6a1a; white-space: nowrap; }
.si.cant .pr { color: var(--bad); }
.win.narrow .shop { grid-template-columns: 1fr; }
.win.narrow .shop-list { max-height: min(220px, 24vh); }
.qty-pop { position: absolute; inset: 0; background: rgba(42, 29, 58, .5); display: grid; place-items: center; border-radius: 12px; }
.qty-pop .panel { padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 240px; }
.qty-pop input[type=range] { width: 200px; accent-color: var(--ember); }
/* quantity prompt (UI.askQty) */
.qty-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.qty-item img { width: 34px; height: 34px; }
.qty-label { font-weight: 800; text-align: center; }
/* script (upgrade) mode strip at the top of the inventory */
.scroll-mode { display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; padding: 5px 6px 5px 5px; border: 2px solid var(--ink); border-radius: 10px; background: #fff1c8; font-size: 12px; font-weight: 700; line-height: 1.3; animation: scrollGlow 1.6s ease-in-out infinite; }
.scroll-mode img { width: 30px; height: 30px; flex: none; }
.scroll-mode b { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
@keyframes scrollGlow { 50% { box-shadow: 0 0 0 3px rgba(255, 207, 63, .55); } }

/* ---------- equipment ---------- */
.eqw { display: grid; grid-template-columns: 52px 150px 52px; gap: 8px; justify-content: center; align-items: center; }
.eqw .col { display: flex; flex-direction: column; gap: 8px; }
.eqw canvas { width: 150px; height: 180px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #fff, var(--paper-2)); border: 2px solid #cdb994; }

/* ---------- world map ---------- */
#wm canvas { width: 640px; height: 400px; max-width: calc(100vw - 80px); border-radius: 10px; border: 2px solid var(--ink); display: block; }

/* ---------- settings ---------- */
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; font-weight: 700; }
.set-row input[type=range] { width: 160px; accent-color: var(--ember); pointer-events: auto; }
.toggle { pointer-events: auto; cursor: pointer; width: 46px; height: 26px; border-radius: 999px; border: 2px solid var(--ink); background: #d9c9b0; position: relative; padding: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left .15s; }
.toggle.on { background: var(--good); } .toggle.on::after { left: 22px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; border: 2px solid var(--ink); background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 12px; text-align: center; box-shadow: 0 2px 0 var(--ink); margin-right: 3px; }

/* ---------- full-screen screens (title / create / death / chapter end) ---------- */
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; align-items: center; justify-content: center; z-index: 50; }
#title { flex-direction: column; gap: 22px; background: linear-gradient(180deg, rgba(11, 8, 32, .1), rgba(11, 8, 32, .55)); }
.logo { text-align: center; animation: logoIn 1.6s cubic-bezier(.2, 1, .3, 1); }
@keyframes logoIn { from { opacity: 0; transform: translateY(20px) scale(.96); filter: blur(6px); } }
.logo .lg-main { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 10vw, 104px); line-height: .95; color: #fff6dc; -webkit-text-stroke: 3px var(--ink); text-shadow: 0 6px 0 var(--ink), 0 0 40px rgba(255, 160, 80, .6); letter-spacing: 1px; }
.logo .lg-main .leaf { display: inline-block; width: .62em; height: .62em; vertical-align: .05em; margin: 0 .02em; }
.logo .lg-sub { margin-top: 10px; font-family: var(--font-display); font-weight: 500; font-size: clamp(14px, 2vw, 19px); letter-spacing: 7px; text-transform: uppercase; color: #ffe39a; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.menu-col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; width: 240px; animation: fadeIn 1s .8s backwards; }
.menu-col .btn { font-size: 18px; padding: 10px 18px; }
.title-foot { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255, 246, 220, .6); font-weight: 700; }
#create { background: rgba(11, 8, 32, .55); overflow-y: auto; padding: 16px 0; }
#create > .create { margin: auto; }   /* centred when it fits; scrolls from the top when it doesn't (a short or narrow screen) */
.create { display: grid; grid-template-columns: 300px 340px; gap: 18px; padding: 20px; max-width: calc(100vw - 32px); }
.create .prev { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.create .prev canvas { width: 280px; height: 320px; border-radius: 16px; background: radial-gradient(circle at 50% 45%, #fff9ea, #f0dcae); border: 2.5px solid var(--ink); }
.create h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.opt-row { margin-bottom: 10px; }
.opt-row .lbl { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #9a7a5a; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { pointer-events: auto; cursor: pointer; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; font-weight: 700; font-size: 13px; }
.chip.on { background: var(--amber); box-shadow: 0 2px 0 var(--ink); }
.sw { pointer-events: auto; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--ink); }
.sw.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.name-in { pointer-events: auto; width: 100%; padding: 8px 12px; border: 2.5px solid var(--ink); border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: 20px; background: #fff; color: var(--ink); }
.name-in::placeholder { color: #bba98a; }
#dead { background: radial-gradient(circle, rgba(40, 20, 60, .3), rgba(8, 5, 20, .75)); }
#dead .panel { padding: 22px 28px; text-align: center; max-width: 380px; }
#dead h2 { font-family: var(--font-display); margin: 0 0 6px; }
#chapter { background: #07050f; flex-direction: column; color: #fff6dc; text-align: center; gap: 14px; }
#chapter .ch-k { font-family: var(--font-display); letter-spacing: 8px; font-size: 14px; color: #ffcf6b; text-transform: uppercase; }
#chapter .ch-t { font-family: var(--font-display); font-size: 48px; font-weight: 700; }
#chapter .ch-s { max-width: 560px; line-height: 1.6; color: #d9cfe8; font-size: 16px; text-wrap: pretty; }
.narr-screen { position: absolute; inset: 0; display: grid; place-items: center; z-index: 45; pointer-events: auto; background: #07050f; color: #f3ead6; }
.narr-screen .nt { max-width: 640px; padding: 0 24px; font-size: 22px; line-height: 1.7; text-align: center; font-weight: 600; }
.narr-screen .nt.hand { font-family: var(--font-hand); font-size: 30px; line-height: 1.45; text-align: left; white-space: pre-wrap; }
.narr-screen .hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(243, 234, 214, .5); font-weight: 700; }
.fade-in { animation: fadeIn 1.2s; }

/* scrollbars */
.win-body::-webkit-scrollbar, .shop-list::-webkit-scrollbar, .ql-list::-webkit-scrollbar { width: 8px; }
.win-body::-webkit-scrollbar-thumb, .shop-list::-webkit-scrollbar-thumb, .ql-list::-webkit-scrollbar-thumb { background: #d9c9a8; border-radius: 4px; }

@media (max-width: 900px) {
  #bars { width: 160px; }
  #quick { grid-template-columns: repeat(6, 36px); } .qs { width: 36px; height: 36px; } .qs img { width: 28px; height: 28px; }
  #menu { grid-template-columns: repeat(5, 32px); } .mb { width: 32px; height: 32px; }
  #chatbox { width: 280px; }
  #tracker { width: 210px; }
  #log { width: 260px; }
  .create { grid-template-columns: 220px minmax(0, 340px); }
  .create .prev canvas { width: 200px; height: 220px; }
}
@media (max-width: 640px) { .create { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .logo .lg-sub { letter-spacing: 3px; font-size: 13px; } }   /* one line at 320 to 480 px */
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* windows live in their own stacking layer below dialogs, letters and full screens */
#wins { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
body.cine #wins { pointer-events: none; opacity: .0; }
body.cine #wins .win { pointer-events: none; }

/* ============================================================
   Social (design_ux \0000a75): left column, net bar, party frames, chat, emotes, invites, player card, quick chat,
   Party / Adventurers windows. Dark plum HUD pieces; cream windows.
   ============================================================ */
.chip-ai { display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 4px; background: #ffcf6b; color: var(--ink); font-family: var(--font-body); font-weight: 800; font-size: 9px; line-height: 13px; letter-spacing: .3px; vertical-align: 1px; }

/* ---------- net bar ---------- */
#netbar { min-width: 120px; max-width: 260px; padding: 3px 10px; border-radius: 999px; background: rgba(28, 19, 48, .82); border: 2px solid #120c1e; color: #e8e2f2; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
#netbar.clickable { cursor: pointer; }
#netbar.clickable:hover { background: rgba(48, 34, 78, .9); }
#netbar .nb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #8a8299; vertical-align: 0; }
#netbar .nb-dot.on { background: #6fdc7a; box-shadow: 0 0 6px #6fdc7a; }
#netbar .nb-dot.wait { background: #ffcf6b; animation: nbpulse 1s infinite; }
#netbar .nb-dot.bad { background: #ff6a6a; }
@keyframes nbpulse { 50% { opacity: .35; } }
#netbar .nb-sep { color: #8a7aa8; }
#netbar .nb-link { color: #ffd98a; }
#netbar .nb-ms { color: #a99cc0; } #netbar .nb-ms.warn { color: #ffcf6b; } #netbar .nb-ms.bad { color: #ff7a7a; }

/* ---------- party frames ---------- */
#pframes { display: flex; flex-direction: column; gap: 4px; }
.pf { position: relative; width: 196px; padding: 4px 8px 5px 12px; border-radius: 10px; background: linear-gradient(#3b2c55, #2a1d3a); border: 2px solid #120c1e; box-shadow: 0 2px 0 #120c1e; color: #fff; pointer-events: auto; cursor: pointer; overflow: hidden; }
.pf::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, #b6ff9a); }
.pf:hover { border-color: #4a3a66; }
.pf.tracked { animation: pftrack 1.4s ease-in-out infinite; }
@keyframes pftrack { 50% { border-color: #ffcf3f; box-shadow: 0 0 0 2px rgba(255, 207, 63, .45), 0 2px 0 #120c1e; } }
.pf-l1 { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; line-height: 15px; white-space: nowrap; }
.pf-name { overflow: hidden; text-overflow: ellipsis; max-width: 92px; }
.pf-crown { color: #ffcf3f; font-size: 11px; }
.pf-lv { margin-left: 4px; font-family: var(--font-display); font-weight: 600; font-size: 11px; color: #c9b6ff; }
.pf-st { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: #e2d6ff; font-weight: 700; }
.pf-st svg { width: 12px; height: 12px; }
.pf-bars { margin-top: 3px; }
.pf-hp { height: 7px; border-radius: 4px; background: #160f24; border: 1.5px solid #120c1e; overflow: hidden; }
.pf-hp .f { height: 100%; width: 100%; background: linear-gradient(#ff8aa0, var(--hp) 50%, var(--hp-deep)); transition: width .25s; }
.pf-mp { height: 3px; margin-top: 1px; border-radius: 2px; background: #160f24; overflow: hidden; }
.pf-mp .f { height: 100%; width: 100%; background: var(--mp); transition: width .25s; }
.pf-where { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: #ffcf6b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf.st-dead { filter: grayscale(.9); }
.pf.st-dead .pf-hp .f { width: 0 !important; }
.pf.st-scene, .pf.st-talk { opacity: .78; }
.pf.st-scene { opacity: .6; }
.pf.st-grace { opacity: .4; }
.pf.st-offline { opacity: .45; filter: grayscale(.8); }
.pf-r2 { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.pf-r2 .pf-bars { flex: 1; margin-top: 0; }
.pf-bf { display: flex; gap: 2px; }
.pf-bf:empty { display: none; }
.pf-bf img { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #120c1e; }
.buff-src { position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 0 0 4px 0; border-right: 1.5px solid #120c1e; border-bottom: 1.5px solid #120c1e; }
.buff.kindled { border-color: #ffcf3f; box-shadow: 0 0 0 1.5px #ffcf3f, 0 0 8px rgba(255, 207, 63, .6); }
#pframes.compact { gap: 3px; }
#pframes.compact .pf { padding: 2px 8px 3px 12px; }
#pframes.compact .pf-r2 { margin-top: 1px; }
#pframes.compact .pf-hp { height: 5px; }
#pframes.compact .pf-mp { height: 2px; }
#pframes.compact .pf-where { display: none; }

/* ---------- chat ---------- */
#log.cb-hide { visibility: hidden; }
.logl.cl-feed { font-weight: 700; }
.cl-feed .cl-n, .cl .cl-n { color: #ffd98a; }
.cl-feed.ch-party, .cl.ch-party { color: #ff9fc8; } .ch-party .cl-n { color: #ffc4dc; }
.cl-feed.ch-whisper, .cl.ch-whisper { color: #7fe8c8; } .ch-whisper .cl-n { color: #b4f5e0; }
.cl-feed.ch-room, .cl.ch-room { color: #c9b6ff; }
.cl-feed.ch-sys, .cl.ch-sys { color: #c9b6ff; font-style: italic; }
.cl.self .cl-n, .cl-feed.self .cl-n { color: #fff3c8; }
.cl.to-me { background: rgba(127, 232, 200, .08); }
#chatbox { position: absolute; left: 12px; bottom: 96px; width: 380px; z-index: 12; display: flex; flex-direction: column; background: rgba(28, 19, 48, .86); border: 2.5px solid #120c1e; border-radius: 14px; box-shadow: 0 3px 0 #120c1e, 0 10px 24px rgba(0, 0, 0, .4); color: #fff; pointer-events: auto; user-select: text; -webkit-user-select: text; }
.cb-head { display: flex; align-items: center; gap: 6px; padding: 5px 6px 0 8px; }
.cb-tabs { display: flex; gap: 3px; flex: 1; }
.cb-tab { pointer-events: auto; cursor: pointer; padding: 2px 10px; border: 2px solid #120c1e; border-radius: 9px 9px 0 0; background: #2a1d3a; color: #c9b6ff; font-family: var(--font-display); font-size: 12.5px; font-weight: 600; }
.cb-tab.on { background: #4a3a6a; color: #fff; }
.cb-set { pointer-events: auto; cursor: pointer; width: 24px; height: 22px; padding: 1px; border: 2px solid #120c1e; border-radius: 7px; background: #3b2c55; color: #e2d6ff; display: grid; place-items: center; }
.cb-set svg { width: 15px; height: 15px; }
.cb-scroll { height: var(--cb-h, 180px); display: flex; flex-direction: column; overflow-y: auto; margin: 0 6px; padding: 4px 4px; border-top: 2px solid #120c1e; }
.cb-scroll::-webkit-scrollbar { width: 7px; } .cb-scroll::-webkit-scrollbar-thumb { background: #4a3a6a; border-radius: 4px; }
.cb-lines { margin-top: auto; }
.cl { font-size: 12.5px; font-weight: 700; line-height: 1.35; padding: 1px 2px; border-radius: 4px; word-wrap: break-word; overflow-wrap: anywhere; }
.cl .cl-n.link { cursor: pointer; pointer-events: auto; }
.cl .cl-n.link:hover { text-decoration: underline; }
.cb-new { pointer-events: auto; cursor: pointer; align-self: center; margin-top: -26px; margin-bottom: 4px; padding: 1px 10px; border: 2px solid #120c1e; border-radius: 999px; background: #ffcf6b; color: var(--ink); font-size: 11.5px; font-weight: 800; position: relative; }
.cb-in { display: flex; align-items: center; gap: 6px; margin: 4px 6px 6px; }
.cb-ch { pointer-events: auto; cursor: pointer; flex: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 9px; border: 2px solid #120c1e; border-radius: 999px; background: #4a3a6a; color: #fff; font-size: 12px; font-weight: 800; }
.cb-ch.ch-party { background: #8a3f66; } .cb-ch.ch-whisper { background: #2f7a68; } .cb-ch.ch-room { background: #5a4a99; }
.cb-in input { pointer-events: auto; flex: 1; min-width: 0; padding: 5px 9px; border: 2px solid #120c1e; border-radius: 10px; background: #1d1430; color: #fff8ea; font: 700 13px var(--font-body); outline: none; user-select: text; -webkit-user-select: text; }
.cb-in input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(255, 207, 107, .3); }
.cb-in input::placeholder { color: #7a6a98; }
.cb-n { flex: none; font-size: 10.5px; font-weight: 700; color: #8a7aa8; font-variant-numeric: tabular-nums; }
.cb-n.warn { color: #ffcf6b; }

/* ---------- emote strip ---------- */
#emotes { position: absolute; display: flex; gap: 4px; padding: 4px; background: rgba(28, 19, 48, .86); border: 2px solid #120c1e; border-radius: 12px; pointer-events: auto; z-index: 12; }
.em { pointer-events: auto; cursor: pointer; position: relative; width: 32px; height: 32px; border-radius: 9px; border: 2px solid #120c1e; background: #fff8ea; display: grid; place-items: center; padding: 0; }
.em:hover { background: #fff1c8; }
.em svg { width: 18px; height: 18px; }
.em-g { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1; }
.em-k { position: absolute; left: 2px; top: -1px; font-family: var(--font-display); font-size: 9px; font-weight: 700; color: #9a7a5a; }

/* ---------- invites ---------- */
#invites { position: absolute; right: 14px; bottom: 210px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 12; }
.inv { pointer-events: auto; max-width: 340px; padding: 7px 10px 7px 12px; border-radius: 14px; background: rgba(28, 19, 48, .93); border: 2px solid #120c1e; box-shadow: 0 3px 0 #120c1e; color: #fff; font-size: 13px; font-weight: 700; animation: pickIn .3s cubic-bezier(.2, 1.5, .4, 1); }
.inv-n { color: #ffd98a; }
.inv-r { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.inv-time { font-size: 11px; color: #c9b6ff; margin-left: 4px; font-variant-numeric: tabular-nums; }
.inv-k { margin-left: auto; font-size: 10.5px; color: #8a7aa8; }

/* ---------- player card ---------- */
#pcard { position: absolute; z-index: 25; width: 236px; padding: 10px 10px 8px; pointer-events: auto; }
.pc-head { display: flex; gap: 9px; align-items: center; }
.pc-head canvas { width: 56px; height: 56px; flex: none; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #fff, var(--paper-2)); border: 2px solid #cdb994; }
.pc-who { min-width: 0; padding-left: 8px; border-left: 4px solid var(--jc, #9aa3b8); }
.pc-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.pc-tag { font-family: var(--font-body); font-size: 12px; color: #9a8aa8; font-weight: 700; }
.pc-sub { font-size: 12px; font-weight: 700; color: #7a6a80; margin-top: 2px; }
.pc-note { display: block; margin-top: 6px; font-size: 11.5px; color: #8a7a90; font-style: italic; }
.pc-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pc-btns .btn.small { font-size: 12.5px; padding: 2px 9px; }

/* ---------- quick chat ---------- */
#qc { position: absolute; inset: 0; z-index: 26; pointer-events: none; }
.qc-back { position: absolute; width: 470px; height: 330px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(11, 8, 32, .55), rgba(11, 8, 32, .3) 70%, rgba(11, 8, 32, 0)); pointer-events: none; }
.qc-mid { position: absolute; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 14px; background: rgba(28, 19, 48, .9); border: 2px solid #120c1e; color: #fff; text-align: center; pointer-events: none; }
.qc-mid b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: #ffd98a; }
.qc-mid span { font-size: 10.5px; color: #c9b6ff; font-weight: 700; }
.qc-i { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff8ea; box-shadow: 0 3px 0 var(--ink); font-weight: 800; font-size: 13.5px; color: var(--ink); white-space: nowrap; animation: optIn .18s backwards; }
.qc-i:hover { background: #fff1c8; transform: translate(-50%, -50%) scale(1.05); }
.qc-i.ctx { background: #ffe39a; }
.qc-k { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; background: var(--paper-3); font-family: var(--font-display); font-size: 12px; }

/* ---------- Party window ---------- */
.pw-empty { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.pw-inv { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 6px 8px; border-radius: 10px; border: 2px solid var(--ink); background: #fff1c8; font-weight: 700; font-size: 13px; }
.pw-inv .inv-n { color: var(--ink); font-weight: 800; }
.pw-hint { display: block; margin-bottom: 8px; }
.pw-list { display: flex; flex-direction: column; gap: 5px; }
.pw-m { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; border: 2px solid #e0cfa8; background: #fffdf6; pointer-events: auto; cursor: pointer; }
.pw-m:hover { background: #fff1c8; }
.pw-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.pw-n { font-weight: 800; font-size: 14px; }
.pw-act { display: flex; gap: 4px; }
.pw-bonus { margin-top: 8px; font-weight: 800; font-size: 13px; color: #2f8a45; }
.pw-rec { margin-top: 12px; }
.pw-invrow { margin-top: 10px; }
.pw-in, .pw-url { pointer-events: auto; flex: 1; min-width: 0; padding: 4px 9px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font: 700 13px var(--font-body); user-select: text; -webkit-user-select: text; }
.pw-link { margin-top: 10px; }
.btn.ghost-dark { background: transparent; box-shadow: none; }

/* ---------- Adventurers window ---------- */
.ar { display: flex; align-items: center; gap: 8px; padding: 5px 8px; margin-bottom: 4px; border-radius: 10px; border: 2px solid #e0cfa8; background: #fffdf6; pointer-events: auto; cursor: pointer; }
.ar:hover { background: #fff1c8; }
.ar-dot { width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--ink); flex: none; transform: rotate(45deg); }
.ar-n { font-weight: 800; font-size: 14px; }
.ar-party { margin-left: 6px; padding: 0 5px; border-radius: 5px; background: #b6ff9a; font-size: 10px; font-weight: 800; }
.ar.muted-row { cursor: default; }

/* ---------- settings: choice rows ---------- */
.seg { display: flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; flex: none; }
.seg-b { pointer-events: auto; cursor: pointer; padding: 3px 8px; border: none; border-left: 2px solid var(--ink); background: var(--paper-2); font-weight: 700; font-size: 12px; }
.seg-b:first-child { border-left: none; }
.seg-b.on { background: var(--amber); }

/* ---------- death: party branch (a card, not a screen) ---------- */
#dead.dead-party { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 30; pointer-events: none; }
#dead.dead-party .panel { pointer-events: auto; padding: 16px 22px; text-align: center; max-width: 360px; }
#dead.dead-party h2 { font-family: var(--font-display); margin: 0 0 6px; }
#dead.dead-party .dp-wait { margin: 0 0 12px; line-height: 1.5; font-weight: 700; }
#dead.dead-party .dp-cost { margin-top: 6px; }

/* ============================================================
   Online screens (PLAN \0000a73.13, design_ux \0000a74, website spec play-online.html): the site title menu, channel list,
   party room card, join with a code, the join card, save codes, the one-tab lock. Paper cards with one hard shade band
   and a hard cast shadow (light from the upper left), so the step from the website into the game feels like one thing.
   ============================================================ */
#toasts { z-index: 60; }
.ol-win, #title.site {
  --o-ink: #3b2520; --o-card: #fffaf0; --o-card2: #f8efdc; --o-line: #e6d6b8; --o-text2: #6a5246; --o-text3: #8a7264;
  --o-gold-lit: #ffd877; --o-gold-shd: #f3ac3e; --o-cream-lit: #fffaf0; --o-cream-shd: #efdfbf; --o-ember: #e2673a;
  --o-ember-text: #b0452a; --o-ok: #2f9a5c; --o-ok-lit: #5fd08a; --o-bad: #b83a2e; --o-bad-bg: #fde6e0; --o-focus: #1f5fbf;
}
.ol-win .btn, #title.site .menu-col .btn {
  --lit: var(--o-cream-lit); --shd: var(--o-cream-shd);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 20px;
  font: 600 16px/1.1 var(--font-display); color: var(--o-ink); border: 2px solid var(--o-ink); border-radius: 999px;
  background: linear-gradient(180deg, var(--lit) 0 62%, var(--shd) 62% 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .65), 0 3px 0 var(--o-ink);
  filter: none; text-decoration: none;
}
.ol-win .btn:hover, #title.site .menu-col .btn:hover { transform: translateY(-1px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .65), 0 4px 0 var(--o-ink); filter: none; }
.ol-win .btn:active, #title.site .menu-col .btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 var(--o-ink); }
.ol-win .btn.primary, #title.site .menu-col .btn.primary { --lit: var(--o-gold-lit); --shd: var(--o-gold-shd); }
.ol-win .btn.ok { --lit: #c9f2d6; --shd: #9fdcb4; }
.ol-win .btn.lg, #title.site .menu-col .btn.lg { min-height: 52px; font-size: 20px; }
.ol-win .btn.sm { min-height: 36px; font-size: 14.5px; padding: 6px 14px; }
.ol-win .btn.block { display: flex; width: 100%; }
.ol-win .btn:disabled, #title.site .menu-col .btn:disabled { --lit: #efe6d6; --shd: #e2d6c0; color: #8a7a70; border-color: #a8988c; box-shadow: 0 3px 0 #a8988c; cursor: not-allowed; transform: none; opacity: 1; filter: none; }
.ol-win .btn:focus-visible, #title.site .menu-col .btn:focus-visible { outline: 3px solid var(--o-focus); outline-offset: 3px; }
#title.site .menu-col .btn:focus-visible { outline-color: #fff3d6; }

/* ---------- the site title ---------- */
#title.site { gap: 14px; }
#title.site .menu-col { width: 320px; gap: 8px; }
#title.site .menu-col .btn { width: 100%; }
#title.site.ol-open > .logo, #title.site.ol-open > .menu-col, #title.site.ol-open > .t-chip { display: none; }
.ol-char { display: flex; gap: 12px; align-items: center; width: 100%; padding: 7px 12px; border-radius: 14px; border: 2px solid var(--o-ink, #3b2520); background: #fff6e0; color: var(--o-ink, #3b2520); margin-bottom: 4px; text-align: left; }
.ol-char.dark { background: rgba(26, 18, 48, .86); border-color: #120c1e; color: #fff; }
.ol-char.flat { margin: 0; border: 0; background: none; padding: 0; }
.ol-char .ol-av { width: 44px; height: 44px; border-radius: 50%; border: 2px solid currentColor; background: #f1dfbf; flex: none; }
.ol-char.dark .ol-av { border-color: #120c1e; }
.ol-cn { display: block; font: 600 17px/1.15 var(--font-display); }
.ol-cs { display: block; font: 600 13px/1.3 var(--font-body); color: var(--o-text2, #6a5246); }
.ol-char.dark .ol-cs { color: #d9ccef; }
.t-sub { display: flex; align-items: center; justify-content: center; gap: 7px; margin: -2px 0 4px; font: 700 13px var(--font-body); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); text-align: center; }
.ol-dot { width: 9px; height: 9px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 3px rgba(95, 208, 138, .25); flex: none; display: inline-block; }
.ol-dot.bad { background: #ff7a6a; box-shadow: 0 0 0 3px rgba(255, 122, 106, .25); }
.t-small { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
#title.site .menu-col .t-small .btn { width: auto; min-height: 30px; padding: 4px 12px; font-size: 13px; --lit: rgba(26, 18, 48, .72); --shd: rgba(26, 18, 48, .72); color: #fff; border-color: rgba(255, 255, 255, .55); box-shadow: none; }
.ol-restnote { margin-top: 4px; padding: 10px 13px; border-radius: 14px; background: rgba(18, 12, 30, .86); color: #fff; font: 600 13px/1.45 var(--font-body); border: 1.5px solid rgba(255, 255, 255, .15); }
.t-chip { position: absolute; left: 16px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font: 700 13px var(--font-body); background: rgba(18, 12, 30, .78); color: #fff8ec; border: 1.5px solid rgba(255, 255, 255, .18); }
.t-ver { position: absolute; right: 16px; bottom: 14px; font: 600 12px var(--font-body); color: rgba(255, 246, 220, .6); }
#title.site .title-foot { bottom: 16px; left: 220px; right: 120px; }
@media (max-height: 700px) {
  #title.site { gap: 8px; }
  #title.site .logo .lg-main { font-size: clamp(44px, 8vw, 72px); }
  #title.site .logo .lg-sub { margin-top: 4px; font-size: 13px; }
  #title.site .menu-col .btn { min-height: 36px; padding: 6px 16px; font-size: 15px; }
  #title.site .menu-col .btn.lg { min-height: 44px; font-size: 18px; }
  #title.site .menu-col { gap: 6px; }
  .ol-char { padding: 5px 10px; } .ol-char .ol-av { width: 36px; height: 36px; }
}
@media (max-width: 900px) { #title.site .title-foot { display: none; } }

/* ---------- panels ---------- */
.ol-scrim { background: linear-gradient(180deg, rgba(28, 18, 58, .3), rgba(28, 18, 58, .6)); z-index: 55; padding: 16px; }
.ol-scrim.on-title { position: absolute; inset: 0; z-index: 2; background: none; }
.ol-win { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--o-card); color: var(--o-ink); border: 2px solid var(--o-ink); border-radius: 18px; box-shadow: 5px 6px 0 rgba(18, 12, 30, .6); font-family: var(--font-body); animation: winIn .18s cubic-bezier(.2, 1.4, .4, 1); user-select: text; -webkit-user-select: text; }
.ol-win.wide { max-width: 520px; }
.ol-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 2px solid var(--o-ink); border-radius: 16px 16px 0 0; font: 600 18px/1.2 var(--font-display); background: linear-gradient(180deg, var(--o-gold-lit) 0 64%, var(--o-gold-shd) 64% 100%); }
.ol-head.blue { background: linear-gradient(180deg, #d9e6ff 0 64%, #b5c9f2 64%); }
.ol-head.rose { background: linear-gradient(180deg, #ffd9cf 0 64%, #f6b5a6 64%); }
.ol-head.grey { background: linear-gradient(180deg, #efe6d6 0 64%, #dfd2bb 64%); }
.ol-head.night { background: linear-gradient(180deg, #5a4880 0 64%, #45365f 64%); color: #ffe9c0; }
.ol-ht { flex: 1; }
.ol-hs { font: 700 13px var(--font-body); opacity: .75; }
.ol-code { font: 700 14px/1 var(--font-display); letter-spacing: .14em; padding: 5px 10px; border: 2px solid var(--o-ink); border-radius: 999px; background: var(--o-card); white-space: nowrap; }
.ol-code.dark { background: #120c1e; color: #ffd98a; border-color: #120c1e; }
.ol-x { pointer-events: auto; cursor: pointer; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--o-ink); background: #ffe1e1; color: var(--o-ink); font: 700 14px var(--font-display); display: grid; place-items: center; padding: 0; flex: none; }
.ol-body { padding: 16px 20px 6px; overflow: auto; min-height: 0; }
.ol-body.center { text-align: center; }
.ol-act { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 20px 18px; flex-wrap: wrap; }
.ol-act.center { justify-content: center; }
.ol-act.stack { flex-direction: column; align-items: stretch; }
.ol-h { font: 700 25px/1.12 var(--font-display); margin: 0 0 4px; }
.ol-sub { font: 700 14px/1.45 var(--font-body); color: var(--o-text2); margin: 0 0 12px; }
.ol-lead { font: 700 15px/1.5 var(--font-body); margin: 0 0 8px; }
.ol-muted { font: 600 14px/1.5 var(--font-body); color: var(--o-text2); margin: 0 0 6px; }
.ol-small { font: 600 13px/1.45 var(--font-body); color: var(--o-text2); margin: 4px 0; }
.ol-age { font: 600 12.5px var(--font-body); color: var(--o-text3); margin: 0 0 6px; min-height: 1em; }
.ol-note { display: block; padding: 11px 14px; margin: 10px 0; border-radius: 14px; background: var(--o-card2); border: 1.5px solid var(--o-line); font: 600 13.5px/1.5 var(--font-body); color: var(--o-text2); }
.ol-err { padding: 11px 14px; margin: 4px 0 8px; border-radius: 12px; background: var(--o-bad-bg); border: 1.5px solid #f0b0a4; color: var(--o-bad); font: 700 14px/1.45 var(--font-body); }
.ol-wait { display: flex; align-items: center; gap: 10px; padding: 14px 2px; font: 700 14px var(--font-body); color: var(--o-text2); }
.ol-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--o-line); border-top-color: var(--o-ember); animation: olspin .9s linear infinite; flex: none; }
@keyframes olspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ol-spin { animation: none; } .ol-win { animation: none; } }
.ol-links { display: flex; gap: 18px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
.ol-link { pointer-events: auto; cursor: pointer; font: 700 14px/1.3 var(--font-body); color: var(--o-ember-text, #b0452a); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; background: none; border: 0; padding: 4px 2px; }
.ol-row { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 13px; margin-bottom: 8px; text-align: left; border: 2px solid #d9c8a8; border-radius: 14px; background: #f6ecd8; color: var(--o-ink); font: inherit; cursor: pointer; }
.ol-row.sel { border-color: var(--o-ink); background: #fff4d6; box-shadow: 0 3px 0 var(--o-ink); }
.ol-row:disabled { cursor: not-allowed; opacity: .75; }
.ol-rt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ol-rn { font: 600 17px var(--font-display); }
.ol-rs { display: flex; align-items: center; gap: 6px; font: 700 12.5px var(--font-body); color: var(--o-text2); min-height: 1em; }
.ol-rs.good { color: var(--o-ok); } .ol-rs.bad { color: var(--o-bad); }
.ol-rc { font: 600 15px var(--font-display); min-width: 40px; text-align: right; }
.ol-meter { display: flex; gap: 3px; }
.ol-meter i { width: 9px; height: 12px; border-radius: 3px; background: #e9dcc4; border: 1.5px solid #cdb995; }
.ol-meter i.on { background: linear-gradient(180deg, #ffd877 0 60%, #f3ac3e 60%); border-color: var(--o-ink); }
.ol-meter.busy i.on { background: linear-gradient(180deg, #ffb08a 0 60%, #e2673a 60%); }
.ol-body > .ol-meter { margin: 6px 0 12px; }
.ol-bigcode { font: 700 44px/1.1 var(--font-display); letter-spacing: .16em; margin: 2px 0 6px; }
.ol-urlrow { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; }
.ol-input { pointer-events: auto; width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; font: 600 14px/1.2 var(--font-body); color: var(--o-ink); background: #fff; border: 2px solid var(--o-ink); border-radius: 12px; box-shadow: inset 0 3px 0 rgba(59, 37, 32, .07); user-select: text; -webkit-user-select: text; }
.ol-input:focus { outline: 3px solid var(--o-focus); outline-offset: 2px; }
.ol-input.code { min-height: 52px; font: 700 26px/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; text-align: center; }
.ol-input.ta { min-height: 110px; resize: vertical; font: 600 12px/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0; text-transform: none; text-align: left; word-break: break-all; }
.ol-input.bad { border-color: var(--o-bad); box-shadow: 0 0 0 3px var(--o-bad-bg); }
.ol-label { display: block; font: 700 14px var(--font-body); margin-bottom: 8px; }
.ol-hint { font: 600 13px/1.45 var(--font-body); color: var(--o-text2); margin: 8px 0 10px; min-height: 1.2em; text-align: center; }
.ol-hint.bad { color: var(--o-bad); font-weight: 700; }
.ol-found { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 12px; background: #e3f6e8; border: 1.5px solid #9fd8b0; margin-bottom: 10px; font: 600 13.5px var(--font-body); color: #1f6a3e; }
.ol-found.bad { background: var(--o-bad-bg); border-color: #f0b0a4; color: var(--o-bad); }
.ol-fav { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--o-ink); display: grid; place-items: center; color: #fff; font: 700 13px var(--font-display); flex: none; }
.ol-ft { margin-left: 6px; } .ol-b { font-weight: 800; }
.ol-seats { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ol-seat { position: relative; text-align: center; min-width: 0; }
.ol-sav { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 4px; border-radius: 50%; border: 2px solid var(--o-ink); background: radial-gradient(circle at 40% 30%, #fff7e6, #f1dfbf); color: #fff; font: 700 19px var(--font-display); }
.ol-seat.you .ol-sav { border: 2px dashed var(--o-ember); background: #fff2e6; color: var(--o-ember); }
.ol-seat.open .ol-sav { border: 2px dashed #b9a58c; background: transparent; }
.ol-seat.anon .ol-sav { background: #cdb995; }
.ol-sav.face { overflow: hidden; background: #f1dfbf; }
.ol-sav.face .ol-av { width: 100%; height: 100%; display: block; }
.ol-seat.you .ol-sav.face { border-style: dashed; }
.ol-small.center { text-align: center; }
.ol-urlrow .btn { flex: none; white-space: nowrap; }
.ol-crown { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-6deg); color: #f3ac3e; font-size: 17px; text-shadow: 0 1px 0 var(--o-ink); z-index: 1; }
.ol-sn { display: block; font: 600 13px/1.15 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-ss { display: block; font: 600 10.5px/1.25 var(--font-body); color: var(--o-text2); }
.ol-seat.open .ol-sn { color: var(--o-text3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ol-lock { background: radial-gradient(circle, rgba(40, 20, 60, .45), rgba(8, 5, 20, .85)); z-index: 90; padding: 16px; }
.ol-lock .ol-body { padding-bottom: 10px; }
.ol-lock .ol-hint:empty { display: none; }
@media (max-height: 640px) {
  .ol-body { padding: 12px 16px 4px; } .ol-act { padding: 8px 16px 12px; }
  .ol-h { font-size: 21px; } .ol-bigcode { font-size: 36px; }
  .ol-sav { width: 36px; height: 36px; font-size: 16px; }
  .ol-input.ta { min-height: 80px; }
}

/* ---------- small bits elsewhere ---------- */
#netbar .nb-dot.spin { background: none; width: 10px; height: 10px; border: 2.5px solid #5a4880; border-top-color: #ffd98a; animation: olspin .9s linear infinite; vertical-align: -1px; }
#netbar.warn { border-color: #8a5a10; }
.cc-err { margin-top: 6px; font-weight: 800; font-size: 13px; color: var(--bad); }
.cc-next { margin: -2px 0 10px; padding: 7px 11px; border-radius: 10px; background: #fff2d6; border: 1.5px solid #e8c88a; font-weight: 700; color: var(--ink); }
.set-wrap { flex-wrap: wrap; gap: 6px; }
.pw-ls { margin: -2px 0 6px; }
