@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;600;700&family=Cinzel:wght@600;700&display=swap');

/* CompactCSS source: /games/scribe-journey/style.css */
/* B"H — One manifest, many vessels, one coherent online Chronicle. */



/* CompactCSS source: /games/scribe-journey/css/variables.css */
/* B"H — Tokens: measured lights through which the interface takes form. */
:root {
	--ink: #f7f1dc;
	--ink-muted: #b8c8c3;
	--night: #07131a;
	--night-soft: #0c2028;
	--panel: rgba(7, 22, 28, 0.94);
	--panel-soft: rgba(13, 39, 45, 0.88);
	--cyan: #69e9ef;
	--cyan-deep: #1b8792;
	--gold: #ffd96a;
	--rose: #ef8db5;
	--green: #8ce39b;
	--danger: #ff7d72;
	--border: rgba(205, 244, 235, 0.22);
	--border-bright: rgba(105, 233, 239, 0.62);
	--shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
	--glow: 0 0 28px rgba(105, 233, 239, 0.2);
	--radius-small: 10px;
	--radius-medium: 18px;
	--radius-large: 28px;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-right: env(safe-area-inset-right, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--safe-left: env(safe-area-inset-left, 0px);
	--mobile-control-size: clamp(132px, 38vw, 178px);
	--ui-scale: 1;
	--touch-scale: 1;
	--touch-opacity: 0.82;
	--layer-world: 1;
	--layer-hud: 20;
	--layer-context: 25;
	--layer-chat: 30;
	--layer-controls: 45;
	--layer-dialogue: 55;
	--layer-menu: 65;
	--layer-toast: 80;
	--stage-width: min(1180px, calc(100vw - 40px));
	--stage-height: min(720px, calc(100dvh - 78px));
	--font-body: 'Assistant', system-ui, sans-serif;
	--font-display: 'Cinzel', Georgia, serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}



/* CompactCSS source: /games/scribe-journey/css/core.css */
/* B"H — The world vessel: stable proportions, sharp pixels, quiet depth. */
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
	overflow: hidden;
	background: radial-gradient(circle at 50% 0%, #173a42, var(--night) 54%, #020709);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: calc(16px * var(--ui-scale));
	-webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
#game-shell {
	width: 100vw;
	height: 100dvh;
	display: grid;
	place-items: center;
	padding: 18px 20px 42px;
}
#gameContainer {
	position: relative;
	width: var(--stage-width);
	height: var(--stage-height);
	min-height: 420px;
	overflow: hidden;
	border: 1px solid var(--border-bright);
	border-radius: var(--radius-large);
	background: #08171c;
	box-shadow: var(--shadow), var(--glow), inset 0 0 0 1px rgba(255,255,255,0.05);
}
#gameContainer::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 24%);
	z-index: var(--layer-hud);
}
#world-viewport {
	position: absolute;
	inset: 74px 0 48px;
	overflow: hidden;
	background: #07131a;
	z-index: var(--layer-world);
}
canvas {
	display: block;
	width: 100%;
	height: 100%;
	image-rendering: pixelated;
	touch-action: none;
}
.world-vignette {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle, transparent 58%, rgba(2,8,12,0.42));
	mix-blend-mode: multiply;
}
button:focus-visible, input:focus-visible, select:focus-visible, label:focus-within {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
}
#coordinate-readout { display: none; font-family: var(--font-mono); font-size: 0.68rem; color: var(--cyan); }
body[data-show-coordinates='true'] #coordinate-readout { display: block; }
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
body[data-high-contrast='true'] {
	--ink: #ffffff;
	--ink-muted: #e9f2ef;
	--panel: rgba(0, 0, 0, 0.98);
	--panel-soft: rgba(0, 0, 0, 0.95);
	--border: rgba(255, 255, 255, 0.72);
	--border-bright: #ffffff;
	--cyan: #7ff8ff;
	--gold: #ffe66f;
}
body[data-high-contrast='true'] #gameContainer,
body[data-high-contrast='true'] .modal-content { border-width: 3px; }
body[data-reduced-motion='true'] *,
body[data-reduced-motion='true'] *::before,
body[data-reduced-motion='true'] *::after {
	scroll-behavior: auto !important;
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
}
::selection { background: var(--cyan); color: var(--night); }



