:root {
    color-scheme: dark;
    --bg: #201f1b;
    --surface: #292824;
    --surface-raised: #33322b;
    --surface-hover: #3d3b32;
    --ink: #f1edf9;
    --text: #e8e8ee;
    --muted: #aaaab8;
    --line: #403f39;
    --accent: #c4a7ff;
    --accent-pink: #f59ac9;
    --accent-soft: #352b49;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -1.5px; margin-bottom: 12px; font-weight: 650; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
h3 { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.quiet, .subtitle { color: var(--muted); line-height: 1.6; }
.shell-container { width: calc(100% - 80px); max-width: 1360px; margin: 0 auto; }

/* The shell keeps services and modules on separate horizontal rows. */
.workspace-header { position: sticky; top: 0; z-index: 20; background: #24231e; border-bottom: 1px solid var(--line); }
.primary-row { min-height: 80px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; font-size: 24px; font-weight: 750; letter-spacing: -.8px; }
.brand-symbol { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #695087; border-radius: 12px; background: #382b4b; color: #edcbff; font-size: 33px; line-height: 1; }
.brand small { display: block; margin-top: 4px; font-size: 8px; font-weight: 550; letter-spacing: 1.1px; color: var(--muted); }
.primary-navigation { display: flex; align-items: stretch; gap: 5px; align-self: stretch; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.group-link { position: relative; display: flex; align-items: center; padding: 0 14px; flex-shrink: 0; color: var(--muted); font-size: 13px; font-weight: 550; white-space: nowrap; transition: color .15s, background .15s; }
.group-link:hover { color: var(--text); background: #ffffff05; }
.group-link.active { color: var(--accent); }
.group-link.active::after { content: ""; position: absolute; bottom: 0; left: 14px; right: 14px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #b496ff, #ee91c6); }
.workspace-label { margin-left: auto; font-size: 9px; letter-spacing: 1.7px; color: #888897; }
.secondary-bar { background: #2b2a24; border-top: 1px solid #ffffff06; }
.secondary-row, .context-row { display: flex; align-items: center; gap: 26px; min-height: 56px; }
.navigation-label { min-width: 76px; flex-shrink: 0; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #9995aa; }
.module-navigation, .context-navigation { display: flex; align-items: center; gap: 7px; min-width: 0; overflow-x: auto; padding: 8px 3px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav-link { display: block; padding: 9px 14px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; transition: color .15s, background .15s; }
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link.active { color: #e3d2ff; background: var(--accent-soft); border-color: #554169; }
.context-bar { border-top: 1px solid var(--line); background: #262520; }
.context-row { min-height: 47px; }
.context-navigation .nav-link { padding: 6px 13px; font-size: 11px; }
.workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; }
main { padding: 44px 40px 60px; max-width: 1440px; width: 100%; margin: 0 auto; flex: 1; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: var(--accent); margin-bottom: 17px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.page-heading p { margin-bottom: 0; font-size: 14px; }
.heading-dot { color: var(--accent-pink); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; padding: 12px 18px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.primary { background: linear-gradient(110deg, #7c3aed, #a42f87); color: #fff; border-color: #a371e3; }
.primary:hover { background: linear-gradient(110deg, #8b46f3, #b33394); box-shadow: 0 3px 16px #b46fff24; }
.secondary { background: var(--surface-raised); border-color: #504f48; color: var(--text); }
.secondary:hover { background: var(--surface-hover); border-color: #706078; }
.overview-strip { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 20px; padding: 27px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 36px; }
.overview-strip > div { border-right: 1px solid var(--line); }
.overview-strip > div:last-child { border: 0; }
.metric { display: block; font-size: 31px; font-weight: 600; letter-spacing: -1px; margin-bottom: 7px; color: var(--ink); }
.metric-label { font-size: 11px; color: var(--muted); }
.overview-caption { padding-left: 10px; font-size: 13px; color: var(--muted); line-height: 1.9; align-self: center; }
.overview-caption strong { font-weight: 500; color: #d1c2e8; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.section-heading > .quiet { font-size: 11px; }
.filters { display: flex; gap: 12px; align-items: center; margin-bottom: 25px; }
.search-field { flex: 1; }
.filters select { min-width: 175px; }
.filters input, .filters select { height: 44px; }
input:not([type=checkbox]):not([type=hidden]), textarea, select { width: 100%; background: #262520; border: 1px solid #4f4d45; border-radius: 7px; padding: 12px 14px; color: var(--text); font-size: 13px; }
input:not([type=checkbox]):not([type=hidden]):hover, textarea:hover, select:hover { border-color: #716e60; }
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #8d8b9b; }
.empty-state { border: 1px dashed #5b5743; background: #272621; border-radius: 12px; text-align: center; padding: 60px 25px; }
.empty-symbol { margin: 0 auto 22px; background: #342940; border: 1px solid #594268; border-radius: 16px; width: 60px; height: 60px; display: grid; place-items: center; color: #e5aff0; font-size: 31px; }
.empty-state h3 { font-size: 22px; margin-bottom: 13px; }
.empty-state p { max-width: 430px; margin: 0 auto 26px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 18px; }
.game-card, .module-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 24px; transition: border-color .15s, box-shadow .15s; }
.game-card:hover, .module-card:hover { border-color: #8661a5; box-shadow: 0 4px 20px #00000020; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 12px; }
.game-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 23px; font-weight: 600; }
.badge { display: inline-block; padding: 6px 9px; border-radius: 5px; background: #3e3c31; font-size: 10px; font-weight: 550; color: #c8c1d8; }
.stage-production, .stage-prototype { background: #3d2b54; color: #d7b8ff; }
.stage-prerelease { background: #443050; color: #eab8f4; }
.stage-released { background: #4a2b40; color: #ffb3db; }
.stage-onhold, .stage-archived { background: #383732; color: #b0aebc; }
.game-card h3 { margin-bottom: 12px; }
.game-card > p { font-size: 12px; color: var(--muted); line-height: 1.7; min-height: 41px; white-space: pre-line; overflow-wrap: anywhere; }
.platform-list { display: flex; flex-wrap: wrap; gap: 7px; }
.platform-list span { font-size: 10px; padding: 5px 8px; border: 1px solid #4a4358; border-radius: 4px; color: #c1b5d2; }
.card-footer { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.page-footer { padding: 21px 0; border-top: 1px solid var(--line); font-size: 10px; color: #9996a7; }
.page-footer > div { display: flex; justify-content: space-between; gap: 20px; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; margin-bottom: 32px; }
.back-link:hover, .text-link:hover { color: #f3b9df; }
.editor { max-width: 1000px; }
.panel { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 22px; }
.form-field { margin-top: 23px; }
.form-field label, .platform-options legend { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; }
.form-field small { display: block; font-size: 11px; color: var(--muted); margin-top: 8px; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.required { color: var(--accent-pink); }
.platform-options { padding: 0; margin: 28px 0 0; border: 0; }
.platform-options p { font-size: 11px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.checkbox-option { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; cursor: pointer; }
.checkbox-option:hover { border-color: #7b5f94; background: #302738; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: #a778e9; }
.form-actions { display: flex; gap: 12px; margin-top: 27px; }
.validation-summary-valid { display: none; }
.validation-summary-errors, .field-validation-error { color: #ffb3c1; font-size: 12px; line-height: 1.6; }
.validation-summary-errors { background: #402733; padding: 15px; border-radius: 7px; margin-bottom: 20px; }
.input-validation-error { border-color: #df7c9c !important; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.description { font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.project-facts { font-size: 12px; margin-bottom: 0; }
.project-facts dt { color: var(--muted); margin-bottom: 9px; }
.project-facts dd { margin: 0 0 22px; overflow-wrap: anywhere; }
.project-facts dd:last-child { margin-bottom: 0; }
.record-id { color: #a39cae; font-size: 10px; margin-top: 26px; overflow-wrap: anywhere; }
.record-id code { margin-left: 12px; }
.notice { background: #3e3145; padding: 12px; border: 1px solid #65506e; border-radius: 6px; color: #f1cae8; font-size: 12px; }
.text-link { font-size: 12px; color: var(--accent); }
.module-card p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.module-card h3 { margin-top: 14px; }
.planned-badge { margin-bottom: 20px; background: #3b2e4e; color: #d6b7fa; }
.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; }
.skip-link { position: fixed; left: 12px; top: -70px; padding: 15px; background: #7c3aed; color: white; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 12px; }

@media (max-width: 1100px) {
    .shell-container { width: calc(100% - 48px); }
    .primary-row { gap: 22px; min-height: 72px; }
    .brand small, .workspace-label { display: none; }
    .group-link { padding: 0 12px; }
    .primary-navigation { margin-left: auto; }
    main { padding: 36px 24px 48px; }
    .overview-strip { grid-template-columns: repeat(3, 1fr); }
    .overview-caption { display: none; }
    .overview-strip > div:nth-child(3) { border: 0; }
    .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .shell-container { width: calc(100% - 32px); }
    .primary-row { gap: 16px; min-height: 64px; }
    .brand { font-size: 20px; gap: 8px; }
    .brand-symbol { width: 32px; height: 32px; border-radius: 10px; font-size: 27px; }
    .group-link { font-size: 12px; padding: 0 11px; }
    .secondary-row, .context-row { gap: 0; }
    .secondary-row { min-height: 53px; }
    .navigation-label { display: none; }
    .nav-link { padding: 8px 12px; }
    .module-navigation, .context-navigation { width: 100%; }
    main { padding: 30px 16px 40px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 22px; }
    h1 { letter-spacing: -1px; }
    .overview-strip { padding: 22px 18px; gap: 12px; margin-bottom: 30px; }
    .metric { font-size: 26px; }
    .metric-label { font-size: 9px; }
    .filters { flex-wrap: wrap; }
    .search-field { flex-basis: 100%; }
    .filters > div:nth-child(2) { flex: 1; }
    .filters select { min-width: 0; }
    .detail-grid, .form-columns { grid-template-columns: 1fr; gap: 0; }
    .panel { padding: 22px; }
    .page-footer span { display: none; }
    .empty-state { padding: 43px 20px; }
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
    .checkbox-option { padding: 12px 9px; font-size: 11px; }
}

.our-game-icon { display: block; object-fit: contain; border-radius: 8px; max-width: 100%; }
.our-game-icon-full { width: 460px; height: auto; aspect-ratio: 460 / 215; margin-bottom: 22px; }
.our-game-icon-small { width: calc(460px / 2.5); height: calc(215px / 2.5); flex-shrink: 0; }
.game-card .game-mark { width: 86px; height: 86px; flex-shrink: 0; }
.game-card .card-top:has(.our-game-icon) { flex-wrap: wrap; gap: 12px; }
