/* README — roguelike.css: the roguelike page around the canvas: HUD, menu button, touch stick,
   action button, dialogue box, sheets (menu, shops, card picks), toasts, the intro and the endings.
   Phone first; only transform / opacity animate. The pack opening is pack-pick.css. */
:root { --rl-bg: #07090d; --rl-panel: rgba(2,2,2,0.8); --rl-line: #30363d; --rl-text: #f0f6fc; --rl-muted: #8b949e; --rl-violet: #8b5cf6; --rl-gold: #e3b341; --rl-red: #f85149; --rl-green: #2ea043; }
html, body { margin: 0; height: 100%; background: var(--rl-bg); color: var(--rl-text); overflow: hidden; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-tap-highlight-color: transparent; }
#rl-root { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; touch-action: none; }
#rl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }

/* HUD */
#rl-hud { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 88px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: calc(100% - 88px - 62px); pointer-events: none; } /* (clear of the menu button on the right) */
#rl-hud > span { background: rgba(13,17,23,.78); border: 1px solid var(--rl-line); border-radius: 999px; padding: 5px 10px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.rl-hearts { display: inline-flex; gap: 3px; }
i.h { display: inline-block; width: 15px; height: 14px; background: rgba(255,255,255,.2); clip-path: path('M7.5 13.5 C-2 6.5 1 0 4.5 0 C6 0 7 1 7.5 2.2 C8 1 9 0 10.5 0 C14 0 17 6.5 7.5 13.5Z'); vertical-align: -2px; }
i.h.on { background: var(--rl-red); }
.rl-hearts.blue i.h:not(.on) { background: #101216; box-shadow: inset 0 0 0 1px rgba(120,170,255,.35); }
.rl-hearts.blue i.h.on { background: #3a8cff; box-shadow: 0 0 6px #7ab8ff; } /* the god cheat's blue hearts: they come back (cheats.js) */
.rl-cheat { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); z-index: 60; display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(10,12,18,.92); border: 1px solid #7a5cff; }
.rl-cheat input { width: 220px; font: 16px monospace; color: #e8e4ff; background: transparent; border: 0; outline: none; }
i.coin { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe58a, var(--rl-gold) 60%, #9a6b00); }
.rl-sis::before { content: '♀'; color: #f778ba; margin-right: 2px; }
.rl-drink i { display: inline-block; width: 8px; height: 14px; border-radius: 2px; background: #d9a521; }
.rl-drink.lonkero i { background: #3fb6e0; }
.rl-drink.glass i { background: rgba(200,230,255,.5); border: 1px solid #fff; }
#rl-areaname { position: absolute; top: 18%; left: 0; right: 0; text-align: center; font-size: clamp(18px, 4vw, 30px); font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 12px #000; opacity: 0; pointer-events: none; }
#rl-areaname.in { animation: rl-name 2.6s ease forwards; }
@keyframes rl-name { 0% { opacity: 0; transform: translateY(8px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#rl-menu-btn { position: absolute; top: max(8px, env(safe-area-inset-top)); right: 12px; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--rl-line); background: rgba(13,17,23,.82); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; }
#rl-menu-btn i { width: 20px; height: 2.5px; background: var(--rl-text); border-radius: 2px; }

/* Touch stick + action button: phones (coarse pointers) only for the stick. The stick is a translucent ring at
   the middle bottom drawn over the world (no strip of its own: the canvas fills the screen); a press on it (its
   zone a little wider than the ring) takes it, anywhere else is the world's (a tap walks). The app's stick.rs. */
#rl-stick { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); width: 168px; height: 168px; margin-left: -84px; display: none; z-index: 3; touch-action: none; }
#rl-stick .base { position: absolute; left: 24px; top: 24px; width: 120px; height: 120px; box-sizing: border-box; border-radius: 50%; background: rgba(13,17,23,.18); border: 2px solid rgba(255,255,255,.3); opacity: .6; transition: opacity .15s; }
#rl-stick.active .base { opacity: .95; transition: none; }
#rl-stick .knob { position: absolute; left: 32px; top: 32px; width: 52px; height: 52px; border-radius: 50%; background: rgba(139,92,246,.7); box-shadow: 0 0 16px rgba(139,92,246,.5); }
@media (pointer: coarse), (max-width: 760px) { #rl-stick { display: block; } }
body.rl-busy #rl-stick { opacity: 0; pointer-events: none; }
#rl-act { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px)); min-width: 92px; height: 64px; padding: 0 20px; border-radius: 32px; border: 2px solid #a78bfa; background: linear-gradient(#8b5cf6, #6d28d9); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 6px 24px rgba(109,40,217,.5); cursor: pointer; animation: rl-pop .18s ease; }
#rl-act:active { transform: scale(.95); }
/* With the touch stick (the app's Mode::action_y): the action button at the middle, over the stick's ring, not on it;
   main.js lifts it over the Attack / Lock buttons where it would lie on them. */
@media (pointer: coarse), (max-width: 760px) {
  #rl-act { right: auto; left: 50%; translate: -50% 0; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 152px); max-width: calc(100% - 24px); white-space: nowrap; }
}
@keyframes rl-pop { from { transform: scale(.7); opacity: 0; } }

/* Dialogue */
/* The JRPG text box (dialogue.js): near-black (#020202), a little see-through, along the bottom, the name
   on a tab above its top-left edge, the typed line, a blinking ▼; the talkers' portraits behind its ends (#rl-vn). */
.rl-dialog { --tb: #bc8cff; position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); width: min(900px, calc(100% - 24px)); min-height: 124px; transform: translate(-50%, 10px) scale(.96); opacity: 0; transition: transform .32s cubic-bezier(.2,.9,.3,1.2), opacity .2s; display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px 18px; box-sizing: border-box; border-radius: 16px; color: #e6edf3; z-index: 20; cursor: pointer;
  background: rgba(2,2,2,0.8);
  border: 1px solid color-mix(in srgb, var(--tb) 45%, transparent); box-shadow: 0 18px 50px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05); }
.rl-dialog.in { transform: translate(-50%, 0); opacity: 1; }
.rl-dialog.tone-narr { --tb: #8b949e; font-style: italic; }
.rl-dialog.tone-me { --tb: #58a6ff; }
.rl-tb-name { position: absolute; left: 18px; top: -34px; padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: #fff;
  background: color-mix(in srgb, var(--tb) 45%, #020202); border: 1px solid var(--tb); box-shadow: 0 0 12px color-mix(in srgb, var(--tb) 30%, transparent); }
/* The visual-novel portraits: behind the box's two ends, their feet hidden by it; the right one mirrored. */
.rl-vn { position: absolute; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 40px); width: min(900px, calc(100% - 24px)); height: min(64vh, 640px); transform: translateX(-50%); z-index: 19; pointer-events: none; opacity: 0; transition: opacity .25s; }
.rl-vn.in { opacity: 1; }
.rl-vn img { position: absolute; bottom: 0; height: 100%; width: auto; transition: filter .2s, transform .32s cubic-bezier(.2,.9,.3,1.2); }
.rl-vn img.l { left: 0; transform: translateX(-16%); }
.rl-vn img.r { right: 0; transform: translateX(16%) scaleX(-1); }
.rl-vn img.dim { filter: brightness(.42) saturate(.85); }
.rl-vn img[hidden] { display: none; }
.rl-face { width: 104px; height: 104px; object-fit: cover; object-position: 50% 0; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--tb) 80%, transparent); flex: none; background: #000; box-shadow: 0 0 16px color-mix(in srgb, var(--tb) 25%, transparent); }
.rl-dbody { flex: 1; min-width: 0; padding-right: 18px; }
.rl-dhearts { color: var(--rl-red); font-size: 12px; letter-spacing: 1px; margin-left: 8px; }
.rl-dhearts .off { color: rgba(255,255,255,.25); }
/* Talking by interest: their smile at a good answer (quests.js; the app's dialogue.rs smile). */
.rl-smile { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-left: 10px; border-radius: 50%; background: #f0c040; color: #0d1117; border: 1.5px solid rgba(255,255,255,.8); box-shadow: 0 0 14px rgba(240,192,64,.5); font-size: 1.15em; vertical-align: middle; animation: rl-smile-pop .36s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes rl-smile-pop { from { transform: scale(0); } to { transform: scale(1); } }
.rl-dtext { font-size: 20px; line-height: 1.55; min-height: 3.1em; white-space: pre-wrap; }
.rl-tb-arrow { position: absolute; right: 20px; bottom: 14px; color: var(--tb); font-size: 14px; opacity: 0; font-style: normal; }
.rl-dialog.all .rl-tb-arrow { animation: rl-tb-blink 1s steps(1) infinite, rl-tb-bob .8s ease-in-out infinite; }
@keyframes rl-tb-blink { 0% { opacity: 1; } 60% { opacity: .25; } }
@keyframes rl-tb-bob { 50% { transform: translateY(3px); } }
.rl-dbtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; font-style: normal; }
.rl-dbtns:empty { display: none; }
.rl-tb-pill { --pl: #bc8cff; border-radius: 999px; padding: 9px 20px; font-weight: 700; color: #fff; background: color-mix(in srgb, var(--pl) 30%, #0d1117); border: 1px solid var(--pl); box-shadow: 0 0 18px color-mix(in srgb, var(--pl) 30%, transparent); animation: rl-up .26s ease; }
.rl-tb-pill:hover { background: color-mix(in srgb, var(--pl) 15%, #0d1117); }
.rl-tb-pill.go { --pl: #3fb950; background: color-mix(in srgb, var(--pl) 30%, #0d1117); }
.rl-tb-pill.danger { --pl: #f85149; }
.rl-tb-pill.ghost { --pl: #8b949e; }
.rl-tb-pill[disabled] { opacity: .45; filter: grayscale(1); cursor: not-allowed; } /* a lesson won this run already: the app's Choice::off */
@media (max-width: 560px) {
  .rl-dialog { gap: 12px; padding: 14px; min-height: 0; }
  .rl-vn { height: 42vh; }
  .rl-dtext { font-size: 17px; min-height: 4.6em; }
  .rl-tb-name { font-size: 12px; }
}
.rl-btn { border: 1px solid var(--rl-line); background: #21262d; color: var(--rl-text); border-radius: 10px; padding: 10px 16px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.rl-btn.go { background: linear-gradient(#8b5cf6, #6d28d9); border-color: #a78bfa; color: #fff; }
.rl-btn.ghost { background: transparent; }
.rl-btn.danger { background: #3d1418; border-color: #f8514966; color: #ffa198; }
.rl-btn:disabled { opacity: .45; cursor: default; }

/* Sheets */
#rl-root .rl-panel { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 30; padding: 12px; box-sizing: border-box; }
.rl-sheet { width: min(460px, 100%); max-height: 100%; overflow: auto; background: var(--rl-panel); border: 1px solid var(--rl-line); border-radius: 16px; padding: 14px; box-sizing: border-box; animation: rl-up .2s ease; touch-action: pan-y; }
.rl-sheet.wide { width: min(760px, 100%); }
@keyframes rl-up { from { transform: translateY(20px); opacity: 0; } }
.rl-sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 18px; }
.rl-sheet-h b { flex: 1; }
.rl-sheet-h .rl-money { font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.rl-x { background: none; border: 0; color: var(--rl-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.rl-keeper { color: #c4b5fd; font-style: italic; margin: 0 0 10px; }
.rl-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rl-line); }
.rl-item-pic { width: 46px; height: 62px; object-fit: cover; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; }
.rl-item-pic.drink i { width: 18px; height: 34px; border-radius: 3px; background: #d9a521; box-shadow: inset 0 -8px 0 #1f3d8a; }
.rl-item-pic.drink.lonkero i { background: #3fb6e0; box-shadow: inset 0 -8px 0 #f2f2f2; }
.rl-item-pic.drink.glass i { width: 22px; background: linear-gradient(transparent 20%, #d9a521 20%); border: 2px solid rgba(255,255,255,.7); box-shadow: none; }
.rl-item-pic.drink.glass.lonkero i { background: linear-gradient(transparent 20%, #3fb6e0 20%); }
.rl-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-item-t small { color: var(--rl-muted); }
.rl-msg { color: #ffa198; min-height: 1em; margin-top: 8px; font-size: 14px; }
.rl-sub { color: var(--rl-muted); margin: 12px 0 8px; font-size: 14px; }
.rl-stats { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.rl-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.rl-dcard { padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; aspect-ratio: 563 / 776; }
.rl-dcard img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rl-deck.pick .rl-dcard { cursor: pointer; transition: transform .12s; }
.rl-deck.pick .rl-dcard:hover { transform: translateY(-3px); outline: 2px solid var(--rl-violet); }
.rl-sisters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rl-sister { text-align: center; font-size: 10px; color: var(--rl-muted); }
/* (In colour while she's out there; beaten — dusted — black and white. No outline: the user, 2026-12-01; the app's
   deck_view.rs the same.) */
.rl-sister img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.rl-sister.beaten img { filter: grayscale(1) brightness(.6); }
.rl-sister span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-menu-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }

/* Toasts, card shown, flush, fade, loading */
#rl-toasts { position: absolute; top: 64px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 40; }
.rl-toast { background: rgba(13,17,23,.92); border: 1px solid var(--rl-gold); color: var(--rl-text); border-radius: 999px; padding: 7px 16px; font-weight: 700; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; display: inline-flex; gap: 6px; align-items: center; }
.rl-toast.in { opacity: 1; transform: none; }
/* A card coming into the deck (sheet.js RL.showCard): gameplay/end-unlock.css' twirl without the frost and snow. */
.rl-gotcard { position: absolute; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  overflow: hidden; perspective: 900px; cursor: pointer; font-weight: 700; -webkit-user-select: none; user-select: none; }
.rl-gc-dim { position: absolute; inset: 0; opacity: 0; background: radial-gradient(60% 50% at 50% 42%, rgba(var(--gc, 255,214,120),.14), rgba(4,6,12,.78) 70%, rgba(4,6,12,.88)); }
.rl-gc-card { position: relative; flex: none; border-radius: 12px; transform-style: preserve-3d; will-change: transform; -webkit-touch-callout: none;
  box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 34px rgba(var(--gc, 227,179,65),.5); }
.rl-gc-card img { width: 100%; height: 100%; border-radius: 12px; display: block; object-fit: cover; backface-visibility: hidden; -webkit-touch-callout: none; pointer-events: none; }
.rl-gc-shine { position: absolute; inset: 0; border-radius: 12px; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 260% 100%; }
.rl-gc-card.landed .rl-gc-shine { animation: rl-gc-shine 1.6s ease-out .1s both; }
.rl-gc-card.landed { animation: rl-gc-glow 2.2s ease-in-out infinite alternate; }
@keyframes rl-gc-shine { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 0; background-position: -60% 0; } }
/* (The glow by the card's type: --gc set by sheet.js — rock green, paper blue, scissors orange, gun yellow.) */
@keyframes rl-gc-glow { from { box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 28px rgba(var(--gc, 227,179,65),.4); }
  to { box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 52px rgba(var(--gc, 227,179,65),.85); } }
.rl-gc-cap { position: relative; opacity: 0; max-width: min(90%, 520px); text-align: center; color: #fff3cf; font-size: 17px; text-shadow: 0 2px 8px #000; }
.rl-gc-cap b { display: block; font-size: 20px; }
.rl-gc-cap small { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: #d8cfb8; font-style: italic; }
.rl-gc-btns { position: relative; opacity: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; cursor: default; }
.rl-gc-btns .rl-btn { min-width: 150px; }
.rl-gc-btns .rl-btn:disabled { opacity: .55; cursor: default; }
.rl-gotcard.rl-gc-offer { cursor: default; }
.rl-gotcard.rl-gc-under { z-index: 29; } /* (a full deck's pick sheet, z 30, over it while a choice runs) */
@media (prefers-reduced-motion: reduce) { .rl-gc-card.landed, .rl-gc-card.landed .rl-gc-shine { animation: none; } }
.rl-flush { position: absolute; left: 50%; top: 45%; z-index: 45; pointer-events: none; }
.rl-flush img { width: 120px; margin: -83px 0 0 -60px; border-radius: 8px; display: block; }
.rl-flush.go img { animation: rl-flush 1.2s ease-in forwards; }
@keyframes rl-flush { to { transform: translateY(120px) rotate(900deg) scale(0); opacity: .2; } }
#rl-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .24s; z-index: 50; }
#rl-fade.on { opacity: 1; }
#rl-loading, #rl-boot { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: rgba(7,9,13,.85); z-index: 60; font-weight: 600; text-align: center; }
#rl-boot a { color: #58a6ff; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--rl-line); border-top-color: var(--rl-violet); animation: rl-spin .8s linear infinite; }
@keyframes rl-spin { to { transform: rotate(360deg); } }
#rl-karaoke { position: absolute; inset: 0; z-index: 35; }

/* Full screens: intro, endings */
#rl-screen { position: absolute; inset: 0; z-index: 55; background: radial-gradient(ellipse at 50% 30%, #2a1650, #07090d 70%); display: flex; align-items: center; justify-content: center; overflow: auto; }
.rl-intro, .rl-end { text-align: center; padding: 24px 16px; max-width: 720px; }
.rl-intro h1, .rl-end h1 { margin: 0 0 8px; font-size: clamp(26px, 6vw, 44px); }
.rl-intro h1 span { display: block; font-size: .55em; color: #c4b5fd; letter-spacing: .2em; text-transform: uppercase; }
.rl-story p { color: #c9d1d9; margin: 6px 0; animation: rl-up .6s ease both; }
.rl-story p:nth-child(2) { animation-delay: .5s; } .rl-story p:nth-child(3) { animation-delay: 1s; }
.rl-who { display: flex; gap: 16px; justify-content: center; margin: 24px 0 8px; }
.rl-whob { background: none; border: 2px solid var(--rl-line); border-radius: 14px; padding: 8px; color: var(--rl-text); cursor: pointer; width: min(200px, 42vw); transition: transform .25s, opacity .25s, border-color .2s; }
.rl-whob img { width: 100%; border-radius: 8px; display: block; margin-bottom: 6px; }
.rl-whob b { font-size: 16px; }
.rl-whob:hover { border-color: var(--rl-violet); transform: translateY(-4px); }
.rl-whob.picked { border-color: var(--rl-gold); transform: scale(1.06); }
.rl-whob.dim { opacity: .3; transform: scale(.92); }
.rl-hint { color: #ffa198; min-height: 1em; }
.rl-quit { color: var(--rl-muted); font-size: 14px; }
.rl-end p { color: #c9d1d9; }
.rl-end-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.rl-end.lost h1 { color: var(--rl-red); }
.rl-ecg { width: min(420px, 90vw); height: 80px; }
.rl-ecg path { fill: none; stroke: var(--rl-red); stroke-width: 3; stroke-dasharray: 600; stroke-dashoffset: 600; animation: rl-ecg 2.2s ease forwards; }
@keyframes rl-ecg { to { stroke-dashoffset: 0; } }
.rl-end.won h1 { color: var(--rl-gold); }
.rl-end-card { width: min(200px, 46vw); border-radius: 12px; box-shadow: 0 0 50px rgba(88,166,255,.5); animation: rl-up .8s ease; }
.rl-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.rl-confetti i { position: absolute; top: -20px; left: var(--x); width: 8px; height: 14px; background: hsl(var(--h), 80%, 60%); animation: rl-fall 3.4s linear var(--d) infinite; }
@keyframes rl-fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 520px) {
  .rl-dtext { font-size: 15px; }
  .rl-face { width: 48px; height: 62px; }
  .rl-btn { padding: 10px 12px; font-size: 14px; }
  #rl-hud { gap: 4px; }
  #rl-hud > span { font-size: 12px; padding: 4px 6px; gap: 3px; }
}
.rl-singles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; padding-bottom: 10px; } /* (the rows' 10px above the line below, as .rl-item) */
.rl-single { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: center; }
.rl-single img { width: 100%; aspect-ratio: 563 / 776; object-fit: cover; display: block; border: 1px solid var(--rl-line); border-radius: 8px; background: #0d1117; cursor: pointer; }
.rl-single img:hover { outline: 2px solid var(--rl-gold); }
/* (Rocking side to side as the cards in a game do: gameplay's swayAngle(), 5° either way, 9 s.) */
.rl-single img { animation: rl-sway 4.5s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes rl-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
/* The shop's pack over its Buy (the app's shop.rs): the picture, then its name and the button, centred;
   rocking as the single cards do. */
.rl-pack-item { flex-direction: column; text-align: center; gap: 8px; }
.rl-pack-item .rl-item-t { align-items: center; }
.rl-pack-item .rl-pack-pic { width: 96px; height: auto; aspect-ratio: 0.64; margin: 4px auto 2px; box-shadow: 0 8px 18px rgba(0,0,0,.55);
  animation: rl-sway 4.5s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.rl-pack-item > .rl-btn { align-self: stretch; }
@media (prefers-reduced-motion: reduce) { .rl-single img, .rl-pack-item .rl-pack-pic { animation: none; } }
.rl-fly-card { position: fixed; z-index: 1000; pointer-events: none; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.rl-single-price { font-weight: 800; font-size: 15px; }
.rl-btn.rl-single-price { width: 100%; } /* (the pack button's purple: .rl-btn.go) */
.rl-single .rl-btn { padding: 7px 8px; font-size: 14px; }
.rl-trade { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rl-line); }
.rl-trade img { width: 64px; border-radius: 6px; }
.rl-trade .rl-item-t { flex: 1; }
.rl-dk::before { content: ''; display: inline-block; width: 9px; height: 12px; border-radius: 2px; border: 1.5px solid var(--rl-text); margin-right: 3px; }
.rl-dk.full { color: var(--rl-gold); }
.rl-dk.over { color: #ffa198; border-color: #f8514966 !important; }
.rl-item-pic.makkara i { width: 38px; height: 12px; border-radius: 6px; background: linear-gradient(#e0807a, #b9524d); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.rl-settings { position: absolute; inset: 0; z-index: 58; display: flex; flex-direction: column; background: #0d1117; }
.rl-settings-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--rl-line); }
.rl-settings iframe { flex: 1; width: 100%; border: 0; background: #0d1117; }
.rl-item-pic.food { background: #2a1e14; }
.rl-item-pic.food img { max-width: 40px; max-height: 40px; object-fit: contain; }
.rl-item-pic.makkara:not(.raw) i { background: linear-gradient(#a0522d, #6b3018); }

/* The menu's buttons stay in view on a short screen (the sheet scrolls under them). */
.rl-menu .rl-menu-btns { position: sticky; bottom: -14px; margin: 14px -14px -14px; padding: 10px 14px 14px; background: linear-gradient(transparent, var(--rl-panel) 30%); }
@media (max-width: 760px) { .rl-menu .rl-menu-btns .rl-btn { flex: 1 1 40%; } }
.rl-shadow-banner { position: absolute; inset: 0; z-index: 48; display: flex; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(ellipse at center, rgba(59,10,92,.75), rgba(7,2,13,.9)); animation: rl-shadow 1.8s ease both; }
.rl-shadow-banner span { font-size: clamp(34px, 9vw, 72px); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #ffd36b; text-shadow: 0 0 24px #9b5cff, 0 0 4px #000; }
@keyframes rl-shadow { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* The new run's optional world seed (intro.js, docs/ROGUELIKE.md §J). */
.rl-seed { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px auto 0; font-size: 13px; font-weight: 600; color: #c4b5fd; }
.rl-seed input { width: min(300px, 80vw); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rl-line); background: rgba(13,17,23,.8); color: var(--rl-text); font: inherit; font-size: 16px; text-align: center; }
.rl-seed input:focus { outline: none; border-color: #00ffcc; box-shadow: 0 0 0 2px rgba(0,255,204,.2); }

/* The pause menu (menu.js, the app's menu.rs): a command window and its page, both in the text box's glass. */
.rl-sheet.rl-pm { width: min(1060px, 100%); height: min(760px, 100%); display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 0; background: none; border: 0; overflow: visible; }
.rl-pm-cmds, .rl-pm-body { --tb: #bc8cff; border-radius: 16px; padding: 16px; box-sizing: border-box; color: #e6edf3;
  background: rgba(2,2,2,0.8);
  border: 1px solid color-mix(in srgb, var(--tb) 45%, transparent); box-shadow: 0 18px 50px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05); }
.rl-pm-body { --tb: #58a6ff; overflow: auto; min-height: 0; }
.rl-pm-cmds { align-self: start; display: flex; flex-direction: column; gap: 8px; }
.rl-pm-kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #bc8cff; margin: 0 0 6px 4px; }
/* The tabs: the label in the middle, on one line; the picked one lit (no ▶ — on a phone it took the label's room: the
   user, 2026-11-29). Too narrow: the short word (.sh, data-short), then the icon alone (.ic, data-ico): menu.js fitTabs. */
.rl-pm-cmd { --pc: #bc8cff; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; overflow: hidden; min-width: 0; padding: 11px 6px; border-radius: 10px; font: inherit; font-size: 17px; font-weight: 700; line-height: 1.2; color: #fff; cursor: pointer; background: rgba(22,27,34,.9); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); }
.rl-pm-cmd.sh > span, .rl-pm-cmd.ic > span { display: none; }
.rl-pm-cmd.sh::after { content: attr(data-short); }
.rl-pm-cmd.ic::after { content: attr(data-ico); font-size: 20px; line-height: 1; }
.rl-pm-cmd.quit { --pc: #f85149; }
.rl-pm-cmd:hover { border-color: color-mix(in srgb, var(--pc) 60%, transparent); }
.rl-pm-cmd.on { background: color-mix(in srgb, var(--pc) 25%, #0d1117); border-color: color-mix(in srgb, var(--pc) 90%, transparent); }
.rl-pm-body .rl-sheet-h b { font-size: 22px; }
.rl-pm-muted { color: #8b949e; }
.rl-pm-peek { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.rl-pm-peek img { width: 58px; border-radius: 4px; display: block; }
.rl-pm-peek button { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 4px; }
.rl-seed-line { margin-top: 18px; font-family: ui-monospace, monospace; font-size: 17px; color: #f0c040; }
.rl-bag { display: flex; flex-direction: column; gap: 8px; }
.rl-bag-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(22,27,34,.9); border: 1px solid rgba(188,140,255,.4); }
.rl-bag-row img, .rl-bag-row > i { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; object-position: 50% 0; background: #bc8cff; flex: none; }
.rl-bag-row b { display: block; font-size: 17px; }
.rl-bag-row > div { flex: 1; min-width: 0; }
.rl-bag-row > .rl-btn { flex: none; }
.rl-bag-row span { color: #8b949e; font-size: 14px; }
/* The Map (menu.js townMap; the app's town.rs colours): land, districts, the lakes each one shape, roads,
   the town's blocks, Tram 3, the places' buildings (a tap opens a place's own map), you. */
.rl-town { width: min(100%, calc((100dvh - 150px) * 110 / 86)); aspect-ratio: 110 / 86; display: block; margin: 0 auto; }
.rl-town .land { fill: #1a231d; stroke: #30363d; stroke-width: .25; }
.rl-town .district { fill: #232f27; stroke: #2e3d33; stroke-width: .35; }
.rl-town .lake { fill: #1f4e79; stroke: #3d7ab0; stroke-width: .5; }
.rl-town .road-edge { fill: none; stroke: #0e1210; stroke-width: 3.3; stroke-linecap: round; stroke-linejoin: round; }
.rl-town .road { fill: none; stroke: #59606a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rl-town .road-edge.between { stroke-width: 2.8; }
.rl-town .road.between { stroke-width: 2.04; }
.rl-town .block { fill: #2f3a33; }
.rl-town .tram { fill: none; stroke-width: .8; stroke-linecap: round; stroke-linejoin: round; }
.rl-town .stop { fill: #fff; stroke: #30363d; stroke-width: .5; }
.rl-town text { paint-order: stroke; stroke: #020202; stroke-width: .55; stroke-linejoin: round; }
.rl-town .lname { fill: #9ecbff; font-size: 2.6px; font-style: italic; stroke: none; }
.rl-town .dname { fill: #8a9a8e; font-size: 2.1px; font-weight: 700; letter-spacing: .25px; text-anchor: middle; stroke: none; }
.rl-town .sname { fill: #b4bec8; font-size: 2.2px; font-style: italic; text-anchor: middle; }
.rl-town .tname { font-size: 2.2px; font-weight: 700; }
.rl-town-b { cursor: pointer; }
.rl-town-b.landmark { cursor: default; }
.rl-town-b .bld { stroke: #0d1117; stroke-width: .35; }
.rl-town-b .bld.club { stroke: #e05cb0; }
.rl-town-b .tree { stroke: #0d1117; stroke-width: .25; }
.rl-town-b .lit { fill: none; stroke: #f0c040; stroke-width: .5; }
.rl-town-b .lead { stroke: rgba(201,209,217,.55); stroke-width: .25; }
.rl-town-b .hit { fill: transparent; }
.rl-town-b .bname { fill: #f0f3f6; font-size: 2.6px; font-weight: 700; text-anchor: middle; }
.rl-town-b.landmark .bname { fill: #aab4be; font-weight: 400; font-style: italic; }
.rl-town-b.on .bname, .rl-town-b:not(.landmark):hover .bname { fill: #f0c040; }
.rl-town-b:not(.landmark):hover .bld { stroke: #f0c040; }
.rl-town-p circle { fill: #f0c040; stroke: #020202; stroke-width: .4; }
.rl-town-p text { fill: #f0c040; font-size: 2.8px; font-weight: 700; }
.rl-town-p .pulse { fill: none; stroke: #f0c040; stroke-width: .4; animation: rl-pulse .9s ease-out infinite; transform-box: fill-box; transform-origin: center; }
/* A place's own map (menu.js insideMap): rooms in rows, the ways between them, the door to the street. */
.rl-inside-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rl-inside-h b { font-size: 18px; }
.rl-inside { position: relative; width: 100%; height: min(calc(var(--rows) * 86px), calc(100% - 60px)); min-height: 200px; background: #1a231d; border: 1px solid #30363d; border-radius: 12px; box-sizing: border-box; }
.rl-inside-in { position: absolute; inset: 14px; }
.rl-inside svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rl-inside svg line { stroke: #59606a; stroke-width: 6px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rl-inside-r { position: absolute; transform: translate(-50%, -50%); width: calc(var(--w) - 20px); max-width: 230px; max-height: 64px; min-height: 34px; height: calc(var(--h) - 20px); box-sizing: border-box;
  margin-left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px 6px; font-weight: 700; font-size: 13px; color: #e6edf3;
  background: #232f27; border: 1px solid #3e4d43; border-radius: 8px; }
.rl-inside-r.door { background: #59606a; border-radius: 999px; font-style: italic; font-weight: 400; max-width: 150px; height: calc((var(--h) - 20px) * .7); }
.rl-inside-r.me { border: 2.5px solid #f0c040; color: #f0c040; }
.rl-inside-r small { font-size: 11px; }
@keyframes rl-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2); opacity: 0; } }
@media (max-width: 640px) {
  .rl-sheet.rl-pm { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* (Two rows of five, as the app's menu.rs on a phone.) */
  .rl-pm-cmds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px; }
  .rl-pm-kicker { display: none; }
  .rl-pm-cmd { height: 44px; font-size: 14px; padding: 0 6px; }
}

/* The deck in the game's card pop-up (reader.js RL.deckModal; gameplay/css/stage.css does the stage). */
#stack-popup { --text: #e6edf3; --border: #30363d; --bg2: #161b22; --muted: #8b949e; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 340; display: none; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
#stack-popup.open { display: flex; }
#stack-inner { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; color: var(--text); }
#stack-inner h3 { font-size: 16px; margin-bottom: 12px; }
#stack-text { color: var(--muted); font-size: 15px; text-align: center; margin: 0 0 6px; }
#stack-cards { display: flex; gap: 10px; flex-wrap: wrap; }
#stack-cards .sc-card { width: 160px; cursor: pointer; }
#stack-cards .sc-card img { width: 160px; height: 224px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
#stack-cards .sc-img { position: relative; border-radius: 6px; }
#stack-cards .sc-img img { display: block; }
#stack-cards .sc-label { font-size: 13px; color: var(--muted); text-align: center; margin-top: 3px; }
#stack-close { padding: 8px 20px; border-radius: 999px; border: 1px solid #30363d; font: inherit; cursor: pointer; }

/* The battle transition (transition.js). */
#rl-transition { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
#rl-transition i { position: absolute; transform: rotate(45deg); background: linear-gradient(#0d0b1a, #241446); border: 2px solid rgba(188,140,255,.9); box-sizing: border-box;
  animation: rl-shard .52s cubic-bezier(.5,0,.9,.45) var(--d) forwards; }
@keyframes rl-shard { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(0); opacity: .7; border-color: transparent; } }
#rl-transition .flash { position: absolute; inset: 0; background: #fff; animation: rl-flash .22s ease-out forwards; }
#rl-transition .flash.hit { opacity: 0; animation: rl-flash-hit .32s ease-in-out .64s forwards; }
@keyframes rl-flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes rl-flash-hit { 0% { opacity: 0; } 50% { opacity: .45; } 100% { opacity: 0; } }

/* The top-left Home (hud.js): the game's Home button (components/topbar.css .rk-topbar-home). */
#rl-home { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 12px; z-index: 15; margin: 0; font-family: var(--font-text); } /* (as a card game's top-bar Home: its look from topbar.css, no skin — the user 2026-11-28) */

.rl-pm-date { margin-top: 6px; color: #c4b5fd; font-weight: 600; font-size: 15px; }
/* The dragons' shrines (shrine.js): the dials panel and the riddle. */
.rl-shrine-sheet .rl-dials { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.rl-shrine-sheet .rl-dial { display: flex; align-items: center; gap: 10px; background: #1a1622; border: 1px solid rgba(232,216,160,.3); border-radius: 10px; padding: 4px; }
.rl-shrine-sheet .rl-dial.on { border-color: rgba(232,216,160,.85); }
.rl-shrine-sheet .rl-dial span { flex: 1; text-align: center; font-weight: 600; color: #f6ecd0; font-size: 17px; }
.rl-shrine-sheet .rl-dial .rl-btn { min-width: 54px; }
.rl-shrine-sheet .rl-riddle { font-style: italic; color: #f0e0b0; line-height: 1.45; }
.rl-shrine-sheet .rl-offer { width: 100%; margin: 6px 0; background: #5a4210; border-color: var(--rl-gold); color: #fff; }
.rl-shrine-sheet .rl-dial-btns { display: flex; gap: 10px; justify-content: space-between; }
.rl-shrine-sheet .rl-msg { color: #ffa657; min-height: 1.2em; text-align: center; }
/* Symposium (symposium.js): the night at her place — wordless, the room dark, the window's moonlight. */
.rl-sym-night { position: fixed; inset: 0; z-index: 60; background: #06040e; cursor: pointer; }
.rl-sym-night canvas { width: 100%; height: 100%; display: block; }
/* Side quests (quests.js): the journal's rows, the mark in the square. */
.rl-quests .rl-bag-row > i { display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 22px; color: #0d1117; background: #f0c040; width: 36px; height: 36px; }
.rl-quests .rl-bag-row.done > i { background: #3fb950; }
.rl-quests .rl-bag-row.failed > i { background: #6e7681; }
.rl-quests .rl-bag-row span { display: block; }
.rl-quests .rl-bag-row small { color: #8b949e; }
/* The pause menu's Stats (menu.js statRows; the app's menu.rs Stats): two columns, one on a phone. */
.rl-pm-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-statlist { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 10px 0; }
.rl-stat { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; border-radius: 5px; font-size: 14px; }
.rl-stat:nth-child(odd) { background: #161b2299; }
.rl-stat span { color: #8b949e; }
@media (max-width: 640px) { .rl-statlist { grid-template-columns: 1fr; } }

/* Phones: the Home a round house icon, as a card game's on a phone (gameplay/css/phone.css #app .rk-topbar-home). */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  #rl-home {
    width: 34px; height: 34px; padding: 0; border-radius: 50%;
    font-size: 0; color: transparent; overflow: hidden;
    background: rgba(255,255,255,0.05) no-repeat center / 18px 18px
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d1d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5.5 9v11h13V9'/%3E%3C/svg%3E");
    border-color: rgba(255,255,255,0.12);
  }
}

/* Stubb's triathlon (triathlon.js; the app's roguelike/triathlon.rs): the race over the world. */
#rl-tri { position: fixed; inset: 0; z-index: 80; overflow: hidden; font-family: inherit; color: #0b3954; touch-action: none; user-select: none; }
#rl-tri .rl-tri-sky { position: absolute; inset: 0 0 58% 0; background: linear-gradient(#9bd4f0, #e3f4fb); }
#rl-tri .rl-tri-ground { position: absolute; inset: 42% 0 0 0; background: #5c636a; }
#rl-tri[data-scene="water"] .rl-tri-ground { background: repeating-linear-gradient(170deg, #1c6ea4 0 26px, #2380bd 26px 40px); }
#rl-tri[data-scene="park"] .rl-tri-ground { background: #3f8f3a; }
#rl-tri .rl-tri-lane { position: absolute; left: 0; right: 0; height: 22%; border-bottom: 4px dashed rgba(255, 255, 255, .55); }
#rl-tri .rl-tri-lane[data-l="0"] { top: 46%; }
#rl-tri .rl-tri-lane[data-l="1"] { top: 70%; }
#rl-tri .rl-tri-who { position: absolute; bottom: 6px; width: 92px; height: 92px; transform: translateX(-50%); }
#rl-tri .rl-tri-who img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: rgba(255, 255, 255, .25); }
#rl-tri .rl-tri-who.moving img { animation: rl-tri-bob .32s ease-in-out infinite alternate; }
#rl-tri[data-scene="water"] .rl-tri-who { height: 56px; overflow: hidden; border-bottom: 10px solid rgba(255, 255, 255, .6); border-radius: 0 0 40% 40%; }
#rl-tri[data-scene="water"] .rl-tri-who img { height: 92px; }
#rl-tri .rl-tri-who .bike { display: none; }
#rl-tri[data-scene="road"] .rl-tri-who .bike { display: block; position: absolute; left: -14px; right: -14px; bottom: -10px; height: 30px;
  background: radial-gradient(circle at 18% 50%, transparent 10px, #212529 11px 14px, transparent 15px), radial-gradient(circle at 82% 50%, transparent 10px, #212529 11px 14px, transparent 15px), linear-gradient(#e03131, #e03131) center 40% / 60% 5px no-repeat; }
#rl-tri .rl-tri-finish { position: absolute; top: 42%; bottom: 0; left: 90%; width: 12px; background: repeating-linear-gradient(#fff 0 18px, #111 18px 36px); }
#rl-tri .rl-tri-hud { position: absolute; left: 16px; top: 14px; right: 160px; display: flex; flex-direction: column; gap: 4px; }
#rl-tri .rl-tri-title { font-size: 24px; }
#rl-tri .rl-tri-clock { font-size: 18px; font-weight: 600; }
#rl-tri .rl-tri-bar { width: min(320px, 35vw); height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .25); overflow: hidden; }
#rl-tri .rl-tri-bar i { display: block; height: 100%; background: #2f9e44; }
#rl-tri .rl-tri-big { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-size: 72px; font-weight: 800; color: #fff; text-shadow: 0 3px 8px rgba(0, 0, 0, .4); pointer-events: none; }
#rl-tri .rl-tri-hint { position: absolute; left: 0; right: 0; top: calc(42% - 28px); text-align: center; font-size: 15px; opacity: .8; }
#rl-tri .rl-tri-left, #rl-tri .rl-tri-right { position: absolute; bottom: 16px; width: clamp(110px, 22vw, 220px); height: 80px; font-size: 22px; }
#rl-tri .rl-tri-left { left: 16px; }
#rl-tri .rl-tri-right { right: 16px; }
#rl-tri .rl-tri-quit { position: absolute; top: 14px; right: 16px; width: 120px; height: 40px; }
@keyframes rl-tri-bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }

#rl-menu-btn .w { display: none; }
/* ── A phone: the app's own look (the user, 2026-12-04: "the website mobile UI looks wrong … should be exact same" as
   the app's): hud.rs's top strip — Home 66 × 44, the hearts-and-money capsule, the skinned Menu, the area and the deck
   under them —; stick.rs's ring and knob (its own pictures; sized by stick.js); arms/draw.rs's attack bubble and
   hud.rs's action button: ui.rs button_round's rounded rectangles (8 px), the colour's gradient, the thin border, the
   label in Rakuel Serif. Desktop as it was. ── */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  #rl-root { --rl-app-font: 'Rakuel Serif', var(--font-text, serif); }
  #rl-home {
    top: calc(env(safe-area-inset-top) + 8px); left: 10px; width: 66px; height: 44px; border-radius: 6px;
    border: 1px solid #30363d; box-sizing: border-box;
    background: #21262d no-repeat center / 28px 28px
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23e6edf3' d='M32 6.4 58.9 30.7H51.2V57.6H38.4V39.7H25.6V57.6H12.8V30.7H5.1Z'/%3E%3C/svg%3E");
  }
  #rl-hud {
    top: calc(env(safe-area-inset-top) + 10px); left: 86px; height: 40px; box-sizing: border-box;
    width: min(228px, calc(100% - 86px - 98px)); max-width: none; flex-wrap: nowrap; justify-content: space-between; gap: 6px;
    padding: 0 12px 0 10px; border-radius: 10px; background: rgba(13,17,23,.72); border: 1px solid #30363d; overflow: hidden;
  }
  #rl-hud > span { background: none; border: 0; padding: 0; border-radius: 0; }
  #rl-hud .rl-sis, #rl-hud .rl-dk, #rl-hud .rl-drink { display: none; }
  #rl-hud .rl-hearts { gap: 4px; flex-shrink: 0; }
  #rl-hud .rl-hearts:not(.blue) i.h { width: 22px; height: 22px; clip-path: none; background: url(assets/ui/heart-empty.webp) center / contain no-repeat; vertical-align: middle; }
  #rl-hud .rl-hearts:not(.blue) i.h.on { background-image: url(assets/ui/heart.webp); }
  #rl-hud .rl-money { gap: 6px; font: 700 18px var(--rl-app-font); color: #f0c040; white-space: nowrap; }
  #rl-hud i.coin { width: 22px; height: 22px; background: url(assets/ui/coin.webp) center / contain no-repeat; }
  #rl-menu-btn {
    top: calc(env(safe-area-inset-top) + 10px); right: 10px; width: 92px; height: 40px; border-radius: 8px; box-sizing: border-box;
    border: 1px solid #30363d; background: linear-gradient(#8649ef, #7c3aed); box-shadow: 0 2px 4px rgba(0,0,0,.5);
    color: #e6edf3; font: 600 17px var(--rl-app-font);
  }
  @media (max-width: 419px) { #rl-menu-btn { width: 80px; } #rl-hud { width: min(228px, calc(100% - 86px - 96px)); } }
  #rl-menu-btn i { display: none; }
  #rl-menu-btn .w { display: inline; position: relative; }
  /* The area and the deck: from under Home, the whole width, two lines at most (hud.rs area_line). */
  #rl-areaname {
    top: calc(env(safe-area-inset-top) + 58px); left: 12px; right: 12px; text-align: left; opacity: 1; animation: none;
    font: 600 14px/1.25 var(--rl-app-font); letter-spacing: 0; color: rgba(255,255,255,.75); text-shadow: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  #rl-areaname.in { animation: none; }
  /* hud.rs's action button: green, what's near on it, over the stick's grab. */
  #rl-act {
    height: 50px; min-width: 160px; max-width: min(calc(100% - 24px), 420px); padding: 0 24px; box-sizing: border-box;
    bottom: calc(env(safe-area-inset-bottom) + var(--rl-act-bottom, 150px));
    border-radius: 8px; border: 1px solid #30363d; background: linear-gradient(#2f8f41, #238636);
    box-shadow: 0 2px 4px rgba(0,0,0,.5); color: #e6edf3; font: 600 20px var(--rl-app-font); overflow: hidden; text-overflow: ellipsis;
  }
  /* arms/draw.rs's attack bubble: Attack 96 × 80, its buttons 92 × 52 (pack.js lays them out), button_round's look. */
  #rl-root :is(#rl-attack, #rl-lock, #rl-dodge, #rl-roll, #rl-laser) {
    border-radius: 8px; border: 1px solid #30363d; box-shadow: 0 2px 4px rgba(0,0,0,.5); color: #e6edf3;
    font: 600 20px var(--rl-app-font); box-sizing: border-box;
  }
  #rl-root #rl-attack { background: linear-gradient(#bc352d, #b3261e); font-size: 27px; padding: 0; }
  #rl-root #rl-lock { background: linear-gradient(#556074, #4a5568); }
  #rl-root #rl-lock.on { background: linear-gradient(#ce8a1f, #c77d0a); }
  #rl-root #rl-dodge { background: linear-gradient(#3d7b6b, #2f6f5e); }
  #rl-root #rl-roll { background: linear-gradient(#86683a, #7a5a1e); }
  #rl-root #rl-laser { background: linear-gradient(#a32130, #9b1020); }
  #rl-root #rl-laser.recharging { background: linear-gradient(#563a3e, #4a2a2e); opacity: 1; }
}
/* stick.rs's ring and knob wherever the stick shows (a tablet too): their own pictures, the app's opacities. */
@media (pointer: coarse), (max-width: 760px) {
  /* stick.rs: the ring and its knob, their own pictures; stick.js sizes them (--rl-stick-r) and places the ring. */
  #rl-stick .base { border: 0; border-radius: 0; background: url(assets/ui/stick-base.webp) center / contain no-repeat; opacity: .44; }
  #rl-stick.active .base { opacity: .68; }
  #rl-stick .knob { border-radius: 0; box-shadow: none; background: url(assets/ui/stick-knob.webp) center / contain no-repeat; opacity: .55; }
  #rl-stick.active .knob { opacity: .85; }
  #rl-act { bottom: calc(env(safe-area-inset-bottom) + var(--rl-act-bottom, 152px)); }
}