/* CompactCSS source: /games/scribe-journey/css/ui.css */
/* B"H — Shared UI: dialogue, echoes, and messages around the living world. */
.menu-screen {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: rgba(3, 11, 15, 0.82);
	backdrop-filter: blur(10px);
	z-index: var(--layer-menu);
}
.menu-screen.is-visible { display: flex; }
#dialogue-box {
	position: absolute;	left: 50%;
	bottom: 66px;
	width: min(760px, calc(100% - 40px));
	transform: translate(-50%, 18px);
	display: none;
	padding: 22px 24px 18px;
	border: 1px solid var(--border-bright);
	border-radius: var(--radius-medium);
	background: var(--panel);
	box-shadow: var(--shadow), var(--glow);
	z-index: var(--layer-dialogue);
}
#dialogue-box.is-visible { display: block; animation: dialogueRise 180ms ease-out forwards; }
#dialogue-text { font-size: 1.08rem; line-height: 1.55; }
#dialogue-choices { display: grid; gap: 8px; margin-top: 14px; }
.dialogue-choice {
	min-height: 44px;	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-small);
	background: rgba(255,255,255,0.04);
	text-align: left;
	cursor: pointer;
}
.dialogue-choice:hover:not(:disabled) { border-color: var(--gold); background: rgba(255,217,106,0.1); }
.continue-indicator { display: none; margin-top: 12px; color: var(--gold); font: 700 0.75rem var(--font-mono); letter-spacing: 0.12em; }
.continue-indicator.is-visible { display: block; }
#global-chat-box {
	position: absolute;
	right: 16px;
	top: 92px;
	width: min(280px, 30vw);
	max-height: 180px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-small);
	background: rgba(5, 19, 24, 0.78);
	z-index: var(--layer-chat);
}
.chat-header { width: 100%; display: flex; justify-content: space-between; padding: 8px 10px; border: 0; background: rgba(105,233,239,0.1); cursor: pointer; }
.chat-status { margin: 0; padding: 6px 10px; color: var(--ink-muted); font-size: 0.68rem; }
#chat-messages { max-height: 106px; overflow-y: auto; padding: 0 10px 8px; font-size: 0.72rem; }
.chat-message { margin-top: 5px; }
.chat-meta { color: var(--cyan); }
#global-chat-box.minimized .chat-status, #global-chat-box.minimized #chat-messages { display: none; }
#toast-container { position: fixed; top: calc(18px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: var(--layer-toast); }
.toast { min-width: 240px; padding: 12px 18px; border: 1px solid var(--border-bright); border-radius: 999px; background: var(--panel); text-align: center; box-shadow: var(--shadow); }
.toast-success { border-color: var(--green); } .toast-error { border-color: var(--danger); }
@keyframes dialogueRise { to { transform: translate(-50%, 0); } }



