/* Oddhaven: portrait phone first. Corner buttons own their corners; nothing sits on top of anything else. */
:root { --ink: #1c2730; --paper: #f6f1e4; --sun: #e8a93c; --sky: #7fb3d5; --red: #c2493d; --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 { margin: 0; height: 100%; overflow: hidden; background: #a8cfe6; color: var(--ink); font: 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; -webkit-user-select: none; user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #7fb3d5; color: #fff; z-index: 50; }
#boot b { font-size: 40px; letter-spacing: 0.02em; } #boot span { opacity: 0.9; }
button { font: inherit; color: inherit; cursor: pointer; }
.od-corner { position: fixed; top: calc(10px + var(--safe-t)); width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(28, 39, 48, 0.72); color: #fff; font-size: 22px; font-weight: 700; z-index: 30; }
.od-burger { left: 10px; } .od-bang { right: 10px; }
.od-account { position: fixed; top: calc(10px + var(--safe-t)); left: 66px; z-index: 30; max-width: calc(100vw - 132px); }
.od-title { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 76px 22px 32px; text-align: center; background: linear-gradient(180deg, rgba(28,39,48,0.15), rgba(28,39,48,0.55)); z-index: 20; color: #fff; }
.od-title[hidden] { display: none; }
.od-title h1 { margin: 0; font-size: clamp(44px, 14vw, 72px); line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.od-title p { margin: 0 0 8px; max-width: 34ch; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.od-big { display: block; width: 100%; min-height: 50px; margin-top: 8px; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--sun); color: var(--ink); font-weight: 700; }
.od-big.quiet { background: #d9d3c4; }
.od-play { max-width: 280px; font-size: 22px; min-height: 60px; }
.od-small { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.od-small button, .od-link { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 10px; background: rgba(28,39,48,0.72); color: #fff; }
.od-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.45); z-index: 60; }
.od-panel { width: 100%; max-width: 380px; max-height: 100%; overflow: auto; padding: 14px 16px 16px; border-radius: 16px; background: var(--paper); color: var(--ink); touch-action: pan-y; }
.od-panel header { display: flex; align-items: center; justify-content: space-between; }
.od-panel h2 { margin: 0; font-size: 22px; }
.od-x { width: 44px; height: 44px; border: 0; background: none; font-size: 26px; }
.od-panel textarea { width: 100%; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid #b9b2a2; -webkit-user-select: text; user-select: text; }
.od-tip { font-size: 13px; opacity: 0.8; margin: 8px 0 0; }
.od-row { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 2px; }
.od-seg { display: flex; gap: 6px; } .od-seg button { flex: 1; min-height: 44px; border: 1px solid #b9b2a2; border-radius: 10px; background: #fff; } .od-seg button.on { background: var(--sun); border-color: var(--sun); font-weight: 700; }
.pad-focus { outline: 3px solid #1f7ae0; outline-offset: 2px; }
.od-hud[hidden] { display: none; }
.od-speedo { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 4px; padding: 2px 10px; border-radius: 10px; background: rgba(28,39,48,0.66); color: #fff; z-index: 20; pointer-events: none; }
.od-speedo b { font-size: 22px; min-width: 2.2ch; text-align: right; } .od-speedo small { font-size: 11px; }
.od-place { position: fixed; top: calc(102px + var(--safe-t)); left: 50%; transform: translate(-50%, -6px); padding: 6px 14px; border-radius: 10px; background: rgba(28,39,48,0.72); color: #fff; font-weight: 700; opacity: 0; transition: opacity 0.4s, transform 0.4s; pointer-events: none; z-index: 20; white-space: nowrap; }
.od-place.on { opacity: 1; transform: translate(-50%, 0); }
.od-toast { position: fixed; top: calc(146px + var(--safe-t)); left: 50%; transform: translateX(-50%); max-width: 86vw; padding: 8px 14px; border-radius: 10px; background: rgba(28,39,48,0.86); color: #fff; z-index: 40; pointer-events: none; }
.od-numbers { position: fixed; top: calc(62px + var(--safe-t)); left: 10px; margin: 0; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,0.6); color: #cfe; font: 11px/1.3 ui-monospace, Menlo, monospace; z-index: 25; pointer-events: none; }
.od-soak { position: fixed; top: calc(52px + var(--safe-t)); left: 66px; right: 66px; padding: 8px; text-align: center; border-radius: 10px; background: rgba(28,39,48,0.8); color: #fff; font-size: 13px; z-index: 30; pointer-events: none; }
/* phone controls */
.od-touch { display: none; position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.od-touch.on { display: block; }
.od-look { position: absolute; left: 0; right: 0; top: 0; bottom: calc(230px + var(--safe-b)); pointer-events: auto; touch-action: none; }
.od-stickzone { position: absolute; left: 14px; bottom: calc(26px + var(--safe-b)); width: 150px; height: 150px; pointer-events: auto; touch-action: none; }
.od-ring { position: absolute; inset: 12px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.55); background: rgba(28,39,48,0.26); }
.od-thumb { position: absolute; left: 47px; top: 47px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.74); box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.od-btn { position: absolute; border: 0; border-radius: 50%; color: #fff; font-weight: 800; letter-spacing: 0.02em; pointer-events: auto; touch-action: none; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.od-btn.down { filter: brightness(1.25); transform: scale(0.96); }
.od-gas { right: 14px; bottom: calc(26px + var(--safe-b)); width: 96px; height: 96px; background: rgba(62, 148, 84, 0.9); font-size: 18px; }
.od-brake { right: 118px; bottom: calc(26px + var(--safe-b)); width: 74px; height: 74px; background: rgba(194, 73, 61, 0.9); font-size: 13px; }
.od-mini { width: 54px; height: 54px; font-size: 11px; background: rgba(28,39,48,0.72); }
.od-horn { right: 124px; bottom: calc(108px + var(--safe-b)); } .od-view { right: 34px; bottom: calc(130px + var(--safe-b)); }
@media (orientation: landscape) { .od-look { bottom: 0; right: 220px; left: 180px; } .od-toast { top: calc(14px + var(--safe-t)); } }
/* the start screen */
.od-title { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: linear-gradient(180deg, #2b4a5e, #1c2730 320px); padding-bottom: calc(24px + var(--safe-b)); }
.od-title h1 { margin-top: 6px; flex: none; }
.od-title p { flex: none; }
.od-cont { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.od-cont small { opacity: 0.85; }
.od-pick { margin: 10px 0 0; font-size: 20px; flex: none; }
.od-gslot { width: 100%; flex: none; }
.od-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; width: 100%; max-width: 1000px; margin: 0 auto; }
.od-card { display: block; width: 100%; padding: 12px; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); text-align: left; touch-action: pan-y; }
.od-card:active { transform: scale(0.985); }
.od-card h3 { margin: 0 0 6px; font-size: 18px; }
.od-card p { margin: 6px 0; font-size: 14px; max-width: none; text-shadow: none; color: var(--ink); }
.od-card small { font-size: 12px; opacity: 0.7; }
.od-faces { display: flex; flex-wrap: wrap; gap: 6px; }
.od-faces figure { margin: 0; width: 60px; text-align: center; }
.od-faces img { display: block; width: 60px; height: 60px; border-radius: 50%; background: #cfe0ea; object-fit: cover; }
.od-faces figcaption { font-size: 11px; line-height: 1.2; margin-top: 2px; }
/* god view */
.od-god[hidden] { display: none; }
.od-gtop { position: fixed; top: calc(10px + var(--safe-t)); left: 66px; right: 66px; display: flex; align-items: center; justify-content: center; gap: 8px; z-index: 20; }
.od-clock { padding: 4px 8px; border-radius: 10px; background: rgba(28,39,48,0.72); color: #fff; font-size: 14px; line-height: 38px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.od-speeds { display: flex; gap: 2px; }
.od-speeds button { width: 44px; height: 46px; border: 0; background: rgba(28,39,48,0.72); color: #fff; font-weight: 700; font-size: 14px; }
.od-speeds button:first-child { border-radius: 10px 0 0 10px; } .od-speeds button:last-child { border-radius: 0 10px 10px 0; }
.od-speeds button.on { background: var(--sun); color: var(--ink); }
.od-family { position: fixed; top: calc(62px + var(--safe-t)); left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 19; }
.od-fam { width: 46px; height: 46px; padding: 0; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%; background: #cfe0ea; overflow: hidden; }
.od-fam.on { border-color: var(--sun); box-shadow: 0 0 0 2px var(--sun); }
.od-fam img { width: 100%; height: 100%; display: block; }
.od-ghint { position: fixed; left: 66px; right: 66px; top: calc(62px + var(--safe-t)); padding: 6px 10px; border-radius: 10px; background: rgba(28,39,48,0.78); color: #fff; font-size: 13px; text-align: center; z-index: 18; pointer-events: none; }
.od-ghint[hidden], .od-sheet[hidden], .od-reticle[hidden], .od-drivebtn[hidden] { display: none; }
.od-sheet { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); max-width: 480px; margin: 0 auto; padding: 10px 12px; border-radius: 16px; background: var(--paper); color: var(--ink); z-index: 22; box-shadow: 0 -2px 14px rgba(0,0,0,0.3); }
.od-shead { display: flex; gap: 10px; align-items: center; }
.od-face { width: 52px; height: 52px; border-radius: 50%; background: #cfe0ea; flex: none; }
.od-who { min-width: 0; flex: 1; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
.od-who h3 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-who small { grid-column: 1 / -1; font-size: 12px; opacity: 0.75; }
.od-who .od-mood { grid-row: 1; grid-column: 2; font-weight: 700; font-size: 14px; white-space: nowrap; }
.od-doing { margin: 6px 0; font-size: 14px; }
.od-needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 10px; }
.od-need { display: flex; flex-direction: column; font-size: 11px; line-height: 1.2; }
.od-need b { display: block; height: 6px; border-radius: 3px; background: #d9d3c4; overflow: hidden; }
.od-need i { display: block; height: 100%; background: #4e9a6a; } .od-need i.mid { background: var(--sun); } .od-need i.low { background: var(--red); }
.od-queue { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; font-size: 12px; }
.od-queue:empty { display: none; }
.od-chip { padding: 4px 8px; border: 0; border-radius: 10px; background: #e6dfcf; font-size: 12px; }
.od-chip.x { min-height: 44px; min-width: 56px; background: #d9d3c4; font-weight: 700; }
.od-sbtns { display: flex; gap: 6px; margin-top: 8px; }
.od-sbtn { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: #e6dfcf; font-weight: 700; }
.od-sbtn.go { background: var(--sun); flex: 1.4; } .od-sbtn.on { background: #4e9a6a; color: #fff; }
.od-drivebtn { position: fixed; right: 10px; bottom: calc(14px + var(--safe-b)); min-width: 64px; height: 46px; border: 0; border-radius: 12px; background: rgba(28,39,48,0.72); color: #fff; font-weight: 700; z-index: 19; }
.od-reticle { position: fixed; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border: 3px solid rgba(255,255,255,0.85); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,0.5); z-index: 15; pointer-events: none; }
.od-bubble { position: fixed; left: 0; top: 0; max-width: 210px; padding: 6px 10px; border-radius: 12px; background: #fffdf6; color: var(--ink); font-size: 13px; line-height: 1.25; box-shadow: 0 2px 6px rgba(0,0,0,0.3); z-index: 12; pointer-events: none; will-change: transform; }
.od-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fffdf6; border-bottom: 0; }
.od-list button:disabled { opacity: 0.5; }
/* playing someone: name and clock up top, three buttons under them, the stick and use button at the bottom */
.od-hands[hidden], .od-hnote[hidden], .od-hhint[hidden] { display: none; }
.od-htop { position: fixed; top: calc(10px + var(--safe-t)); left: 66px; right: 66px; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; border-radius: 12px; background: rgba(28,39,48,0.72); color: #fff; z-index: 19; overflow: hidden; }
.od-hwho { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; } .od-hclock { flex: none; opacity: 0.85; font-size: 13px; }
.od-hbar { position: fixed; top: calc(62px + var(--safe-t)); left: 10px; right: 10px; display: flex; gap: 6px; justify-content: center; z-index: 19; }
.od-hbtn { min-width: 64px; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(28,39,48,0.72); color: #fff; font-weight: 700; font-size: 14px; }
.od-hbtn.go { background: rgba(62,148,84,0.92); }
.od-hnote { position: fixed; top: calc(196px + var(--safe-t)); left: 10px; right: 10px; max-width: 420px; margin: 0 auto; padding: 8px 12px; border-radius: 12px; background: rgba(246,241,228,0.94); color: var(--ink); display: flex; flex-direction: column; font-size: 14px; z-index: 19; pointer-events: none; }
.od-hhint { position: fixed; top: calc(112px + var(--safe-t)); left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 10px; background: rgba(28,39,48,0.72); color: #fff; font-size: 13px; white-space: nowrap; z-index: 18; pointer-events: none; }
.od-use { right: 14px; bottom: calc(26px + var(--safe-b)); width: 96px; height: 96px; background: rgba(232, 169, 60, 0.95); color: var(--ink); font-size: 15px; }
.od-use[hidden] { display: none; }
.od-touch[data-mode="foot"] .od-gas, .od-touch[data-mode="foot"] .od-brake, .od-touch[data-mode="foot"] .od-horn { display: none; }
.od-touch[data-mode="car"] .od-use { right: 124px; bottom: calc(170px + var(--safe-b)); width: 64px; height: 64px; font-size: 11px; }
.od-touch[data-mode="foot"] .od-view { right: 34px; bottom: calc(136px + var(--safe-b)); }
.od-touch .od-look { top: calc(112px + var(--safe-t)); }
.od-recap { margin: 0 0 8px; padding-left: 20px; } .od-recap li { margin: 3px 0; }
.od-takeover { background: var(--sun); color: var(--ink); }
/* while playing: the place name and the speed sit under the button row */
body.od-playing .od-place { top: calc(116px + var(--safe-t)); }
body.od-playing .od-speedo { top: calc(112px + var(--safe-t)); left: 10px; right: auto; transform: none; }
.od-hhint { top: calc(158px + var(--safe-t)); }

/* the floors of an open block: up and down */
.od-floors[hidden] { display: none; }
.od-floors { position: fixed; right: 10px; top: 42%; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: auto; }
.od-floors button { width: 48px; height: 48px; border-radius: 10px; border: 0; background: rgba(20, 26, 32, 0.78); color: #fff; font-size: 18px; }
.od-floors b { color: #fff; font-size: 12px; background: rgba(20, 26, 32, 0.78); padding: 2px 6px; border-radius: 6px; }

/* M4: the job on screen. The needle sits above the stick; nothing here takes a tap */
.od-job[hidden], .od-meter[hidden], .od-now[hidden], .od-stirline[hidden] { display: none; }
.od-job { position: fixed; left: 10px; right: 10px; bottom: calc(244px + var(--safe-b)); max-width: 420px; margin: 0 auto; padding: 6px 12px 8px; border-radius: 12px; background: rgba(28,39,48,0.82); color: #fff; font-size: 14px; line-height: 1.25; text-align: center; pointer-events: none; z-index: 9; }
.od-job span { display: block; } .od-job small { display: block; opacity: 0.8; font-size: 12px; }
.od-job small:empty { display: none; }
.od-meter { position: relative; height: 16px; margin-top: 6px; border-radius: 8px; background: #46505a; overflow: hidden; }
.od-meter .od-zone { position: absolute; top: 0; bottom: 0; background: rgba(120, 200, 120, 0.85); }
.od-meter b { position: absolute; top: 0; bottom: 0; width: 5px; margin-left: -2px; background: #fff; }
.od-meter.good { box-shadow: 0 0 0 2px #7fd07f; } .od-meter.bad { box-shadow: 0 0 0 2px var(--red); }
@media (orientation: landscape) { .od-job { bottom: calc(12px + var(--safe-b)); left: 180px; right: 180px; } }
body:not(.od-playing) .od-job { display: none; }
/* town view: the phone under the ! corner, and the top of Happening now */
.od-phonebtn { position: fixed; right: 10px; top: calc(62px + var(--safe-t)); width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(28,39,48,0.72); font-size: 22px; z-index: 19; }
.od-moment { position: fixed; left: 10px; right: 10px; top: calc(112px + var(--safe-t)); max-width: 460px; margin: 0 auto; padding: 8px 10px; display: flex; gap: 8px; align-items: center; border-radius: 14px; background: rgba(120, 34, 24, 0.94); color: #fff; z-index: 24; box-shadow: 0 3px 14px rgba(0,0,0,0.4); }
.od-moment[hidden] { display: none; }
.od-mtext { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; } .od-mtext span { display: block; font-weight: 700; } .od-mtext small { display: block; opacity: 0.85; font-size: 13px; }
.od-mbtns { display: flex; flex-direction: column; gap: 4px; } .od-mbtns button { min-height: 44px; min-width: 76px; border: 0; border-radius: 10px; font-weight: 700; font-size: 13px; }
.od-mjump { background: #ffd23c; color: #1c2730; } .od-mno { background: rgba(255,255,255,0.18); color: #fff; }
.od-fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 40; } .od-fade.on { animation: od-fade 0.7s ease-out; }
@keyframes od-fade { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.od-sheet-lead { margin: 4px 0; font-size: 22px; line-height: 1.1; letter-spacing: 0.01em; }
.od-now { position: fixed; left: 66px; right: 66px; top: calc(62px + var(--safe-t)); max-width: 420px; min-height: 44px; margin: 0 auto; padding: 4px 12px; border: 0; border-radius: 12px; background: rgba(28,39,48,0.72); color: #fff; font-size: 13px; text-align: left; z-index: 18; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-ghint { top: calc(112px + var(--safe-t)); }
.od-stirline { position: fixed; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--sun); transform-origin: 0 50%; pointer-events: none; z-index: 21; }
/* the Phone */
.od-phonepanel { max-width: 400px; height: 100%; max-height: 680px; background: #1f2a33; color: #f4efe4; }
.od-phonepanel header h2 { font-size: 16px; opacity: 0.8; }
.od-phonepanel { position: relative; } .od-phonepanel .od-x { position: absolute; top: 6px; right: 8px; color: #fff; }
.od-phonetop { margin: 2px 0 12px; font-weight: 700; }
.od-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.od-app { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; border: 0; border-radius: 16px; background: #2f3f4b; color: #fff; font-size: 13px; }
.od-app i { font-style: normal; font-size: 30px; line-height: 1; }
.od-dot { position: absolute; top: 8px; right: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.od-apphead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.od-apphead .od-sbtn { flex: none; min-width: 76px; color: var(--ink); } .od-apphead h3 { margin: 0; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.od-phone h4 { margin: 14px 0 4px; font-size: 14px; opacity: 0.8; }
.od-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 14px; }
.od-line.big { font-size: 17px; } .od-line.up b { color: #8fdc9a; }
.od-phone .od-tip { color: #d7d0c0; opacity: 1; }
.od-phone .od-big.quiet { background: #2f3f4b; color: #fff; text-align: left; font-size: 15px; }
.od-para { margin: 8px 0; font-size: 15px; line-height: 1.4; }
.od-letter { display: block; width: 100%; min-height: 56px; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 12px; background: #2f3f4b; color: #fff; text-align: left; }
.od-letter b { display: block; font-weight: 500; } .od-letter small { opacity: 0.75; } .od-letter.new b { font-weight: 800; } .od-letter.new { box-shadow: inset 4px 0 0 var(--sun); }
.od-day { display: flex; flex-direction: column; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: #2f3f4b; font-size: 14px; }
.od-day.today { box-shadow: inset 4px 0 0 var(--sun); } .od-day small { color: var(--sun); }
.od-map { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; background: #b7cf9e; }
/* M6: staged scenes, Who's Who, the quirk line */
.od-lbox[hidden], .od-scenebar[hidden] { display: none; }
.od-lbox { position: fixed; left: 0; right: 0; height: 9vh; background: #0d1216; z-index: 16; pointer-events: none; } .od-lbox.top { top: 0; } .od-lbox.bot { bottom: 0; }
.od-scenebar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); max-width: 480px; margin: 0 auto; padding: 10px 14px 12px; border-radius: 16px; background: var(--paper); color: var(--ink); z-index: 24; box-shadow: 0 -2px 12px rgba(0,0,0,0.4); }
.od-sname { display: block; font-size: 14px; opacity: 0.75; } .od-sline { margin: 2px 0 8px; font-size: 19px; line-height: 1.25; min-height: 2.5em; }
.od-bubble.od-stagebub { display: none; }
.od-quirk { margin: 6px 0 0; font-size: 12px; opacity: 0.75; line-height: 1.25; }
.od-phone .od-big.quiet.od-drama { background: #7c2a22; } .od-phone .od-big.quiet.od-love { background: #6f3a58; }
/* the creator: a picture on top and rows that never scroll. Every target is at least 44 px */
.od-creator { position: fixed; inset: 0; z-index: 22; pointer-events: none; touch-action: none; }
.od-creator[hidden] { display: none; }
.mk-stage { position: absolute; inset: 0; pointer-events: auto; touch-action: none; }
.mk-head { position: absolute; top: calc(10px + var(--safe-t)); left: 66px; right: 66px; display: flex; justify-content: center; align-items: center; min-height: 46px; pointer-events: none; }
.mk-title { padding: 6px 12px; border-radius: 10px; background: rgba(28,39,48,0.72); color: #fff; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-panel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px calc(8px + var(--safe-b)); background: var(--paper); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 16px rgba(0,0,0,0.25); pointer-events: auto; touch-action: manipulation; color: var(--ink); }
.mk-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.mk-tabs button { min-height: 40px; border: 0; border-radius: 8px; background: #e6dfcf; color: var(--ink); font-size: 13px; font-weight: 600; padding: 0; }
.mk-tabs button.on { background: var(--sun); }
.mk-rows { display: flex; flex-direction: column; gap: 2px; min-height: 276px; }
.mk-row { display: flex; align-items: center; gap: 4px; min-height: 44px; border-radius: 10px; padding: 0 2px; }
.mk-row.pad-focus { outline: 3px solid var(--sun); outline-offset: -1px; }
.mk-label { flex: 0 0 84px; font-size: 13px; line-height: 1.1; }
.mk-prev, .mk-next { flex: 0 0 44px; height: 44px; border: 0; border-radius: 10px; background: #e6dfcf; color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1; padding: 0; }
.mk-val { position: relative; flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d3cbb9; border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; overflow: hidden; padding: 0 4px; }
.mk-text { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(232, 169, 60, 0.45); }
.mk-swatch { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.25); }
.mk-name { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 1px solid #b9b2a2; border-radius: 10px; font: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; touch-action: manipulation; background: #fff; color: var(--ink); }
.mk-suggest, .mk-act { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: #e6dfcf; color: var(--ink); font-weight: 700; font-size: 13px; }
.mk-act { flex: 1; background: var(--sun); }
.mk-feet { display: flex; gap: 6px; }
.mk-foot, .mk-random { flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: #e6dfcf; color: var(--ink); font-weight: 700; }
.mk-foot.go { flex: 1.4; background: var(--sun); }
.mk-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mk-choose .od-big { margin: 0; min-height: 44px; padding: 4px 6px; font-size: 14px; background: #e6dfcf; }
.mk-choose .od-big.on { background: var(--sun); }
@media (orientation: landscape) { .mk-panel { left: auto; top: calc(62px + var(--safe-t)); right: 8px; bottom: 8px; width: min(440px, 46vw); border-radius: 16px; justify-content: center; overflow: hidden; } .mk-head { right: min(456px, 48vw); } }
@media (orientation: landscape) and (max-height: 520px) { .mk-panel { top: 6px; bottom: 6px; right: 62px; padding: 4px 6px; gap: 2px; justify-content: flex-start; } .mk-tabs { grid-template-columns: repeat(11, 1fr); } .mk-tabs button { min-height: 30px; font-size: 10px; } .mk-rows { min-height: 0; gap: 0; } .mk-row { min-height: 38px; } .mk-prev, .mk-next, .mk-val, .mk-name, .mk-suggest { height: 38px; min-height: 38px; } .mk-foot, .mk-random { min-height: 38px; } }
.od-make, .od-together { width: 100%; max-width: 420px; flex: none; }
/* playing together */
.od-netdot { position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: transparent; pointer-events: none; }
.od-netdot[data-on="open"] { background: #58c36f; } .od-netdot[data-on="down"] { background: #e8a93c; } .od-netdot[data-on="lost"] { background: #c2493d; }
.od-burger { overflow: visible; }
.od-ask { position: fixed; left: 10px; right: 10px; top: calc(62px + var(--safe-t)); max-width: 460px; margin: 0 auto; padding: 8px 10px; display: flex; gap: 8px; align-items: center; justify-content: space-between; border-radius: 14px; background: rgba(28,39,48,0.92); color: #fff; z-index: 45; }
.od-ask[hidden] { display: none; }
.od-ask .od-mbtns { display: flex; gap: 6px; flex: none; }
.od-ask button { min-width: 56px; min-height: 44px; border: 0; border-radius: 10px; font-weight: 700; }
.od-ask .od-mjump { background: var(--sun); color: var(--ink); } .od-ask .od-mno { background: #d9d3c4; color: var(--ink); }
.od-code { display: block; font-size: 40px; letter-spacing: 0.22em; text-align: center; margin: 6px 0; font-family: ui-monospace, Menlo, monospace; }
.od-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.od-keys button { min-height: 46px; border: 1px solid #b9b2a2; border-radius: 10px; background: #fff; font-weight: 700; font-size: 18px; }
.od-qr { width: 164px; margin: 4px auto; } .od-qr svg { display: block; width: 100%; height: auto; }
.od-link2 { display: block; font-size: 11px; opacity: 0.7; text-align: center; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.od-name { width: 100%; min-height: 46px; margin-top: 4px; padding: 8px 12px; font: inherit; border-radius: 10px; border: 1px solid #b9b2a2; -webkit-user-select: text; user-select: text; }
.od-panel h4 { margin: 12px 0 2px; font-size: 14px; }
.od-tags { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 6; }
.od-tag { position: absolute; left: 0; top: 0; padding: 1px 7px; border-radius: 8px; background: rgba(28,39,48,0.78); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; will-change: transform; }

/* M9: three buttons in a fight, your bar, the people with you */
.od-skill { right: 118px; bottom: calc(26px + var(--safe-b)); width: 74px; height: 74px; background: rgba(90, 80, 200, 0.92); font-size: 11px; line-height: 1.05; padding: 0 4px; }
.od-dodge { right: 34px; bottom: calc(132px + var(--safe-b)); width: 74px; height: 74px; background: rgba(61, 150, 170, 0.92); font-size: 12px; }
.od-skill.wait, .od-dodge.wait { filter: grayscale(0.7) brightness(0.8); }
.od-touch:not([data-mode="fight"]) .od-skill, .od-touch:not([data-mode="fight"]) .od-dodge { display: none; }
.od-touch[data-mode="fight"] .od-gas, .od-touch[data-mode="fight"] .od-brake, .od-touch[data-mode="fight"] .od-horn, .od-touch[data-mode="fight"] .od-view { display: none; }
.od-fight { position: fixed; left: 10px; right: 10px; top: calc(112px + var(--safe-t)); max-width: 420px; margin: 0 auto; z-index: 19; pointer-events: none; }
.od-fight[hidden] { display: none; }
.od-fbar { position: relative; height: 16px; border-radius: 8px; background: rgba(30, 20, 30, 0.72); overflow: hidden; }
.od-fbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#e0574a, #b83a30); }
.od-fbar b { position: absolute; left: 0; right: 0; text-align: center; color: #fff; font-size: 11px; line-height: 16px; }
.od-fcrew { display: flex; gap: 6px; margin-top: 6px; justify-content: center; }
.od-fmate { pointer-events: auto; min-height: 44px; min-width: 64px; padding: 0 8px; border: 0; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700; background: linear-gradient(90deg, rgba(62,148,84,0.92) var(--hp, 100%), rgba(40,30,40,0.82) var(--hp, 100%)); }
.od-fmate.down { opacity: 0.55; }
@media (orientation: landscape) { .od-fight { left: 180px; right: 180px; } }
