/* UniAbuja Life — design system
   Deep campus green + gold on a warm cream map. Frosted-glass panels over the map. */
:root {
  --bg: #e9efd9;
  --cream: #f6f2e8;
  --ink: #17261e;
  --ink-soft: #5b6a61;
  --line: rgba(23, 38, 30, .09);
  --green: #0f7b4f;
  --green-2: #17a366;
  --green-soft: #e3f4ea;
  --gold: #f2b632;
  --gold-soft: #fff4d6;
  --rose: #e5575c;
  --rose-soft: #fde8e9;
  --blue: #2f6fdb;
  --blue-soft: #e5eefc;
  --violet: #7a5cd6;
  --panel: rgba(255, 255, 255, .92);
  --shadow: 0 10px 34px rgba(18, 40, 28, .18);
  --shadow-sm: 0 3px 10px rgba(18, 40, 28, .14);
  --r: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', 'Inter', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map.dragging { cursor: grabbing; }
#tint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; transition: background 2s linear; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }

/* ------------------------------------------------ boot */
#boot { position: absolute; inset: 0; z-index: 100; display: grid; place-items: center; background: linear-gradient(160deg, #0f7b4f, #0a5c3b); transition: opacity .5s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-card { text-align: center; color: #fff; }
.boot-logo { font-size: 56px; animation: bob 1.4s ease-in-out infinite; }
.boot-title { font-family: var(--display); font-weight: 800; font-size: 34px; margin-top: 8px; }
.boot-sub { opacity: .75; margin-top: 4px; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ------------------------------------------------ map pills */
.pill { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .96); box-shadow: 0 2px 8px rgba(18, 40, 28, .22), 0 0 0 1px rgba(23, 38, 30, .06); font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--ink); will-change: transform; transition: opacity .18s, background .15s, color .15s; user-select: none; }
.pill .e { font-size: 14px; line-height: 1; }
.pill .t { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa89f; flex: none; }
.pill.open .dot { background: var(--green-2); box-shadow: 0 0 0 3px rgba(23, 163, 102, .2); }
.pill.warn .dot { background: var(--rose); box-shadow: 0 0 0 3px rgba(229, 87, 92, .22); }
.pill.sel { background: var(--green); color: #fff; z-index: 5; }
.pill.here { box-shadow: 0 0 0 2px var(--gold), 0 3px 10px rgba(18, 40, 28, .3); }
.pill.mini { padding: 0 6px; }
.pill.mini .t, .pill.mini .dot { display: none; }
.pill.off { opacity: 0; pointer-events: none; }
.pill.draft::after { content: '⚠'; font-size: 10px; margin-left: 2px; }
.pill.edit { cursor: move; outline: 2px dashed var(--blue); outline-offset: 2px; }
.player { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 8; pointer-events: none; will-change: transform; }
.player .ring { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(242, 182, 50, .35); animation: pulse 2s ease-out infinite; }
.player .av { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--gold), 0 4px 12px rgba(0, 0, 0, .3); overflow: hidden; }
.player .av svg { width: 100%; height: 100%; display: block; }
.player.walking .av { animation: step .35s ease-in-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes step { 50% { transform: translateY(-3px); } }
.npcdot { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; font-size: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .25); z-index: 4; pointer-events: none; will-change: transform; }