/* CompactCSS source: /games/scribe-journey/css/battle.css */
/* B"H — Battle: two revealed ideas meeting in disciplined turn-based speech. */
#battle-screen { flex-direction: column; gap: 18px; background: radial-gradient(circle at 50% 35%, rgba(98,75,151,0.32), rgba(3,11,15,0.96)); }
.battle-area { width: min(900px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: end; }
.battle-musag-display {
	min-height: 230px;
	display: grid;
	align-content: end;
	gap: 8px;
	padding: 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius-large);
	background: linear-gradient(180deg, rgba(255,255,255,0.04), var(--panel));
	box-shadow: var(--glow);
}
.musag-stats { display: flex; justify-content: space-between; align-items: baseline; }
.musag-stats h4 { margin: 0; font-family: var(--font-display); }
.musag-emoji { order: -1; display: grid; place-items: center; min-height: 110px; font-size: clamp(4rem, 10vw, 7rem); animation: battleFloat 2.8s ease-in-out infinite; }
.health-bar, .kavanah-bar { width: 100%; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.12); }
.health-bar { height: 11px; } .kavanah-bar { height: 6px; }
.health-bar-inner, .kavanah-bar-inner { width: var(--bar-value, 100%); height: 100%; transition: width 240ms ease; }
.health-bar-inner { background: linear-gradient(90deg, #4cbf6b, var(--green)); }
.kavanah-bar-inner { background: linear-gradient(90deg, #647cff, var(--cyan)); }
.battle-ui-box { width: min(760px, 100%); min-height: 150px; }
#battle-log, #battle-menu-container { display: none; }
#battle-log.is-visible { display: block; font-size: 1.08rem; line-height: 1.5; }
#battle-menu-container.is-visible { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.battle-button {
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--border-bright);
	border-radius: var(--radius-small);
	background: rgba(105,233,239,0.08);
	cursor: pointer;
}
.battle-button:hover:not(:disabled) { background: var(--cyan); color: var(--night); }
.battle-button:disabled { opacity: 0.42; cursor: not-allowed; }
.ultimate-battle-button { border-color: var(--gold); color: var(--gold); }
@keyframes battleFloat { 50% { transform: translateY(-9px); } }



/* CompactCSS source: /games/scribe-journey/css/effects.css */
/* B"H — Effects remain servants of meaning, never noise that conquers play. */
.floating-text {
	position: absolute;
	left: 50%;
	top: 48%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	color: var(--gold);
	font: 700 1.2rem var(--font-display);
	text-shadow: 0 2px 14px rgba(0,0,0,0.8);
	z-index: var(--layer-dialogue);
	animation: floatAway 900ms ease-out forwards;
}
.floating-text[data-anchor='player'] { left: 65%; }
.floating-text[data-anchor='opponent'] { left: 35%; }
.screen-shake { animation: screenShake 180ms linear; }
.is-gold { border-color: var(--gold) !important; box-shadow: 0 0 20px rgba(255,217,106,0.16); }
.is-active { border-color: var(--cyan) !important; background: rgba(105,233,239,0.1) !important; }
.is-dim { opacity: 0.48; filter: grayscale(0.65); }
.is-complete { border-color: var(--green) !important; }
@keyframes floatAway { to { transform: translate(-50%, -125%); opacity: 0; } }
@keyframes screenShake { 25% { transform: translateX(-5px); } 55% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}



/* CompactCSS source: /games/scribe-journey/css/controls.css */
/* B"H — Mobile controls: tactile, preference-aware, and cancel-safe. */
#mobile-controls {
	position: fixed;
	left: 0;
	right: 0;
	bottom: calc(12px + var(--safe-bottom));
	display: none;
	align-items: flex-end;
	justify-content: space-between;
	padding: 0 calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left));
	pointer-events: none;
	opacity: var(--touch-opacity);
	z-index: var(--layer-controls);
}
.joystick-pad {
	position: relative;
	width: var(--mobile-control-size);
	height: var(--mobile-control-size);
	border: 1px solid rgba(140,227,155,0.48);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(140,227,155,0.12), rgba(6,22,26,0.82) 66%);
	box-shadow: 0 12px 34px rgba(0,0,0,0.4), inset 0 0 26px rgba(140,227,155,0.1);
	scale: var(--touch-scale);
	transform-origin: bottom left;
	touch-action: none;
	pointer-events: auto;
}
.control-button {
	position: absolute;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(247,241,220,0.48);
	pointer-events: none;
}
.joy-up { left: calc(50% - 19px); top: 7px; }
.joy-down { left: calc(50% - 19px); bottom: 7px; }
.joy-left { left: 7px; top: calc(50% - 19px); }
.joy-right { right: 7px; top: calc(50% - 19px); }
.joystick-thumb {
	--stick-x: 0px;
	--stick-y: 0px;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 52%;
	height: 52%;
	transform: translate(calc(-50% + var(--stick-x)), calc(-50% + var(--stick-y)));
	display: grid;
	place-items: center;
	border: 1px solid var(--green);
	border-radius: 50%;
	background: rgba(10,35,38,0.96);
	color: var(--green);
	box-shadow: 0 0 22px rgba(140,227,155,0.24);
	pointer-events: none;
}
#action-button {
	width: clamp(88px, 23vw, 112px);
	height: clamp(88px, 23vw, 112px);
	display: grid;
	place-content: center;
	gap: 1px;
	border: 2px solid var(--gold);
	border-radius: 50%;
	background: rgba(28,25,13,0.9);
	color: var(--gold);
	font-weight: 700;
	letter-spacing: 0.08em;
	box-shadow: 0 0 24px rgba(255,217,106,0.25);
	scale: var(--touch-scale);
	transform-origin: bottom right;
	touch-action: none;
	pointer-events: auto;
}
#action-button small { font-size: 0.58rem; opacity: 0.72; }
#action-button.active { transform: scale(0.94); background: var(--gold); color: #211b08; }
body[data-left-handed='true'] #mobile-controls { flex-direction: row-reverse; }
body[data-left-handed='true'] .joystick-pad { transform-origin: bottom right; }
body[data-left-handed='true'] #action-button { transform-origin: bottom left; }
@media (hover: none), (pointer: coarse), (max-width: 920px) {
	body[data-game-mode='game'] #mobile-controls,
	body.has-dialogue #mobile-controls { display: flex; }
}



