
.rm-app, .rm-app * { box-sizing: border-box; }
.rm-app { --rm-cut: 8px; --gs-ink: #fdf2e0; --gs-muted: #d9c3a0; --gs-line: #4a3220; --gs-accent: #ffcf7a; --gs-accent-ink: #2b1d10;
  --gs-panel: #2b1b11; --gs-bg: #120b07; --gs-chip: rgba(18, 11, 7, .92);
  position: relative; display: flex; flex-direction: column; color: #fdf2e0; font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.rm-app.rm-embedded { height: clamp(480px, calc(100svh - 110px), 900px); border: 1px solid #4a3220; background: #120b07;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.rm-app.gs-fs { background: #120b07; }
.rm-app .gs-stage, .rm-app .gs-main { min-height: 0; }
.rm-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.rm-app .gs-side { min-height: 0; overflow: auto; }
.rm-app .gs-main { display: flex; flex-direction: column; }
.rm-cut { clip-path: polygon(var(--rm-cut) 0, 100% 0, 100% calc(100% - var(--rm-cut)), calc(100% - var(--rm-cut)) 100%, 0 100%, 0 var(--rm-cut)); }
.rm-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 0 env(safe-area-inset-bottom, 0); }
.rm-info { font: 700 12px/1 monospace; letter-spacing: 1px; color: #ffd9a0; }
.rm-hud { flex: 0 0 auto; display: flex; gap: 4px; flex-wrap: wrap; padding: 0 2px; align-items: center; }
.rm-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; background: rgba(43, 27, 17, .9); border: 1px solid rgba(255, 207, 122, .35); --rm-cut: 6px; }
.rm-chip small { font: 700 9px/1 monospace; letter-spacing: 1.3px; color: #d9c3a0; }
.rm-chip b { font: 800 14px/1 monospace; color: #fff; white-space: nowrap; }
#rmSp { color: #ffcf7a; }
.rm-speed { margin-left: auto; background: rgba(255, 207, 122, .12); color: #ffe9b0; border: 1px solid rgba(255, 207, 122, .4); padding: 5px 10px; min-height: 40px; font: 700 12px system-ui, sans-serif; cursor: pointer; --rm-cut: 6px; }
.rm-speed[aria-pressed="true"] { background: #ffcf7a; color: #2b1d10; }
.rm-clock { font: 800 14px system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #ffe9b0; padding: 4px 8px; background: rgba(20, 12, 8, .78); }
.rm-clock.slow { color: #fca5a5; }
.rm-scene { flex: 0 0 clamp(84px, 16svh, 150px); position: relative; overflow: hidden; background: #1d1410; border: 1px solid rgba(255, 207, 122, .25); --rm-cut: 12px; }
.rm-scene.off { display: none; }
.rm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rm-scene-top { position: absolute; left: 10px; right: 10px; top: 8px; display: flex; gap: 8px; align-items: center; z-index: 1; pointer-events: none; }
.rm-bandchip { border: 1px solid currentColor; background: rgba(20, 12, 8, .8); padding: 3px 10px; min-height: 26px; font: 800 12px system-ui, sans-serif; display: inline-flex; align-items: center; --rm-cut: 5px; }
.rm-worth { flex: 1; min-width: 0; font: 700 12.5px system-ui, sans-serif; color: #ffcf7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; }
.rm-app.typing .rm-scene { display: none; }
.rm-mid { flex: 1 1 auto; min-height: 90px; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; padding: 0 1px; }
.rm-mid > * { min-width: 0; }
.rm-page { background: linear-gradient(180deg, #f6ecd2, #efe0bd); color: #2b1d10; padding: 14px 16px; max-height: 46svh; overflow: auto; font: 400 16px/1.65 Georgia, 'Times New Roman', serif; --rm-cut: 10px; }
.rm-page h5 { font: 700 19px/1.3 Georgia, serif; margin: 0 0 2px; color: #3b2410; }
.rm-page .rm-meta { font: 700 11px system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #8a5a2b; margin-bottom: 10px; }
.rm-para { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; margin: 0 0 10px; transition: background .3s; }
.rm-para b { font: 800 14px system-ui, sans-serif; color: #8a5a2b; padding-top: 3px; }
.rm-para.lit { background: rgba(255, 207, 122, .35); }
.rm-page mark { background: rgba(255, 196, 80, .55); color: inherit; padding: 0 2px; box-shadow: 0 0 0 1px rgba(160, 100, 20, .35); }
.rm-page mark.bad { background: rgba(248, 113, 113, .35); }
.rm-page u.hint { text-decoration: underline wavy #b45309; text-underline-offset: 3px; }
.rm-tray { display: grid; gap: 8px; align-content: start; min-width: 0; }
.rm-q { position: relative; background: rgba(43, 27, 17, .95); border: 1px solid rgba(255, 207, 122, .3); padding: 10px 12px; --rm-cut: 10px; }
.rm-q.ok { border-color: #4ade80; }
.rm-q.bad { border-color: #f87171; }
.rm-qhead { font: 800 11px system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ffcf7a; margin-bottom: 4px; }
.rm-qhelp { font: 500 12.5px system-ui, sans-serif; color: #d6c3a0; margin-bottom: 8px; }
.rm-qtext { font: 600 15.5px/1.5 system-ui, sans-serif; color: #fff8e7; margin-bottom: 8px; }
.rm-limit { display: inline-block; font: 800 10.5px system-ui, sans-serif; letter-spacing: .06em; color: #fde68a; background: rgba(253, 230, 138, .12); padding: 2px 7px; margin-bottom: 8px; }
.rm-opts { display: grid; gap: 6px; }
.rm-opts.row { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.rm-opt { text-align: left; display: flex; gap: 8px; align-items: flex-start; min-height: 44px; border: 1px solid rgba(255, 207, 122, .35); background: rgba(20, 12, 8, .6); color: #f3e6c8; padding: 8px 10px; font: 600 14.5px/1.35 system-ui, sans-serif; cursor: pointer; --rm-cut: 7px; }
.rm-opt b { flex: none; min-width: 22px; color: #ffcf7a; }
.rm-opt.on { border-color: #ffcf7a; background: rgba(255, 207, 122, .22); box-shadow: 0 0 0 2px rgba(255, 207, 122, .35) inset; }
.rm-opt.right { border-color: #4ade80; background: rgba(34, 197, 94, .25); }
.rm-opt.wrong { border-color: #f87171; background: rgba(239, 68, 68, .22); }
.rm-opt:disabled { cursor: default; }
.rm-gap { display: inline-block; width: min(190px, 60%); min-height: 40px; border: 0; border-bottom: 2px solid #ffcf7a; background: rgba(255, 207, 122, .12); color: #fff; font: 700 16px system-ui, sans-serif; padding: 3px 6px; border-radius: 0; }
.rm-gap:focus { outline: none; background: rgba(255, 207, 122, .25); }
.rm-gap.right { border-bottom-color: #4ade80; }
.rm-gap.wrong { border-bottom-color: #f87171; text-decoration: line-through; }
.rm-box { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rm-word { border: 1px dashed rgba(255, 207, 122, .6); background: rgba(20, 12, 8, .6); color: #ffe9b0; padding: 8px 12px; min-height: 40px; font: 700 14px system-ui, sans-serif; cursor: pointer; --rm-cut: 6px; }
.rm-word.on { border-style: solid; background: rgba(255, 207, 122, .25); }
.rm-notes { background: rgba(243, 230, 200, .08); padding: 8px 10px; font: 500 14.5px/1.7 system-ui, sans-serif; }
.rm-notes h6, .rm-diagram h6 { margin: 0 0 4px; font: 800 13px system-ui, sans-serif; color: #ffcf7a; }
.rm-notes ul { margin: 0; padding-left: 16px; }
.rm-tablewrap { overflow-x: auto; }
.rm-table { border-collapse: collapse; width: 100%; font: 500 14px system-ui, sans-serif; }
.rm-table th, .rm-table td { border: 1px solid rgba(255, 207, 122, .3); padding: 6px 8px; text-align: left; vertical-align: top; }
.rm-table th { background: rgba(255, 207, 122, .15); color: #ffcf7a; }
.rm-table caption { text-align: left; color: #ffcf7a; font-weight: 800; padding-bottom: 4px; }
.rm-flow { display: grid; gap: 4px; justify-items: center; }
.rm-flow div { width: 100%; text-align: center; background: rgba(243, 230, 200, .1); border: 1px solid rgba(255, 207, 122, .35); padding: 7px 9px; font: 500 14px/1.6 system-ui, sans-serif; }
.rm-flow i { color: #ffcf7a; font-style: normal; }
.rm-diagram { background: rgba(243, 230, 200, .08); padding: 10px; }
.rm-layers { display: grid; gap: 0; border: 2px solid rgba(255, 207, 122, .55); overflow: hidden; }
.rm-layer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font: 600 14px/1.6 system-ui, sans-serif; border-top: 1px dashed rgba(255, 207, 122, .35); }
.rm-layer:first-child { border-top: 0; }
.rm-layer span.n { flex: none; width: 22px; height: 22px; background: #ffcf7a; color: #2b1d10; display: inline-flex; align-items: center; justify-content: center; font: 800 12px system-ui, sans-serif; }
.rm-qhints { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.rm-hint { border: 1px solid rgba(255, 207, 122, .3); background: rgba(20, 12, 8, .6); color: #ffcf7a; font: 700 12.5px system-ui, sans-serif; padding: 6px 10px; cursor: pointer; min-height: 40px; --rm-cut: 6px; }
.rm-hint small { color: #cbd5e1; font-weight: 600; margin-left: 4px; }
.rm-hint:disabled { opacity: .4; cursor: default; }
.rm-review { margin-top: 8px; font: 500 13.5px/1.45 system-ui, sans-serif; color: #f3e6c8; background: rgba(0, 0, 0, .25); padding: 8px 10px; }
.rm-review b { color: #ffe9b0; }
.rm-seal { position: absolute; right: -4px; top: -8px; width: 40px; height: 40px; border-radius: 50%; display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 35%, #c2414f, #7a1b28); color: #fde2e4; font: 800 17px Georgia, serif; box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .15); }
.rm-q.ok .rm-seal { display: flex; }
.rm-seal.thump { animation: rmThump .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rmThump { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
.rm-dock { flex: 0 0 auto; background: rgba(43, 27, 17, .9); border: 1px solid rgba(255, 207, 122, .35); padding: 8px 10px 10px; display: grid; gap: 6px; --rm-cut: 10px; }
.rm-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rm-actions .rm-go { flex: 1 1 160px; }
.rm-msg { min-height: 18px; font-size: 13.5px; color: #ffcf7a; flex: 1 1 100%; }
.rm-msg.good { color: #86efac; }
.rm-msg.bad { color: #fca5a5; }
.rm-go { background: linear-gradient(135deg, #ffcf7a, #c9862a); color: #2b1d10; border: 0; padding: 12px 24px; min-height: 46px; font: 800 16px system-ui, sans-serif; cursor: pointer; --rm-cut: 9px; }
.rm-go:disabled { opacity: .5; cursor: default; }
.rm-opt:focus-visible, .rm-go:focus-visible, .rm-hint:focus-visible, .rm-word:focus-visible, .rm-speed:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rm-over { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(12, 8, 4, .76); backdrop-filter: blur(2px); }
.rm-ocard { background: linear-gradient(160deg, #3a2616, #1d1410); border: 1px solid rgba(255, 207, 122, .45); --rm-cut: 14px; padding: 18px; max-width: 480px; width: 100%; max-height: 100%; overflow: auto; text-align: center; color: #fdf2e0; }
.rm-kick { font: 700 12px/1.2 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #ffcf7a; }
.rm-title { font: 800 24px/1.25 system-ui, sans-serif; margin: 4px 0 8px; }
.rm-title.good { color: #bbf7d0; }
.rm-title.bad { color: #fecaca; }
.rm-title.sm { font-size: 20px; }
.rm-sub { font-size: 14px; color: #ffe9b0; margin: 6px 0 10px; line-height: 1.45; }
.rm-bandtag { display: inline-block; margin-left: 8px; font: 800 14px system-ui, sans-serif; padding: 2px 9px; background: rgba(255, 255, 255, .08); color: var(--b); vertical-align: 4px; }
.rm-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.rm-focus { width: 100%; min-height: 44px; padding: 8px; font: 600 16px system-ui, sans-serif; background: #2b1b11; color: #fdf2e0; border: 1px solid rgba(255, 207, 122, .45); border-radius: 0; }
.rm-map { display: grid; gap: 6px; font-size: 13px; }
.rm-map div { display: grid; grid-template-columns: minmax(0, 1fr) 70px 42px; gap: 6px; align-items: center; }
.rm-map span.bar { height: 8px; background: rgba(148, 163, 184, .25); overflow: hidden; display: block; }
.rm-map span.bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9862a, #ffcf7a); }
.rm-map em { font-style: normal; text-align: right; opacity: .8; font-variant-numeric: tabular-nums; }
.rm-traps { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.rm-trap { font-size: 12.5px; line-height: 1.45; border-left: 3px solid #f87171; padding: 4px 8px; background: rgba(148, 163, 184, .08); }
@media (min-width: 900px) {
  .rm-mid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; overflow: hidden; }
  .rm-page, .rm-tray { max-height: none; overflow: auto; min-height: 0; }
}
@media (max-width: 420px) {
  .rm-info { display: none; }
  .rm-chip { padding: 3px 6px; gap: 4px; }
  .rm-chip small { font-size: 8px; letter-spacing: 1px; }
  .rm-chip b { font-size: 13px; }
  .rm-page { font-size: 15.5px; padding: 12px; }
}
@media (max-width: 420px) { .rm-app.gs-root .gs-title { font-size: 13px; letter-spacing: .03em; } }