/* ------------------------------------------------ HUD */
.panel { background: var(--panel); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .9); }
#topbar { position: absolute; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 20px)); height: 50px; border-radius: 999px; display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; z-index: 20; }
#topbar .me { display: flex; align-items: center; gap: 8px; min-width: 0; border-radius: 999px; padding-right: 8px; }
#topbar .me .av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--green-soft); flex: none; }
#topbar .me .av svg { width: 100%; height: 100%; display: block; }
#topbar .nm { font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.05; min-width: 0; }
#topbar .nm small { display: block; font-family: var(--font); font-weight: 600; font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topbar .sp { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--cream); font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip.money { background: var(--green-soft); color: var(--green); }
.chip.time { background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.chip.mood { padding: 0 10px; font-size: 18px; }
#needs { position: absolute; top: calc(68px + var(--safe-t)); left: 10px; z-index: 15; border-radius: 16px; padding: 8px 10px; width: 164px; display: grid; gap: 6px; }
.need { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.need .bar { height: 7px; border-radius: 99px; background: rgba(23, 38, 30, .1); overflow: hidden; }
.need .bar i { display: block; height: 100%; border-radius: inherit; transition: width .5s; }
.need.low .bar i { background: var(--rose) !important; }
.need.low { color: var(--rose); }
#banner { position: absolute; top: calc(68px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 14; display: flex; flex-direction: column; gap: 6px; align-items: center; width: min(420px, calc(100% - 200px)); pointer-events: none; }
#banner > * { pointer-events: auto; }
.strip { width: 100%; border-radius: 14px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; color: #fff; box-shadow: var(--shadow-sm); }
.strip.green { background: linear-gradient(90deg, #0f7b4f, #17a366); }
.strip.red { background: linear-gradient(90deg, #c63b45, #e5575c); }
.strip.gold { background: linear-gradient(90deg, #d99a12, #f2b632); color: #3a2a00; }
.strip.dark { background: linear-gradient(90deg, #1d2a4a, #34406b); }
.strip button { margin-left: auto; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
#now { position: absolute; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%); width: min(430px, calc(100% - 24px)); z-index: 19; border-radius: 20px; padding: 10px 12px; }
#now .row { display: flex; align-items: center; gap: 10px; }
#now .ic { font-size: 26px; }
#now .tt { flex: 1; min-width: 0; }
#now .tt b { display: block; font-family: var(--display); font-size: 15px; }
#now .tt span { font-size: 12px; color: var(--ink-soft); }
#now .prog { height: 7px; border-radius: 99px; background: rgba(23, 38, 30, .1); margin-top: 8px; overflow: hidden; }
#now .prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--green-2)); border-radius: inherit; }
#dock { position: absolute; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); width: min(430px, calc(100% - 24px)); height: 62px; border-radius: 26px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; z-index: 18; }
#dock button { display: grid; place-items: center; align-content: center; gap: 1px; border-radius: 20px; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); position: relative; transition: background .15s, transform .12s; }
#dock button span { font-size: 22px; line-height: 1; }
#dock button:active { transform: scale(.95); }
#dock button.on { background: var(--green-soft); color: var(--green); }
#dock .badge, .app .badge { position: absolute; top: 2px; right: 22%; min-width: 17px; height: 17px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 800; }
#zoom { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 12; display: grid; gap: 6px; }
#zoom button { width: 40px; height: 40px; border-radius: 14px; font-size: 20px; font-weight: 700; display: grid; place-items: center; }
#toasts { position: absolute; top: calc(124px + var(--safe-t)); right: 10px; z-index: 60; display: grid; gap: 8px; width: min(320px, calc(100% - 20px)); pointer-events: none; }
.toast { pointer-events: auto; border-radius: 16px; padding: 10px 12px; font-size: 13px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; animation: tin .28s ease-out; border-left: 4px solid var(--green-2); }
.toast.bad { border-left-color: var(--rose); }
.toast.info { border-left-color: var(--blue); }
.toast.gold { border-left-color: var(--gold); }
.toast .ti { font-size: 18px; line-height: 1.2; }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px) scale(.97); } }

/* ------------------------------------------------ sheets */
.scrim { position: absolute; inset: 0; background: rgba(12, 26, 18, .35); z-index: 30; opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 102%); width: min(520px, 100%); max-height: min(86dvh, 760px); z-index: 31; border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -12px 40px rgba(18, 40, 28, .25); display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: var(--safe-b); }
.sheet.on { transform: translate(-50%, 0); }
.sheet.tall { height: min(86dvh, 760px); }
@media (min-width: 900px) {
  .sheet { left: auto; right: 16px; bottom: 16px; transform: translate(0, 110%); border-radius: 26px; max-height: calc(100dvh - 32px); width: 440px; }
  .sheet.on { transform: translate(0, 0); }
  .sheet.tall { height: calc(100dvh - 32px); }
  #dock { left: calc(50% - 110px); }
  #now { left: calc(50% - 110px); }
}
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: rgba(23, 38, 30, .15); margin: 8px auto 2px; flex: none; }
.sheet .hd { display: flex; align-items: center; gap: 12px; padding: 8px 18px 10px; flex: none; }
.sheet .hd .ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; background: var(--green-soft); flex: none; }
.sheet .hd h2 { font-size: 20px; line-height: 1.1; }
.sheet .hd small { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; font-weight: 500; }
.sheet .hd .x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); font-size: 17px; display: grid; place-items: center; flex: none; }
.sheet .bd { overflow-y: auto; padding: 4px 18px 18px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet .bd > * + * { margin-top: 12px; }
.blurb { color: var(--ink-soft); font-size: 13.5px; line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--cream); color: var(--ink-soft); }
.tag.g { background: var(--green-soft); color: var(--green); }
.tag.r { background: var(--rose-soft); color: var(--rose); }
.tag.y { background: var(--gold-soft); color: #8a6200; }
.tag.b { background: var(--blue-soft); color: var(--blue); }
.sec { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 8px; }
.list { display: grid; gap: 8px; }
.act { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; text-align: left; width: 100%; padding: 10px 12px; border-radius: 16px; background: var(--cream); transition: transform .12s, background .15s; }
.act:active:not(:disabled) { transform: scale(.985); }
.act:hover:not(:disabled) { background: #efeadb; }
.act .ai { width: 42px; height: 42px; border-radius: 13px; background: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: var(--shadow-sm); }
.act .at b { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.act .at span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.3; }
.act .ar { text-align: right; font-size: 12px; font-weight: 800; color: var(--green); white-space: nowrap; }
.act .ar small { display: block; color: var(--ink-soft); font-weight: 600; font-size: 10.5px; }
.act.locked { opacity: .55; }
.act.locked .ar { color: var(--rose); max-width: 120px; white-space: normal; font-size: 10.5px; line-height: 1.2; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 16px; background: var(--green); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 16px rgba(15, 123, 79, .3); transition: transform .12s, filter .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { background: #b9c4bd; box-shadow: none; }
.btn.block { width: 100%; }
.btn.alt { background: var(--cream); color: var(--ink); box-shadow: none; }
.btn.gold { background: var(--gold); color: #3a2a00; box-shadow: 0 6px 16px rgba(242, 182, 50, .35); }
.btn.red { background: var(--rose); box-shadow: 0 6px 16px rgba(229, 87, 92, .3); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 12px; box-shadow: none; }
.btnrow { display: flex; gap: 10px; }
.btnrow > * { flex: 1; }
.card { background: var(--cream); border-radius: 16px; padding: 12px 14px; }
.card.w { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13.5px; }
.kv b { text-align: right; }
.kv span { color: var(--ink-soft); }
.bar2 { height: 9px; border-radius: 99px; background: rgba(23, 38, 30, .1); overflow: hidden; }
.bar2 i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { text-align: left; padding: 11px 12px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, background .15s; }
.opt.on { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green-2); }
.opt b { display: block; font-size: 13.5px; }
.opt span { font-size: 11.5px; color: var(--ink-soft); }
.opt .em { font-size: 22px; display: block; margin-bottom: 2px; }
.empty { text-align: center; color: var(--ink-soft); font-size: 13px; padding: 18px 0; }
.who { display: flex; gap: 8px; flex-wrap: wrap; }
.who button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--cream); font-size: 12px; font-weight: 700; }
.who .av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: #fff; }
.who .av svg { width: 100%; height: 100%; display: block; }
.mode { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 12px; border-radius: 15px; background: var(--cream); }
.mode.on { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green-2); }
.mode .mi { font-size: 22px; text-align: center; }
.mode b { font-size: 13.5px; display: block; }
.mode span { font-size: 11.5px; color: var(--ink-soft); }
.mode .mr { font-weight: 800; font-size: 12.5px; text-align: right; }
.mode:disabled { opacity: .45; }

/* ------------------------------------------------ phone */
.phone { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 104%); width: min(420px, 100%); height: min(88dvh, 780px); z-index: 32; border-radius: 34px 34px 0 0; background: linear-gradient(170deg, #0f7b4f 0%, #0b5a3b 55%, #17304d 100%); box-shadow: 0 -12px 50px rgba(0, 0, 0, .35); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--safe-b); color: #fff; }
.phone.on { transform: translate(-50%, 0); }
@media (min-width: 900px) { .phone { left: auto; right: 24px; bottom: 16px; transform: translate(0, 110%); border-radius: 38px; height: min(780px, calc(100dvh - 32px)); } .phone.on { transform: translate(0, 0); } }
.phone .st { padding: 14px 24px 4px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; opacity: .9; }
.phone .dt { padding: 6px 24px 8px; }
.phone .dt b { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; display: block; }
.phone .dt span { font-size: 13px; opacity: .85; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; padding: 14px 20px; }
.app { display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 600; position: relative; }
.app .ic { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 28px; box-shadow: 0 6px 14px rgba(0, 0, 0, .28); }
.phone .screen { position: absolute; inset: 0; background: #fff; color: var(--ink); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s; z-index: 2; }
.phone .screen.on { transform: none; }
.phone .screen .hd2 { display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 14px 8px; }
.phone .screen .hd2 h2 { font-size: 22px; }
.phone .screen .back { width: 36px; height: 36px; border-radius: 50%; background: var(--cream); font-size: 18px; display: grid; place-items: center; }
.phone .screen .bd { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.phone .screen .bd > * + * { margin-top: 12px; }
.homebar { margin: auto auto 8px; width: 130px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .6); }

/* ------------------------------------------------ screens (create / title) */
.fullscreen { position: absolute; inset: 0; z-index: 50; background: linear-gradient(180deg, #d9ebd0, #f6f2e8 55%); display: flex; flex-direction: column; overflow: hidden; }
.fullscreen .top { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 8px; }
.fullscreen .top .title { flex: 1; text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; }
.steps { display: flex; gap: 4px; width: 90px; margin: 4px auto 0; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(23, 38, 30, .14); }
.steps i.on { background: var(--green-2); }
.roundbtn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: var(--shadow-sm); display: grid; place-items: center; font-size: 18px; }
.cbody { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.preview { flex: none; height: 30dvh; width: 100%; display: grid; place-items: center; }
.preview svg { height: 100%; width: auto; max-width: 100%; filter: drop-shadow(0 12px 14px rgba(18, 40, 28, .2)); }
.cform { flex: 1; min-height: 0; width: min(520px, 100%); background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 30px rgba(18, 40, 28, .1); display: flex; flex-direction: column; }
.cform .scroll { flex: 1; overflow-y: auto; padding: 18px 18px 8px; }
.cform .scroll > * + * { margin-top: 16px; }
.cform .foot { padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); }
.field { height: 52px; width: 100%; border-radius: 16px; background: var(--cream); border: 2px solid transparent; padding: 0 16px; font-family: var(--display); font-weight: 600; font-size: 19px; outline: none; }
.field:focus { border-color: var(--green-2); background: #fff; }
.lab { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); position: relative; }
.sw.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--green-2); }
.segs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { height: 40px; padding: 0 16px; border-radius: 14px; background: var(--cream); font-weight: 700; font-size: 13.5px; }
.seg.on { background: var(--ink); color: #fff; }
.title-screen { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 20px 20px calc(24px + var(--safe-b)); background: linear-gradient(180deg, rgba(10, 60, 40, .0) 30%, rgba(10, 60, 40, .55) 100%); pointer-events: none; }
.title-screen > * { pointer-events: auto; }
.title-card { width: min(440px, 100%); border-radius: 30px; padding: 22px 20px 20px; text-align: center; }
.title-card h1 { font-size: 34px; font-weight: 800; color: var(--green); }
.title-card p { margin: 6px 0 16px; color: var(--ink-soft); font-size: 14px; }
.title-card .btn + .btn { margin-top: 10px; }
.title-stats { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }

/* ------------------------------------------------ misc */
.modal { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(12, 26, 18, .5); animation: fin .2s; }
.modal .box { width: min(400px, 100%); border-radius: 28px; padding: 22px 20px 18px; text-align: center; background: #fff; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, 1.3, .4, 1); }
.modal .big { font-size: 46px; }
.modal h2 { font-size: 22px; margin: 6px 0; }
.modal p { color: var(--ink-soft); font-size: 14px; line-height: 1.45; margin: 4px 0 14px; }
.modal .stack { display: grid; gap: 8px; }
@keyframes fin { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.coach { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 22; width: min(300px, calc(100% - 40px)); border-radius: 22px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.mini { font-size: 11.5px; color: var(--ink-soft); }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.mono { font-variant-numeric: tabular-nums; }
.grad { display: inline-block; padding: 2px 8px; border-radius: 8px; font-weight: 800; font-size: 12px; }
.grad.A { background: #d9f5e4; color: #0b7a45; } .grad.B { background: #e5eefc; color: #2459b8; } .grad.C { background: #fff4d6; color: #8a6200; } .grad.D, .grad.E { background: #ffe9d1; color: #a65a00; } .grad.F { background: #fde0e1; color: #b3262f; }
table.res { width: 100%; border-collapse: collapse; font-size: 13px; }
table.res td, table.res th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.res th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
table.res td:last-child, table.res th:last-child { text-align: right; }
.cand { display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 2px transparent; }
.cand.mine { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green-2); }
.cand .top { display: flex; gap: 10px; align-items: center; }
.cand .top .em { font-size: 28px; }
.cand .top b { font-size: 14px; }
.cand .top span { font-size: 12px; color: var(--ink-soft); display: block; }
.editorbar { position: absolute; left: 50%; top: calc(66px + var(--safe-t)); transform: translateX(-50%); z-index: 40; border-radius: 18px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 600; max-width: calc(100% - 20px); }
.cheat { font-size: 11px; color: var(--ink-soft); }
@media (max-width: 520px) {
  #needs { width: 128px; padding: 7px 8px; gap: 5px; }
  .need { grid-template-columns: 16px 1fr; font-size: 10px; }
  #banner { width: calc(100% - 20px); top: calc(68px + var(--safe-t) + 140px); }
  #walletbar, #homebar { max-width: calc(100% - 156px); }
  #zoom { top: 44%; }
  #toasts { top: calc(66px + var(--safe-t)); right: 8px; }
}

/* the wallet and "my hostel" (right-hand side, under the top bar) */
#walletbar, #homebar { position: absolute; right: 10px; z-index: 15; border-radius: 16px; padding: 6px 11px 7px; text-align: right; line-height: 1.18; max-width: min(214px, calc(100% - 160px)); cursor: pointer; }
#walletbar { top: calc(68px + var(--safe-t)); background: linear-gradient(135deg, #f0eafd, #fff); border: 1.5px solid #b9a3f0; }
#walletbar small { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; color: #6d28d9; }
#walletbar b { display: block; font-family: var(--display); font-size: 17px; color: #4c1d95; }
#walletbar span { font-size: 10.5px; color: var(--ink-soft); font-weight: 600; }
#walletbar span b { display: inline; font-size: 10.5px; color: var(--ink); font-family: var(--font); }
#homebar { top: calc(68px + var(--safe-t) + 66px); background: #fff; border: 1.5px solid var(--gold, #f2b632); }
#homebar.hidden { display: none; }
#homebar small { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; color: #8a5a00; }
#homebar b { display: block; font-family: var(--display); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#homebar span { font-size: 10.5px; color: var(--ink-soft); font-weight: 600; }
.walletcard { background: linear-gradient(135deg, #ede7fb, #f7f4ff); border: 1.5px solid #b9a3f0; }
.walletcard .big { display: block; font-family: var(--display); font-size: 28px; color: #4c1d95; margin: 2px 0 6px; }
.walletcard .why { font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.pill.home { box-shadow: 0 0 0 3px rgba(242, 182, 50, .9), var(--shadow-sm); }
.pill.home .e::after { content: '🏠'; position: absolute; top: -13px; right: -6px; font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
body.nogame #walletbar, body.nogame #homebar { display: none !important; }

#shotbtn { position: absolute; right: 10px; bottom: calc(86px + var(--safe-b)); z-index: 90; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 1px solid rgba(23, 38, 30, .12); box-shadow: 0 2px 8px rgba(18, 40, 28, .25); font-size: 19px; line-height: 1; display: grid; place-items: center; opacity: .88; }
#shotbtn:active { transform: scale(.92); }
body.nogame #shotbtn, body.inroom #shotbtn { display: none !important; }

/* HUD is hidden until a game is running */
body.nogame #topbar, body.nogame #needs, body.nogame #dock, body.nogame #zoom, body.nogame #banner, body.nogame #now { display: none !important; }


/* ---------- other players + chat + online ---------- */
.peerdot { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 6; pointer-events: none; will-change: transform; }
.peerdot .pv { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px #17a366, 0 2px 6px rgba(0, 0, 0, .3); }
.peerdot .pv svg { width: 100%; height: 100%; display: block; }
.phone .screen .bd.fill { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.phone .screen .bd.fill > * + * { margin-top: 0; }
.chatlog { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 8px; max-width: 92%; align-items: start; }
.msg .av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--cream); }
.msg .av svg { width: 100%; height: 100%; display: block; }
.msg .nm { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; }
.msg .nm i { font-style: normal; font-weight: 600; opacity: .65; }
.msg .nm button { opacity: .0; font-size: 11px; }
.msg:hover .nm button { opacity: .55; }
.msg p { margin: 2px 0 0; background: var(--cream); padding: 7px 11px; border-radius: 4px 14px 14px 14px; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
.msg.mine { align-self: flex-end; grid-template-columns: 1fr; }
.msg.mine .av, .msg.mine .nm { display: none; }
.msg.mine p { background: var(--green); color: #fff; border-radius: 14px 14px 4px 14px; }
.chatform { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
.chatform input { flex: 1; height: 44px; border-radius: 22px; background: var(--cream); border: 2px solid transparent; padding: 0 16px; outline: none; font-size: 14px; }
.chatform input:focus { border-color: var(--green-2); background: #fff; }
.chatform button { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font-size: 18px; }
.chatday { text-align: center; font-size: 11px; color: var(--ink-soft); margin: 4px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #aab5ae; vertical-align: middle; }
.dot.on { background: var(--green-2); box-shadow: 0 0 0 3px rgba(23, 163, 102, .2); }
.badge2 { background: var(--rose); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 7px; margin-left: 6px; }
.adbar { position: absolute; left: 50%; top: calc(66px + var(--safe-t)); transform: translateX(-50%); z-index: 40; border-radius: 20px; padding: 10px 12px; width: min(560px, calc(100% - 16px)); display: grid; gap: 8px; }
.adbar .row2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; }
.step { display: inline-flex; align-items: center; gap: 4px; }
.step button { width: 28px; height: 28px; border-radius: 9px; background: var(--cream); font-weight: 800; }
.adprev { width: 100%; aspect-ratio: 1.6; border-radius: 16px; background: var(--cream) center/cover; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; font-weight: 700; overflow: hidden; }
.adimg { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; display: block; background: var(--cream); }
.formrow { display: grid; gap: 6px; }
.formrow label { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.formrow input[type=text], .formrow input[type=url], .formrow input[type=password], .formrow input[type=tel] { height: 46px; border-radius: 14px; background: var(--cream); border: 2px solid transparent; padding: 0 14px; font-size: 15px; outline: none; width: 100%; }
.formrow input:focus { border-color: var(--green-2); background: #fff; }
.err { background: var(--rose-soft); color: #b3262f; border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.okmsg { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.chk input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--green); flex: none; }
.chk a { color: var(--green); font-weight: 700; }
.authbox { width: min(440px, calc(100% - 24px)); border-radius: 28px; padding: 20px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; background: var(--cream); border-radius: 14px; padding: 4px; }
.tabs button { flex: 1; height: 36px; border-radius: 11px; font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- ambient life: kekes and voters ---------- */
.ambient-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.keke { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.keke .kk { position: absolute; left: -11px; top: -17px; font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); transition: transform .15s; }
.keke.moving .kk { animation: kekebump .28s ease-in-out infinite; }
.keke .kp { position: absolute; top: -20px; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.keke .kp.a { left: -4px; } .keke .kp.b { left: 1px; } .keke .kp.c { left: 6px; }
.keke .kd { position: absolute; left: -3px; top: -4px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; display: none; }
.keke.idle .kk, .keke.load .kk { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)) saturate(.9); }
@keyframes kekebump { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.5px; } }
.walker { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.walker i { position: absolute; left: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1.8px #fff, 0 2px 4px rgba(0, 0, 0, .3); }
.walker.walk i, .walker.home i { animation: kekebump .4s ease-in-out infinite; }
.walker.vote i { box-shadow: 0 0 0 1.8px #fff, 0 0 0 4px rgba(23, 163, 102, .35); }
.player[data-ride]:not([data-ride=""])::after { content: attr(data-ride); position: absolute; left: 10px; top: -4px; font-size: 24px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }

/* ---------- inside buildings ---------- */
#interior { position: absolute; inset: 0; z-index: 24; background: radial-gradient(ellipse at 50% 30%, #2b3a33, #151d19 70%); display: flex; flex-direction: column; color: var(--ink); }
.int-head { position: relative; z-index: 3; margin: calc(8px + var(--safe-t)) 10px 0; border-radius: 22px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.int-title { min-width: 0; display: grid; line-height: 1.15; }
.int-title b { font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-title small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-view { flex: 1; min-height: 0; overflow: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.int-pad { margin: 0 auto; position: relative; }
.int-stage { position: absolute; left: 8px; top: 8px; transform-origin: 0 0; border-radius: 10px; }
.int-tint { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: background 1.5s; }
.int-zoom { position: absolute; right: 10px; top: 96px; z-index: 4; display: grid; gap: 6px; }
.int-zoom button { width: 40px; height: 40px; border-radius: 14px; font-size: 18px; font-weight: 700; }
.int-foot { position: relative; z-index: 3; margin: 0 10px calc(10px + var(--safe-b)); border-radius: 22px; padding: 8px 10px; display: grid; gap: 6px; }
.int-foot.hidden, .int-edit.hidden { display: none; }
.int-who { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.int-who button { display: flex; align-items: center; gap: 5px; background: var(--cream); border-radius: 99px; padding: 3px 10px 3px 3px; font-size: 12px; font-weight: 700; flex: none; }
.int-who .av { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: block; }
.int-who .av svg { width: 100%; height: 100%; display: block; }
.int-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.int-act { display: flex; align-items: center; gap: 8px; font-size: 14px; } .int-act b { flex: 1; }
.int-prog { height: 7px; border-radius: 99px; background: rgba(23, 38, 30, .1); overflow: hidden; } .int-prog i { display: block; height: 100%; background: var(--green-2); }
/* rooms */
.irm { position: absolute; border: 3px solid #6b6a64; border-radius: 10px; background-color: var(--rc, #ebe6da); box-shadow: inset 0 0 18px rgba(0, 0, 0, .12), 0 3px 8px rgba(0, 0, 0, .25); overflow: hidden; }
.irm.act { cursor: pointer; } .irm.act:hover { filter: brightness(1.04); }
.irm.sel { border-color: var(--gold); box-shadow: inset 0 0 0 2px rgba(242, 182, 50, .55), inset 0 0 18px rgba(0, 0, 0, .1), 0 3px 8px rgba(0, 0, 0, .25); }
.irm.mine { border-color: var(--green-2); }
.irl { position: absolute; left: 4px; top: 3px; font-size: 11px; font-weight: 800; color: rgba(23, 38, 30, .72); background: rgba(255, 255, 255, .7); padding: 1px 7px 1px 4px; border-radius: 99px; white-space: nowrap; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 1; }
.fl-tile { background-image: linear-gradient(rgba(0, 0, 0, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .07) 1px, transparent 1px); background-size: 44px 44px; }
.fl-wood { background-image: repeating-linear-gradient(90deg, rgba(120, 80, 30, 0) 0, rgba(120, 80, 30, 0) 21px, rgba(120, 80, 30, .14) 22px), repeating-linear-gradient(0deg, rgba(0, 0, 0, .04) 0, rgba(0, 0, 0, .04) 1px, transparent 1px, transparent 44px); }
.fl-carpet { background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.4px); background-size: 7px 7px; }
.fl-lino { background-image: linear-gradient(45deg, rgba(0, 0, 0, .05) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, .05) 75%), linear-gradient(45deg, rgba(0, 0, 0, .05) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, .05) 75%); background-size: 22px 22px; background-position: 0 0, 11px 11px; }
.fl-grass { background-image: radial-gradient(rgba(40, 110, 40, .18) 1.2px, transparent 1.6px); background-size: 9px 9px; }
.fl-sand { background-image: radial-gradient(rgba(150, 110, 50, .18) 1px, transparent 1.4px); background-size: 8px 8px; }
.fl-concrete { background-image: linear-gradient(rgba(0, 0, 0, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .06) 1px, transparent 1px); background-size: 88px 88px; }
/* furniture */
.ipr { position: absolute; display: grid; place-items: center; line-height: 1; pointer-events: none; text-shadow: 0 2px 2px rgba(0, 0, 0, .25); z-index: 1; }
.ipr.big { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.ipr[data-room] { pointer-events: auto; cursor: pointer; }
.ipr.ad { filter: drop-shadow(0 0 6px #ffcf4a); }
.ipr.itm.mineitm { pointer-events: auto; cursor: pointer; }
.ipr.flr { border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .25); z-index: 0; opacity: .94; }
.isp { position: absolute; border: 3px solid #d8cdb0; border-radius: 8px; z-index: 0; pointer-events: none; opacity: .96; }
.isp.mine { box-shadow: 0 0 0 3px rgba(242, 182, 50, .85); }
.isp.whole { border-width: 0; box-shadow: none; opacity: .55; border-radius: 0; }
.isp.empty { background: rgba(0, 0, 0, .06); border-style: dashed; border-color: rgba(0, 0, 0, .25); }
.isn { position: absolute; left: 3px; bottom: 2px; font-size: 10px; font-weight: 800; color: rgba(23, 38, 30, .7); background: rgba(255, 255, 255, .72); padding: 0 5px; border-radius: 99px; }
.ighost { position: absolute; z-index: 5; display: grid; place-items: center; font-size: 28px; border: 2px dashed; border-radius: 8px; pointer-events: none; }
.ighost.ok { background: rgba(23, 163, 102, .3); border-color: #0f7b4f; } .ighost.bad { background: rgba(229, 87, 92, .3); border-color: #c63b45; }
/* people */
#iwho { position: absolute; left: 0; top: 0; z-index: 6; }
.iwho { position: absolute; left: 0; top: 0; width: 40px; text-align: center; transition: transform .9s cubic-bezier(.4, .1, .3, 1); cursor: pointer; will-change: transform; }
.iwho .av { display: block; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; margin: 0 auto; background: #fff; box-shadow: 0 0 0 2.5px #17a366, 0 3px 6px rgba(0, 0, 0, .3); }
.iwho .av svg { width: 100%; height: 100%; display: block; }
.iwho small { display: block; margin: 1px 0 0 -11px; font-size: 9.5px; font-weight: 800; color: #fff; background: rgba(23, 38, 30, .78); border-radius: 99px; padding: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 62px; }
.iwho i { position: absolute; right: -2px; top: -4px; font-style: normal; font-size: 12px; }
.iwho.me .av { box-shadow: 0 0 0 3px var(--gold), 0 3px 8px rgba(0, 0, 0, .35); } .iwho.me small { background: var(--gold); color: #3b2a00; }
.iwho.amb { width: 26px; pointer-events: none; } .iwho.amb .av { width: 24px; height: 24px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8), 0 2px 4px rgba(0, 0, 0, .25); opacity: .92; }
.iwho.lecturer .av { box-shadow: 0 0 0 2.5px #0f766e, 0 3px 6px rgba(0, 0, 0, .3); }
.iwho.player .av { box-shadow: 0 0 0 2.5px #2f6fdb, 0 3px 6px rgba(0, 0, 0, .3); }
/* arrange panel */
.int-edit { position: relative; z-index: 3; margin: 0 10px calc(10px + var(--safe-b)); border-radius: 22px; padding: 10px; display: grid; gap: 8px; max-height: 46dvh; overflow: hidden; }
.ped-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ped-head b { flex: 1; font-size: 14px; } .ped-head .mini { font-size: 11px; }
.ped-msg { background: var(--gold-soft); border-radius: 10px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; }
.ped-sel { display: flex; align-items: center; gap: 8px; background: var(--green-soft); border-radius: 12px; padding: 6px 10px; font-size: 13px; flex-wrap: wrap; } .ped-sel b { flex: 1; min-width: 120px; }
.ped-tabs { display: flex; gap: 6px; overflow-x: auto; } .ped-tabs button { flex: none; background: var(--cream); border-radius: 99px; padding: 5px 11px; font-size: 12px; font-weight: 800; color: var(--ink-soft); } .ped-tabs button.on { background: var(--green); color: #fff; }
.ped-items { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ped-card { flex: none; width: 118px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 7px 8px; display: grid; gap: 1px; }
.ped-card.on { border-color: var(--green-2); background: var(--green-soft); } .ped-card.poor { opacity: .55; }
.ped-card .pe { font-size: 26px; } .ped-card b { font-size: 12px; } .ped-card small { font-weight: 800; color: var(--green); } .ped-card i { font-style: normal; font-size: 10.5px; color: var(--ink-soft); line-height: 1.2; }
.ped-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ped-row span { width: 48px; font-size: 12px; font-weight: 800; } .ped-row small { color: var(--ink-soft); font-weight: 700; }
.ped-row .sw { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .15); } .ped-row .sw.on { box-shadow: 0 0 0 3px var(--green-2); }
@media (min-width: 880px) { .int-foot, .int-edit { width: min(760px, calc(100% - 20px)); margin-left: auto; margin-right: auto; } }

.istall { position: absolute; left: 3px; right: 3px; top: 20px; bottom: 3px; width: calc(100% - 6px); height: calc(100% - 23px); object-fit: cover; border-radius: 6px; pointer-events: none; z-index: 0; }
.ipr.ad { display: none; }

.walker i { left: -5px; top: -5px; width: 11px; height: 11px; }
.player[data-ride]:not([data-ride=""])::after { font-size: 28px; left: 8px; top: -8px; }

/* ---------- the estate waterfall ---------- */
.wfall { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; will-change: transform; }
.wfall .wf-sheet { position: absolute; inset: 0 8% 10% 8%; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(190,230,250,.75)); border-radius: 3px 3px 40% 40%; opacity: .85; }
.wfall i { position: absolute; top: -10%; width: 7%; height: 80%; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 40%, rgba(255,255,255,0)); border-radius: 99px; animation: wfdrop .9s linear infinite; }
.wfall .wf-mist { position: absolute; left: -12%; right: -12%; bottom: -18%; height: 40%; background: radial-gradient(ellipse at center, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); animation: wfmist 2.4s ease-in-out infinite; }
@keyframes wfdrop { from { transform: translateY(-30%); opacity: .2; } 50% { opacity: 1; } to { transform: translateY(70%); opacity: .2; } }
@keyframes wfmist { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }

/* ---------- guide, welcome, daily check-in ---------- */
.gd details { background: #fff; border-radius: 14px; margin: 8px 0; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.gd summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.gd summary::-webkit-details-marker { display: none; }
.gd summary::after { content: '⌄'; margin-left: auto; opacity: .5; transition: transform .2s; }
.gd details[open] summary::after { transform: rotate(180deg); }
.gd .gb { padding: 0 14px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.gd .gb b { color: var(--ink); }
.gd .gb ul { margin: 6px 0 0 18px; padding: 0; }
.gd .gb li { margin: 4px 0; }
.gd .gb p { margin: 0 0 6px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.days .dy { background: var(--cream); border-radius: 10px; padding: 6px 2px; text-align: center; font-size: 10px; line-height: 1.25; }
.days .dy b { display: block; font-size: 11px; }
.days .dy.done { background: var(--green-soft); color: var(--green); }
.days .dy.now { background: var(--gold); color: #3a2a00; box-shadow: 0 4px 12px rgba(242, 182, 50, .45); transform: translateY(-2px); }
.ul-welcome { position: fixed; inset: 0; z-index: 120; background: rgba(10, 30, 20, .55); display: flex; align-items: center; justify-content: center; padding: 18px; backdrop-filter: blur(4px); animation: ulfade .25s ease; }
.ul-welcome.out { opacity: 0; transition: opacity .2s; }
.ul-welcome .wc { background: #fff; border-radius: 26px; max-width: 420px; width: 100%; padding: 22px 20px 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, .4); text-align: center; max-height: 92vh; overflow: auto; }
.ul-welcome h2 { font-family: var(--display); font-size: 22px; margin: 6px 0 8px; }
.ul-welcome p { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.ul-welcome ol { text-align: left; margin: 8px 0 14px 18px; padding: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.ul-welcome ol li { margin: 6px 0; }
.ul-welcome ol b { color: var(--ink); }
.ul-welcome .wb { display: grid; gap: 8px; margin-top: 10px; }
.ul-welcome .days { margin: 12px 0 8px; }
@keyframes ulfade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 3D rooms ---------- */
#interior { background: linear-gradient(180deg, #bfe0f6 0%, #d9ecf5 38%, #eef3ea 100%); }
.int-view { position: relative; overflow: hidden; padding: 0; }
.int-view #icv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
.int-view #icv:active { cursor: grabbing; }
#interior.editing .int-head { display: none; }
#interior .ed-top { display: none; position: absolute; z-index: 5; left: 10px; right: 10px; top: calc(10px + var(--safe-t)); align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
#interior.editing .ed-top { display: flex; }
.ed-top > * { pointer-events: auto; }
.edpill { background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); }
.edpill.money { color: var(--green); }
#interior.editing .int-zoom { top: 64px; }
.int-edit.hidden { display: none; }
.int-edit { background: #fff; border-radius: 26px 26px 0 0; margin: 0; padding: 12px 14px calc(12px + var(--safe-b)); max-height: 54dvh; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .2); }
.int-edit.collapsed { max-height: none; }
@media (min-width: 880px) { .int-edit { width: min(720px, 100%); margin: 0 auto; } }
.cat-top { display: flex; align-items: center; gap: 10px; } .cat-top b { font-family: var(--display); font-size: 19px; } .cat-top .mini { flex: 1; font-size: 11px; color: var(--ink-soft); }
.chipb { background: #eef0ee; border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 12px; color: var(--ink-soft); }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; } .cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { flex: none; display: flex; align-items: center; gap: 6px; background: #f1f3f1; border-radius: 99px; padding: 8px 13px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.cat-tabs button span { font-size: 14px; } .cat-tabs button.on { background: #17261e; color: #fff; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow-y: auto; padding: 2px 2px 6px; min-height: 120px; -webkit-overflow-scrolling: touch; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-card { position: relative; background: #f7f8f7; border: 2px solid transparent; border-radius: 18px; padding: 18px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.cat-card img { width: 88px; height: 88px; object-fit: contain; pointer-events: none; }
.cat-card b { font-size: 11.5px; line-height: 1.2; min-height: 27px; display: flex; align-items: center; } .cat-card em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--green); }
.cat-card .csz { position: absolute; left: 8px; top: 6px; font-size: 10px; font-weight: 800; color: var(--ink-soft); } .cat-card .cst { position: absolute; right: 8px; top: 5px; font-size: 9px; letter-spacing: -1px; color: #e8a317; } .cat-card .cst s { text-decoration: none; color: #d6d9d6; }
.cat-card.on { border-color: var(--green-2); background: var(--green-soft); } .cat-card.poor em { color: var(--rose); } .cat-card.poor img { opacity: .65; }

/* ---------- chat actions: invite, visit, send money, send food ---------- */
.dmbar { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, .06); flex: none; }
.dmbar::-webkit-scrollbar { display: none; }
.dmpill { flex: none; display: flex; align-items: center; gap: 6px; border-radius: 99px; padding: 8px 13px; font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.dmpill span { font-size: 15px; }
.dmpill.green { background: #e1f5ea; color: #0f7b4f; } .dmpill.blue { background: #e4eefc; color: #1d4ed8; } .dmpill.gold { background: #fdf0c9; color: #8a5a00; } .dmpill.rose { background: #fde4e6; color: #b3262f; }
.syscard { align-self: center; max-width: 88%; margin: 8px auto; border-radius: 18px; padding: 9px 14px; text-align: center; font-weight: 700; font-size: 13px; background: #fdf0c9; color: #5b4300; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.syscard small { font-weight: 600; opacity: .65; font-size: 11px; }
.syscard.food { background: #fde4e6; color: #7a1d24; } .syscard.invite { background: #e1f5ea; color: #0b5a3a; }

/* ---------- UniBet ---------- */
.odds { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; }
.odd { background: #f3f4f6; border-radius: 12px; padding: 7px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-weight: 800; }
.odd small { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; } .odd b { font-size: 15px; }
.odd.on { background: #ea580c; color: #fff; } .odd.on small { color: #ffe4d1; }
.odd:disabled { opacity: .45; }

/* ---------- 3D rooms: rotate buttons, colour rows, wall and floor styles ---------- */
.int-zoom .rot { font-size: 20px; }
#interior.flat3d .int-zoom .rot, #interior.flat3d .int-zoom .photo { display: none; }
.ped-sel + .ped-row.pcol, .ped-row.pcol { background: #f4f7f4; border-radius: 12px; padding: 6px 10px; }
.ped-row.pcol small { margin-left: 4px; }
.ped-paint { display: grid; gap: 10px; overflow-y: auto; max-height: 32dvh; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
.ped-paint .ped-row span { width: 78px; flex: none; }
.stylechip { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px; padding: 6px 8px; border-radius: 14px; background: #f1f3f1; border: 2px solid transparent; font-size: 11.5px; font-weight: 800; color: var(--ink); text-align: center; line-height: 1.15; }
.stylechip i { font-style: normal; font-size: 20px; }
.stylechip small { font-size: 10px; color: var(--green); font-weight: 800; }
.stylechip.on { border-color: var(--green-2); background: var(--green-soft); }
.cat-card .cwall { position: absolute; left: 6px; bottom: 5px; font-size: 9px; font-weight: 800; background: #17261e; color: #fff; border-radius: 99px; padding: 1px 6px; }
.cat-card .ccol { position: absolute; right: 7px; bottom: 5px; font-size: 11px; }

/* Buy mode on a big screen: the catalogue becomes a side panel so the room stays large */
@media (min-width: 900px) {
  #interior.editing { display: block; }
  #interior.editing .int-view { position: absolute; left: 0; top: 0; bottom: 0; right: 400px; }
  #interior.editing .int-tint { right: 400px; }
  #interior.editing .int-edit { position: absolute; right: 0; top: 0; bottom: 0; width: 400px; max-height: none; margin: 0; border-radius: 0; box-shadow: -8px 0 30px rgba(0, 0, 0, .18); overflow-y: auto; }
  #interior.editing .int-zoom { right: 412px; top: 70px; }
  #interior.editing .ed-top { right: 412px; }
  #interior.editing .cat-grid { grid-template-columns: repeat(2, 1fr); flex: 1; min-height: 0; }
  #interior.editing .ped-paint { max-height: none; flex: 1; }
}
@media (max-width: 899px) { .int-edit { max-height: 50dvh; } .ped-paint { max-height: 28dvh; } }
.ped-row.pcol { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ped-row.pcol::-webkit-scrollbar { display: none; } .ped-row.pcol .sw { flex: none; }

/* ---- chat: replies, voice notes, public money, the how-to-play card and page ---- */
[hidden] { display: none !important; }
.msg .mc { min-width: 0; }
.msg.mine .mc { display: flex; flex-direction: column; align-items: flex-end; }
.msg .nm button { font-size: 13px; }
.macts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; opacity: 0; transition: opacity .15s; margin-top: 1px; }
.macts button { font-size: 13px; opacity: .7; } .macts i { font-style: normal; font-size: 10.5px; opacity: .55; font-weight: 600; }
.msg:hover .macts { opacity: 1; }
@media (hover: none) { .msg .nm button { opacity: .6; } .macts { opacity: 1; } }
.rq { display: flex; flex-direction: column; text-align: left; max-width: 100%; background: rgba(15, 123, 79, .09); border-left: 3px solid var(--green-2); border-radius: 8px; padding: 4px 9px; margin-top: 3px; font-size: 11.5px; line-height: 1.3; cursor: pointer; }
.rq b { color: var(--green); font-size: 11px; } .rq span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.msg.flash p, .msg.flash .voice { animation: msgflash 1.8s ease; }
@keyframes msgflash { 0%, 55% { box-shadow: 0 0 0 3px rgba(242, 182, 50, .85); background: #fff4d0; } 100% { box-shadow: 0 0 0 0 rgba(242, 182, 50, 0); } }
.voice { display: inline-flex; align-items: center; gap: 9px; background: var(--cream); padding: 7px 12px 7px 8px; border-radius: 4px 18px 18px 18px; margin-top: 2px; min-width: 200px; max-width: 100%; }
.msg.mine .voice { background: var(--green); color: #fff; border-radius: 18px 18px 4px 18px; }
.voice .vp { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-size: 14px; flex: none; display: grid; place-items: center; }
.msg.mine .voice .vp { background: #fff; color: var(--green); }
.voice.loading .vp { opacity: .6; }
.vwave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; min-width: 0; }
.vwave i { display: block; width: 3px; border-radius: 2px; background: rgba(23, 38, 30, .28); flex: none; }
.vwave i.on { background: var(--green); }
.msg.mine .vwave i { background: rgba(255, 255, 255, .45); } .msg.mine .vwave i.on { background: #fff; }
.voice .vt { font-size: 11.5px; font-weight: 700; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.replybar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #eef6f1; border-top: 1px solid var(--line); flex: none; }
.replybar .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; border-left: 3px solid var(--green-2); padding-left: 8px; }
.replybar .rt b { color: var(--green); } .replybar .rt i { font-style: normal; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replybar button { width: 30px; height: 30px; border-radius: 50%; font-size: 14px; background: #fff; flex: none; }
.chatform .mic { background: #e1f5ea; color: var(--green); font-size: 19px; }
.recbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; flex: none; }
.recbar .rdot { width: 16px; height: 16px; border-radius: 50%; background: #e5252a; flex: none; transition: transform .08s; box-shadow: 0 0 0 4px rgba(229, 37, 42, .18); margin: 0 4px; }
.recbar .rtime { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; flex: none; }
.recbar .rhint { flex: 1; font-size: 12px; color: var(--ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recbar .rcx { width: 40px; height: 40px; border-radius: 50%; background: #fde4e6; font-size: 17px; flex: none; }
.recbar .rsend { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font-size: 18px; flex: none; }
.syscard.money.pub { background: linear-gradient(135deg, #fdf0c9, #fbe2a0); max-width: 92%; }
.syscard .lk { cursor: pointer; text-decoration: underline dotted; }
.syscard .amt { font-size: 18px; font-family: var(--display); }
.syscard.howto { background: #e4eefc; color: #173a7a; }
.syscard .btn { white-space: nowrap; }
.howland { position: fixed; inset: 0; z-index: 90; background: rgba(246, 242, 232, .98); overflow-y: auto; -webkit-overflow-scrolling: touch; transition: opacity .2s; }
.howland.out { opacity: 0; }
.howland .hl-in { max-width: 640px; margin: 0 auto; padding: 22px 16px calc(100px + var(--safe-b)); }
.howland h1 { font-family: var(--display); font-size: 27px; text-align: center; margin: 6px 0 8px; }
.howland .hl-sub { text-align: center; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.5; }
.howland .hl-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(640px, 100%); padding: 10px 16px calc(10px + var(--safe-b)); background: rgba(246, 242, 232, .96); backdrop-filter: blur(8px); display: flex; gap: 10px; box-sizing: border-box; }
.howland .hl-bar .btn { flex: 1; }

/* ---- stickers ---- */
.stk { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: var(--s, 112px); height: var(--s, 112px); border-radius: 30%; background: linear-gradient(145deg, var(--a, #ffe27a), var(--b, #ffb347)); border: calc(var(--s, 112px) * .045) solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 7px 16px rgba(30, 40, 30, .18); transform: rotate(var(--r, 0deg)); box-sizing: border-box; overflow: hidden; gap: calc(var(--s, 112px) * .02); flex: none; }
.stk i { font-style: normal; font-size: calc(var(--s, 112px) * .44); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.stk b { font-family: var(--display); font-weight: 800; font-size: calc(var(--s, 112px) * .125); line-height: 1.05; text-align: center; color: #2b1d0e; padding: 0 6%; max-width: 100%; overflow-wrap: anywhere; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.stkwrap { padding: 4px 2px; }
.stkpanel { flex: none; background: #fff; border-top: 1px solid var(--line); max-height: min(262px, 38dvh); display: flex; flex-direction: column; }
.stktabs { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; scrollbar-width: none; }
.stktabs button { width: 42px; height: 36px; border-radius: 12px; font-size: 20px; flex: none; background: var(--cream); }
.stktabs button.on { background: #fde68a; box-shadow: inset 0 0 0 2px #f2b632; }
.stkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; padding: 10px; overflow-y: auto; justify-items: center; }
.stkb { padding: 2px; border-radius: 22px; background: transparent; }
.stkb:active { transform: scale(.93); }
.chatform .stkbtn { background: #fdf0c9; color: inherit; font-size: 20px; }

/* ---- Gallery ---- */
.shotflash { position: fixed; inset: 0; z-index: 200; background: #fff; pointer-events: none; animation: shotflash .45s ease-out forwards; }
@keyframes shotflash { 0% { opacity: .85; } 100% { opacity: 0; } }
.ggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.gthumb { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--cream); padding: 0; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 9.5px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); text-align: left; }
.gfull { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 14px; background: #111; display: block; }

/* ---- pictures in chats ---- */
.pic { display: block; padding: 0; border-radius: 14px; overflow: hidden; background: var(--cream); margin-top: 2px; max-width: 224px; }
.pic img { display: block; width: 100%; max-width: 224px; max-height: 280px; object-fit: cover; }
.chatform .attbtn { background: #e4eefc; color: inherit; font-size: 19px; }

/* the fountain on the roundabout in front of the Senate */
.rfount { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.rfount .rf-stone { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #cfd6dc 0 58%, #b9c3cc 59% 66%, #e9eef2 67% 72%, #9aa6b0 73% 76%, rgba(0,0,0,0) 77%); box-shadow: 0 2px 5px rgba(18, 40, 28, .3); }
.rfount .rf-water { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c8eefc, #5ec2ec 55%, #2f9bd0); animation: rfsh 3.2s ease-in-out infinite; }
.rfount .rf-ring { position: absolute; inset: 22%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); animation: rfring 2.6s ease-out infinite; }
.rfount .rf-ring.b { animation-delay: -.9s; } .rfount .rf-ring.c { animation-delay: -1.7s; }
.rfount .rf-col { position: absolute; left: 50%; top: 50%; width: 16%; height: 16%; margin: -8% 0 0 -8%; border-radius: 50%; background: radial-gradient(circle, #fff 0 45%, #bfeaff 80%, rgba(255,255,255,0)); animation: rfcol 1.1s ease-in-out infinite alternate; }
.rfount .rf-jet { position: absolute; left: 50%; top: 50%; width: 3.5%; height: 36%; margin-left: -1.75%; transform-origin: 50% 0; transform: rotate(var(--a)) translateY(8%); background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0)); border-radius: 99px; animation: rfjet 1.5s ease-out infinite; }
.rfount .rf-spark { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.7), rgba(255,255,255,0) 30%); animation: rfsp 4s linear infinite; }
@keyframes rfsh { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
@keyframes rfring { 0% { transform: scale(.35); opacity: .95; } 100% { transform: scale(1.1); opacity: 0; } }
@keyframes rfcol { from { transform: scale(.8); } to { transform: scale(1.15); } }
@keyframes rfjet { 0% { opacity: .95; height: 6%; } 100% { opacity: 0; height: 38%; } }
@keyframes rfsp { to { transform: rotate(360deg); } }

/* the 3D scenes: the trip view and the open-air places */
.s3 { position: absolute; inset: 0; z-index: 12; overflow: hidden; touch-action: none; }
.s3sky { position: absolute; inset: 0; }
.s3c, .s3tags { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.s3tags { pointer-events: none; }
.s3fade { position: absolute; inset: 0; background: #0b1220; opacity: 0; pointer-events: none; }
.s3cap { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(15, 25, 40, .78); color: #fff; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; }
.s3cap.on { opacity: 1; }
.s3hud { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); display: flex; gap: 8px; z-index: 2; }
.s3hud button { height: 42px; min-width: 46px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .93); font-weight: 800; font-size: 15px; box-shadow: 0 2px 8px rgba(18, 40, 28, .3); white-space: nowrap; }
.s3hud button.wide { padding: 0 16px; font-size: 14px; }
.s3hud button.on { background: #111c33; color: #fff; }
body.s3on #zoom { display: none !important; }

/* ---------- UniGram, edited messages, waiting payments ---------- */
.edtag { font-style: normal; font-size: 10px; font-weight: 700; opacity: .5; margin: 0 4px; }
.gchips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.gchips.wrap { flex-wrap: wrap; overflow: visible; }
.gchips button { flex: none; padding: 7px 12px; border-radius: 99px; background: var(--cream); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.gchips button.on { background: #7c3aed; color: #fff; }
.gpost { background: #fff; border-radius: 18px; margin: 10px 0; overflow: hidden; box-shadow: 0 2px 10px rgba(18, 40, 28, .08); }
.gph { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.gpav { width: 40px; height: 40px; border-radius: 14px; overflow: hidden; flex: none; background: var(--cream); }
.gpav.sm { width: 32px; height: 32px; border-radius: 11px; }
.gimgb { display: block; width: 100%; background: #111c33; }
.gimgb img { display: block; width: 100%; max-height: 62dvh; object-fit: contain; }
.gact { display: flex; gap: 14px; align-items: center; padding: 8px 12px; }
.gact button { font-size: 16px; padding: 4px 2px; }
.gact button.on b { color: #e11d48; }
.gcap { padding: 0 12px 12px; font-size: 13.5px; line-height: 1.4; }
.gcoms { max-height: 42dvh; overflow: auto; display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.gcom { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.gcom button { font-size: 14px; opacity: .6; }
.macts button { font-size: 15px; padding: 3px 4px; }
/* ---------- the phone runs smoothly: its own layers, a cheaper shadow, nothing animating behind it ---------- */
.phome { display: contents; }
.phone { will-change: transform; box-shadow: 0 -8px 28px rgba(0, 0, 0, .3); contain: layout paint; }
.phone .screen { will-change: transform; contain: layout paint; transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.phone .screen .bd { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.phone .app, .phone .act, .phone .btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body.phone-open .ambient-layer, body.phone-open .ambient-layer * { animation-play-state: paused !important; }
body.covered .ambient-layer { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .phone, .phone .screen { transition-duration: .01s; } }

/* =====================================================================================================================
   THE PHONE: a modern iPhone. Titanium frame and Dynamic Island on a computer; a full-screen phone on a phone.
   Status bar, wallpaper, widgets, icon pages, a dock, a home bar. Light app screens in the iOS grouped style.
   ===================================================================================================================== */
.phone { contain: layout style; padding: 0; background: #000; overflow: visible; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.phone .pface { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #0a3d33; isolation: isolate; contain: layout paint; }
.phone .pwall { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(120% 62% at 14% -6%, rgba(52, 211, 153, .85) 0%, rgba(52, 211, 153, 0) 58%),
  radial-gradient(90% 55% at 104% 26%, rgba(34, 211, 238, .5) 0%, rgba(34, 211, 238, 0) 62%),
  radial-gradient(110% 70% at -6% 104%, rgba(56, 70, 190, .85) 0%, rgba(56, 70, 190, 0) 62%),
  linear-gradient(172deg, #0f7b4f 0%, #0a4f45 46%, #14284d 100%); }
.phone .pstat { position: absolute; top: 0; left: 0; right: 0; height: 58px; padding: 19px 34px 0 38px; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -.2px; z-index: 6; pointer-events: none; transition: color .2s; }
.phone .pstat .psys { display: flex; gap: 6px; align-items: center; padding-top: 2px; }
.phone .pface.inapp .pstat { color: #111; }
.phone .pisland { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 122px; height: 35px; border-radius: 20px; background: #000; z-index: 7; display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 11.5px; font-weight: 600; pointer-events: none; transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.phone .pisland.live { width: 176px; }
.phone .pisland i { position: absolute; right: 16px; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #26304a 0%, #0b0f1c 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.phone .phome { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding-top: 62px; }
.phone .ppages { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.phone .ppages::-webkit-scrollbar { display: none; }
.phone .ppage { flex: 0 0 100%; scroll-snap-align: start; padding: 4px 22px 0; overflow-y: auto; scrollbar-width: none; }
.phone .ppage::-webkit-scrollbar { display: none; }
.phone .pwid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 20px; }
.phone .wid { height: 146px; border-radius: 26px; padding: 14px 16px; text-align: left; color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; background: rgba(255, 255, 255, .17); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3), 0 6px 18px rgba(0, 0, 0, .12); transition: transform .12s; }
.phone .wid:active { transform: scale(.97); }
.phone .wid span { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .wt { font-size: 46px; font-weight: 300; letter-spacing: -1.5px; line-height: 1; }
.phone .wd { font-size: 14px; font-weight: 600; opacity: .95; margin-top: -4px; }
.phone .wl { font-size: 11.5px; font-weight: 500; opacity: .8; }
.phone .wk { font-size: 12.5px; font-weight: 700; opacity: .85; }
.phone .wv { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.phone .pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 6px; padding-bottom: 8px; }
.phone .app { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; color: #fff; font-size: 11px; min-width: 0; }
.phone .app .ic { width: 62px; height: 62px; border-radius: 22.5%; display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .28), inset 0 0 0 .5px rgba(255, 255, 255, .24); transition: transform .12s, filter .12s; }
.phone .app .ic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 52%); pointer-events: none; }
.phone .app .ic b { font-size: 30px; font-weight: 400; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.phone .app:active .ic { transform: scale(.9); filter: brightness(.82); }
.phone .app .al { font-size: 11px; font-weight: 500; max-width: 78px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.phone .app .badge { position: absolute; top: -6px; right: calc(50% - 40px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 1.5px rgba(10, 60, 50, .35); z-index: 2; }
.phone .pdots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 12px; }
.phone .pdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .38); transition: background .2s, transform .2s; }
.phone .pdots i.on { background: #fff; transform: scale(1.1); }
.phone .pdock { margin: 0 14px 26px; padding: 14px 16px; border-radius: 36px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.phone .hbar { position: absolute; left: 50%; bottom: calc(8px + var(--safe-b)); width: 138px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .9); transform: translateX(-50%); z-index: 8; cursor: pointer; margin: 0; }
.phone .hbar::before { content: ''; position: absolute; inset: -16px -24px; }
.phone .hbar.dark { background: rgba(0, 0, 0, .78); }

/* app screens: iOS grouped style */
.phone .screen { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: #f2f2f7; color: #111; border-radius: inherit; --cream: #ffffff; transform: translateY(5%) scale(.95); opacity: 0; pointer-events: none; transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .22s ease; will-change: transform, opacity; }
.phone .screen.on { transform: none; opacity: 1; pointer-events: auto; }
.phone .screen .hd2 { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; padding: 56px 8px 6px; background: #f2f2f7; flex: none; position: relative; z-index: 2; gap: 0; }
.phone .screen .hd2 h2 { font: 600 17px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; letter-spacing: -.2px; text-align: center; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .screen .back { width: 46px; height: 40px; border-radius: 12px; background: none; display: grid; place-items: center; color: #0f7b4f; padding: 0; font-size: 0; }
.phone .screen .back:active { opacity: .45; }
.phone .screen .bd { padding: 6px 16px 40px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.phone .screen .bd.fill { padding: 0 0 22px; }
.phone .screen .sec { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6c6c70; margin: 20px 4px 6px; }
.phone .screen .card, .phone .screen .act { border-radius: 16px; }
.phone .screen .act { background: #fff; box-shadow: 0 .5px 0 rgba(0, 0, 0, .05); }
.phone .screen .list { gap: 8px; }
@media (max-width: 899px) {
  .phone { left: 0; right: 0; bottom: 0; width: 100%; height: 100dvh; max-height: none; transform: translateY(104%); border-radius: 0; box-shadow: none; }
  .phone.on { transform: none; }
  .phone .pstat, .phone .pisland { display: none; }
  .phone .phome { padding-top: calc(var(--safe-t) + 14px); }
  .phone .screen .hd2 { padding-top: calc(var(--safe-t) + 10px); }
  .phone .pface { border-radius: 0; }
}
@media (min-width: 900px) {
  .phone { right: 24px; bottom: 16px; left: auto; width: 408px; height: min(836px, calc(100dvh - 32px)); padding: 0; border-radius: 62px; transform: translate(0, 112%);
    background: linear-gradient(145deg, #5a5a5e 0%, #1f1f21 28%, #2d2d30 60%, #121214 100%);
    box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1.5px rgba(255, 255, 255, .16), inset 0 0 0 2px rgba(255, 255, 255, .08); }
  .phone.on { transform: none; }
  .phone::before { content: ''; position: absolute; right: -3.5px; top: 210px; width: 4px; height: 92px; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #3a3a3d, #1d1d1f); }
  .phone::after { content: ''; position: absolute; left: -3.5px; top: 170px; width: 4px; height: 56px; border-radius: 3px 0 0 3px; background: linear-gradient(270deg, #3a3a3d, #1d1d1f); box-shadow: 0 74px 0 #2a2a2d, 0 -52px 0 #2a2a2d; }
  .phone .pface { inset: 11px; border-radius: 51px; }
}
@media (prefers-reduced-motion: reduce) { .phone .screen, .phone .pisland, .phone .app .ic { transition-duration: .01s; } }
/* the 📸 button stays clear of the phone: beside it on a computer, in the empty corner of the title bar on a phone */
@media (min-width: 900px) { body.phone-open #shotbtn { right: 450px; bottom: 24px; } }
@media (max-width: 899px) { .phone .phome { padding-top: calc(var(--safe-t) + 54px); } body.phone-open #shotbtn { top: calc(var(--safe-t) + 9px); bottom: auto; right: 8px; width: 38px; height: 38px; font-size: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); } }