/* CompactCSS source: /games/scribe-journey/css/hud.css */
/* B"H — HUD: three quiet witnesses above the road, never hiding the road. */
#world-hud {
	position: absolute;
	inset: 0 0 auto;
	height: 74px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 18px;
	padding: 12px 18px;
	background: linear-gradient(180deg, rgba(5,22,27,0.98), rgba(5,22,27,0.88));
	border-bottom: 1px solid var(--border);
	z-index: var(--layer-hud);
}
.hud-location, .hud-quest { min-width: 0; display: grid; gap: 2px; }
.hud-quest { justify-items: end; text-align: right; }
.hud-kicker { color: var(--ink-muted); font: 700 0.61rem var(--font-mono); letter-spacing: 0.13em; }
#location-name, #quest-chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 0.92rem; }
.hud-time { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--gold); font: 700 0.76rem var(--font-mono); }
#context-rail {
	position: absolute;
	inset: auto 0 0;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 20px;
	border-top: 1px solid var(--border);
	background: rgba(5,22,27,0.96);
	color: var(--ink-muted);
	font-size: 0.83rem;
	z-index: var(--layer-context);
}
.context-key, kbd { min-width: 28px; padding: 4px 7px; border: 1px solid var(--border-bright); border-radius: 6px; background: rgba(105,233,239,0.08); color: var(--cyan); font: 700 0.7rem var(--font-mono); text-align: center; }
#desktop-help {
	position: fixed;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	display: flex;
	gap: 18px;
	color: var(--ink-muted);
	font-size: 0.7rem;
}
#desktop-help span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }



/* CompactCSS source: /games/scribe-journey/css/menus.css */
/* B"H — Menus: readable ledgers, generous touch targets, restrained radiance. */
.modal-content {
	width: min(620px, 100%);
	max-height: min(82dvh, 680px);
	overflow: auto;
	padding: clamp(20px, 4vw, 34px);
	border: 1px solid var(--border-bright);
	border-radius: var(--radius-large);
	background: var(--panel);
	box-shadow: var(--shadow), var(--glow);
}
.wide-modal { width: min(920px, 100%); }
.narrow-modal { width: min(440px, 100%); }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); }
#main-menu { flex-direction: column; text-align: center; background: radial-gradient(circle at 50% 32%, rgba(105,233,239,0.18), rgba(3,11,15,0.95) 58%); }
.title-sigil { width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 700 3.6rem Georgia, serif; box-shadow: 0 0 48px rgba(255,217,106,0.18); }
.eyebrow { color: var(--cyan); font: 700 0.7rem var(--font-mono); letter-spacing: 0.2em; }
.title-logo { margin-bottom: 4px; font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1; }
.subtitle-logo { color: var(--gold); font: 600 clamp(1rem, 2vw, 1.4rem) var(--font-display); letter-spacing: 0.12em; }
.title-actions { width: min(420px, 100%); display: grid; gap: 10px; margin-top: 22px; }
.version-copy { margin-top: 20px; color: var(--ink-muted); font-size: 0.74rem; }
.menu-button, .modal-action-button {
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-small);
	background: rgba(255,255,255,0.045);
	cursor: pointer;
	transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}
.menu-button:hover:not(:disabled), .modal-action-button:hover:not(:disabled) { border-color: var(--cyan); background: rgba(105,233,239,0.12); transform: translateY(-1px); }
.primary-button, .modal-action-button { border-color: var(--gold); color: var(--gold); }
.modal-action-button { width: 100%; margin-top: 18px; }
.menu-grid, .grid-cards, .team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-card, .team-card, .list-row, .inventory-item, .quest-log-item { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-small); background: rgba(255,255,255,0.035); }
.team-card, .list-row, .item-row, .quest-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.team-card small, .list-row small, .muted-copy { color: var(--ink-muted); }
.scroll-panel { max-height: 50dvh; overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.two-column-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row, .button-row, .balance-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.form-control { min-height: 44px; flex: 1 1 130px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--night-soft); color: var(--ink); }
.compact-button { min-height: 36px; padding: 6px 10px; }
.big-entry-icon, .big-symbol { font-size: 2.6rem; }
.big-symbol { text-align: center; font-size: 5rem; }
.empty-state { color: var(--ink-muted); text-align: center; }
.quest-objectives { margin-bottom: 0; padding-left: 20px; }
.quest-status-badge, .gold-copy { color: var(--gold); }
.gates-hex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hex-gate { min-height: 150px; display: grid; place-items: center; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 22px; background: rgba(255,255,255,0.035); color: var(--ink); text-align: center; }
.hex-gate:not(:disabled) { border-color: var(--gold); cursor: pointer; }
.hex-gate:disabled { opacity: 0.58; }
.hex-gate.unlocked { border-color: var(--cyan); opacity: 1; }
.gate-icon { font-size: 2rem; }
.gate-tooltip { color: var(--ink-muted); font-size: 0.74rem; }



/* CompactCSS source: /games/scribe-journey/css/settings.css */
/* B"H — Settings: a quiet ledger for comfort, clarity, and recovery. */
.settings-ledger {
	width: min(860px, 100%);
	max-height: min(92dvh, 760px);
	overflow: auto;
	overscroll-behavior: contain;
}
.settings-heading,
.settings-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.settings-heading h2 { margin: 0; }
.settings-intro { margin: 8px 0 18px; color: var(--ink-muted); }
.compact-button { width: auto; min-width: 88px; margin: 0; }
#settings-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
.settings-group {
	min-width: 0;
	margin: 0;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-medium);
	background: var(--panel-soft);
}
.settings-group:last-child { grid-column: 1 / -1; }
.settings-group legend {
	padding: 0 8px;
	color: var(--gold);
	font-family: var(--font-display);
	font-weight: 700;
}
.setting-toggle,
.setting-range {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--border);
}
.setting-toggle:last-child,
.setting-range:last-child { border-bottom: 0; }
.setting-toggle span,
.setting-range span { display: grid; gap: 2px; }
.setting-toggle small,
.setting-range small { color: var(--ink-muted); line-height: 1.3; }
.setting-toggle input {
	width: 24px;
	height: 24px;
	accent-color: var(--cyan);
}
.setting-range {
	grid-template-columns: minmax(170px, 1fr) minmax(110px, 0.65fr) 52px;
}
.setting-range input { width: 100%; accent-color: var(--cyan); }
.setting-range output {
	font-family: var(--font-mono);
	font-weight: 700;
	text-align: right;
	color: var(--cyan);
}
.chronicle-tools {
	margin-top: 16px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-medium);
	background: rgba(5, 18, 23, 0.7);
}
.chronicle-tools h3,
.chronicle-tools p { margin: 0 0 8px; }
.file-button {
	display: inline-grid;
	place-items: center;
	cursor: pointer;
	text-align: center;
}
.settings-status {
	min-height: 1.5em;
	margin: 12px 0;
	color: var(--ink-muted);
}
.settings-status[data-type='success'] { color: var(--green); }
.settings-status[data-type='error'] { color: var(--danger); }
.settings-footer { border-top: 1px solid var(--border); padding-top: 14px; }
.quiet-button { opacity: 0.86; }
@media (max-width: 680px) {
	#settings-form { grid-template-columns: 1fr; }
	.settings-group:last-child { grid-column: auto; }
	.setting-range { grid-template-columns: 1fr 72px; }
	.setting-range span { grid-column: 1 / -1; }
	.settings-heading,
	.settings-footer { align-items: stretch; flex-direction: column; }
	.settings-footer .menu-button,
	.settings-footer .modal-action-button { width: 100%; }
}
@media (orientation: landscape) and (max-height: 520px) {
	.settings-ledger { max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 20px); }
	.settings-group { padding: 10px; }
	.setting-toggle,
	.setting-range { min-height: 44px; padding: 6px 2px; }
}



/* CompactCSS source: /games/scribe-journey/css/multiplayer.css */
/* B"H — Shared presence remains legible, bounded, and clearly disclosed. */

.online-world-panel {
	display: grid;
	gap: 0.65rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid color-mix(in srgb, var(--accent-gold) 35%, transparent);
}

.online-status {
	font-weight: 700;
	letter-spacing: 0.04em;
}

.online-status[data-status="online"] {
	color: var(--success-color, #84d6a2);
}

.online-status[data-status="error"],
.online-status[data-status="offline"] {
	color: var(--text-muted, #a9a2a2);
}

.online-roster {
	display: grid;
	gap: 0.35rem;
	max-height: 10rem;
	overflow-y: auto;
}

.online-actor-row,
.online-party-controls,
.online-chat-form {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.online-actor-row {
	justify-content: space-between;
	padding: 0.35rem 0.45rem;
	border-radius: 0.45rem;
	background: color-mix(in srgb, var(--panel-bg, #111827) 86%, transparent);
}

.online-actor-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.online-ai-badge {
	padding: 0.1rem 0.35rem;
	border: 1px solid #b58cff;
	border-radius: 999px;
	color: #e5c7ff;
	font-size: 0.65rem;
	font-weight: 700;
}

.online-invite-button,
.online-party-button,
.online-chat-submit {
	min-height: 2rem;
	padding: 0.25rem 0.55rem;
	border: 1px solid color-mix(in srgb, var(--accent-gold) 55%, transparent);
	border-radius: 0.4rem;
	background: color-mix(in srgb, var(--panel-bg, #111827) 75%, #27435c);
	color: inherit;
	cursor: pointer;
}

.online-chat-form input,
.online-chat-form select {
	min-width: 0;
	padding: 0.4rem;
	border: 1px solid color-mix(in srgb, var(--accent-gold) 35%, transparent);
	border-radius: 0.4rem;
	background: var(--panel-bg, #111827);
	color: inherit;
}

.online-chat-form input {
	flex: 1;
}

.online-chat-entry {
	margin: 0.25rem 0;
	overflow-wrap: anywhere;
}

@media (max-width: 740px) {
	.online-chat-form {
		align-items: stretch;
		flex-direction: column;
	}
}



/* CompactCSS source: /games/scribe-journey/css/responsive.css */
/* B"H — Responsive revelation: desktop frame, portrait hand, landscape hand. */
@media (hover: none), (pointer: coarse), (max-width: 920px) {
	#game-shell { padding: 0; }
	#gameContainer { width: 100vw; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
	#world-hud {
		height: calc(62px + var(--safe-top));
		padding: calc(8px + var(--safe-top)) calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left));
		grid-template-columns: 1fr auto;
		gap: 8px;
	}
	.hud-quest { display: none; }
	#location-name { font-size: 0.8rem; }
	#coordinate-readout { grid-column: 1 / -1; font-size: 0.58rem; }
	#world-viewport { inset: calc(62px + var(--safe-top)) 0 0; bottom: 0; }
	#context-rail { display: none; }
	#global-chat-box {
		top: calc(72px + var(--safe-top));
		right: calc(8px + var(--safe-right));
		width: min(220px, 58vw);
		max-height: 120px;
		opacity: 0.82;
	}
	.chat-status { display: none; }
	#chat-messages { max-height: 78px; }
	#desktop-help { display: none; }
	#dialogue-box {
		bottom: calc(118px + var(--safe-bottom));
		width: calc(100% - 24px - var(--safe-left) - var(--safe-right));
		max-height: 46dvh;
		overflow: auto;
		padding: 16px;
	}
	.menu-screen {
		padding: calc(14px + var(--safe-top)) calc(12px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(12px + var(--safe-left));
	}
	.modal-content {
		max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 28px);
		border-radius: var(--radius-medium);
		overflow: auto;
	}
	.title-logo { font-size: clamp(2rem, 10vw, 3.4rem); }
	.title-sigil { width: 72px; height: 72px; font-size: 2.8rem; }
	.menu-grid, .grid-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
	.hud-time { padding: 6px 9px; font-size: 0.66rem; }
	#global-chat-box { display: none; }
	.menu-grid, .grid-cards, .team-grid, .two-column-panel { grid-template-columns: 1fr; }
	.menu-button { min-height: 48px; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 920px) {
	:root { --mobile-control-size: 116px; }
	#world-hud { height: calc(48px + var(--safe-top)); }
	#world-viewport { inset: calc(48px + var(--safe-top)) 0 0; }
	.hud-kicker, #coordinate-readout { display: none !important; }
	#mobile-controls { left: auto; width: 280px; gap: 14px; }
	#action-button { width: 76px; height: 76px; }
	#dialogue-box {
		bottom: calc(14px + var(--safe-bottom));
		width: min(580px, calc(100% - 310px));
		left: 14px;
		transform: none;
	}
	#dialogue-box.is-visible { animation: none; }
	.battle-area { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.battle-musag-display { min-height: 150px; }
	.musag-emoji { min-height: 62px; font-size: 3.5rem; }
}


