:root {
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --ink: #18232a;
  --muted: #69747a;
  --line: #d9d8cf;
  --red: #db3a34;
  --red-dark: #a92726;
  --game-color: var(--red);
  --green: #168267;
  --yellow: #e6ae32;
  --blue: #397aa7;
  --sidebar: #18252a;
  --shadow: 0 14px 40px rgba(24, 35, 42, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
button { color: inherit; }
button, label, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding: 28px 18px 22px; display: flex; flex-direction: column; color: #eef1ed; background: var(--sidebar); z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 27px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand > div:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 17px; letter-spacing: 0; }
.brand > div:last-child > span { color: #a9b5b6; font-size: 7px; font-weight: 800; letter-spacing: 1px; margin-top: 6px; }
.brand-mark { width: 35px; height: 35px; flex: 0 0 35px; }

.game-nav { min-height: 0; margin-top: 26px; display: flex; flex: 1 1 auto; flex-direction: column; }
.game-nav #gameList { min-height: 0; overflow-y: auto; flex: 1 1 auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #536267 transparent; }
.game-nav #gameList::-webkit-scrollbar { width: 6px; }
.game-nav #gameList::-webkit-scrollbar-thumb { background: #536267; border-radius: 3px; }
.nav-label { margin: 0 10px 10px; color: #829294; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.game-generation { margin: 0 0 16px; }
.game-generation > h2 { margin: 0 10px 7px; color: #d1d8d6; font-size: 10px; font-weight: 900; letter-spacing: 1.1px; }
.game-kind-group + .game-kind-group { margin-top: 8px; }
.game-kind-group > h3 { margin: 0 10px 3px; color: #718184; font-size: 8px; font-weight: 900; letter-spacing: .9px; }
.game-button { width: 100%; min-height: 34px; border: 0; border-radius: 6px; padding: 7px 10px; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 9px; color: #b7c1c1; background: transparent; text-align: left; cursor: pointer; }
.game-button:hover { background: rgba(255,255,255,.055); color: #fff; }
.game-button.active { background: #2b393e; color: #fff; box-shadow: inset 3px 0 var(--game-color); }
.game-button strong { font-size: 12px; }
.game-count { font-size: 10px; font-weight: 700; color: #829294; }
.game-dot { width: 8px; height: 8px; display: inline-block; background: var(--game-color); border-radius: 50%; }

.sidebar-bottom { flex: 0 0 auto; margin-top: 0; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; }
.side-action { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; color: #9dacad; background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.side-action[hidden] { display: none; }
.side-action:hover { color: white; }
.side-action svg { width: 15px; }

main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; height: 62px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: #fffdf8; border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.crumb span { color: #66716f; }
.crumb svg { width: 12px; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.saved-state { display: flex; align-items: center; gap: 6px; color: #798581; font-size: 10px; font-weight: 700; }
.saved-state.persistence-unavailable { color: #a24b43; }
.saved-state svg { width: 15px; color: var(--green); }
.icon-button { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fffdf8; cursor: pointer; }
.icon-button:hover, .icon-button.active { border-color: #b9bbb3; background: #efeee7; }
.icon-button svg { width: 16px; }
.menu-button { display: none; }

.hero { position: relative; min-height: 226px; padding: 44px 7%; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: end; gap: 50px; overflow: hidden; color: white; background: color-mix(in srgb, var(--game-color) 85%, #18232a); transition: background .25s ease; }
.hero-copy, .hero-progress { position: relative; z-index: 2; }
.edition-line { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.92); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.edition-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.hero h1 { margin: 9px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: 50px; font-weight: 600; letter-spacing: 0; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.92); font-size: 13px; }
.hero-progress { padding-bottom: 5px; }
.progress-number { display: flex; align-items: baseline; gap: 7px; }
.progress-number strong { font-family: Georgia, "Times New Roman", serif; font-size: 47px; line-height: 1; }
.progress-number span { color: rgba(255,255,255,.9); font-size: 15px; }
.progress-meta { margin: 9px 0 10px; display: flex; justify-content: space-between; color: rgba(255,255,255,.92); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.progress-track { height: 7px; background: rgba(51,22,22,.28); overflow: hidden; border-radius: 4px; }
.progress-track span { display: block; width: 0; height: 100%; background: #ffe49a; border-radius: 4px; transition: width .35s ease; }
.hero-ball { position: absolute; width: 300px; height: 300px; right: 44%; top: -90px; border: 28px solid rgba(255,255,255,.065); border-radius: 50%; }
.hero-ball::before { content: ""; position: absolute; height: 28px; left: -20px; right: -20px; top: calc(50% - 14px); background: rgba(255,255,255,.065); }
.hero-ball span { position: absolute; width: 82px; height: 82px; left: 50%; top: 50%; border: 22px solid rgba(255,255,255,.065); border-radius: 50%; transform: translate(-50%,-50%); }

.workspace { width: min(1100px, 100%); margin: 0 auto; padding: 36px 5% 90px; }
.workspace.save-drag-active { outline: 2px dashed var(--game-color); outline-offset: -10px; }
.save-drop-state { position: fixed; top: 78px; left: calc(50% + 122px); z-index: 30; min-height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; color: var(--ink); background: var(--surface); border: 2px dashed var(--game-color); border-radius: 5px; box-shadow: var(--shadow); transform: translateX(-50%); pointer-events: none; font-size: 11px; }
.save-drop-state[hidden] { display: none; }
.save-drop-state svg { width: 17px; color: var(--game-color); }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; }
.eyebrow { margin: 0 0 3px; color: var(--game-color); font-size: 9px; font-weight: 900; letter-spacing: 1.5px; }
.workspace h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 600; }
.workspace-actions { display: flex; gap: 7px; }
.workspace-action { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #bfc1ba; border-radius: 5px; background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.workspace-action:hover { border-color: #8f9692; background: #efeee7; }
.workspace-action[hidden] { display: none; }
.workspace-action svg { width: 15px; }

.control-bar { margin-top: 24px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 12px 14px; }
.search-box { height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.search-box:focus-within { border-color: #818c8c; box-shadow: 0 0 0 3px rgba(57,122,167,.1); }
.search-box svg { width: 16px; color: #8e9696; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #9ca2a0; }
kbd { padding: 2px 6px; color: #999c98; background: #efeee8; border: 1px solid #dddcd5; border-radius: 3px; font-size: 10px; box-shadow: 0 1px 0 #cbc9c1; }
.segmented { height: 42px; display: flex; padding: 3px; border: 1px solid var(--line); background: #e9e7df; border-radius: 5px; }
.segmented button { padding: 0 13px; border: 0; border-radius: 3px; background: transparent; color: #717a7b; font-size: 10px; font-weight: 800; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px rgba(24,35,42,.12); }
.special-filters { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.special-filters::-webkit-scrollbar { display: none; }
.special-filter-label { margin-right: 3px; color: #747e7d; white-space: nowrap; font-size: 9px; font-weight: 900; letter-spacing: .7px; }
.special-filters button { min-height: 30px; padding: 0 10px; border: 1px solid #c8c9c2; border-radius: 4px; color: #697372; background: var(--surface); white-space: nowrap; font-size: 9px; font-weight: 800; cursor: pointer; }
.special-filters button:hover { border-color: #969d99; }
.special-filters button[aria-pressed="true"] { color: white; border-color: var(--game-color); background: var(--game-color); }

.category-tabs { margin-top: 18px; border-bottom: 1px solid var(--line); }
.category-primary { display: flex; align-items: flex-end; gap: 6px; }
.category-primary-list { min-width: 0; display: flex; flex: 1 1 auto; align-items: center; gap: 4px; }
.category-tabs:not(.has-overflow) .category-primary-list { overflow-x: auto; scrollbar-width: thin; }
.category-tabs.has-overflow .category-primary-list { max-height: 84px; flex-wrap: wrap; overflow: hidden; }
.category-tab { position: relative; padding: 11px 13px 12px; border: 0; background: transparent; color: #758080; white-space: nowrap; font-size: 10px; font-weight: 800; cursor: pointer; }
.category-tab span { margin-left: 5px; color: #a4aaa7; font-size: 9px; }
.category-tab.active { color: var(--ink); box-shadow: inset 0 -3px var(--game-color); }
.category-more { min-height: 34px; margin-bottom: 4px; padding: 0 10px; flex: 0 0 auto; border: 1px solid #c8c9c2; border-radius: 4px; color: #56625f; background: var(--surface); font-size: 9px; font-weight: 800; cursor: pointer; }
.category-more:hover { border-color: #969d99; background: #efeee7; }
.category-more:disabled { color: #8a9290; border-color: #d5d5cf; background: #efeee8; cursor: default; }
.category-overflow { max-height: 84px; padding: 6px 4px 7px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #e2e0d8; scrollbar-width: thin; }
.category-overflow[hidden] { display: none; }
.list-summary { min-height: 49px; display: flex; align-items: center; justify-content: space-between; color: #626d6a; font-size: 10px; font-weight: 700; }
.list-summary button { display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #6c7675; font-size: 10px; font-weight: 700; cursor: pointer; }
.list-summary svg { width: 13px; }

.item-groups { display: grid; gap: 17px; }
.location-group { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.group-header { width: 100%; min-height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: #ebe9e1; cursor: pointer; }
.group-header > span:first-child { display: flex; align-items: center; gap: 8px; }
.group-header svg { width: 14px; color: #73807f; transition: transform .2s; }
.group-header strong { font-size: 10px; letter-spacing: .8px; }
.group-header .group-progress { color: #788280; font-size: 9px; font-weight: 800; }
.location-group.collapsed .group-header { border-bottom: 0; }
.location-group.collapsed .group-header svg { transform: rotate(-90deg); }
.location-group.collapsed .item-list { display: none; }
.item-row { min-height: 68px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #e5e3dc; transition: background .15s ease, opacity .15s ease; }
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: #fbf8ef; }
.item-row.resume-target { outline: 3px solid color-mix(in srgb, var(--game-color) 45%, transparent); outline-offset: -3px; }
.item-row.collected { background: #f0f3ec; }
.item-row.collected .item-name, .item-row.collected .item-location { color: #77817f; text-decoration-color: #9da4a1; }
.item-row.collected .item-name { text-decoration-line: line-through; }
.check-wrap { position: relative; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.check-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.custom-check { width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid #abb1ae; border-radius: 4px; background: white; transition: .15s ease; }
.custom-check svg { display: none; width: 13px; color: white; stroke-width: 3; }
.check-wrap input:focus-visible + .custom-check { outline: 3px solid rgba(57,122,167,.22); }
.check-wrap input:checked + .custom-check { border-color: var(--green); background: var(--green); }
.check-wrap input:checked + .custom-check svg { display: block; }
.item-details { min-width: 0; min-height: 52px; padding: 0; display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.2fr) minmax(0, 124px) 30px; align-items: center; gap: 12px; color: inherit; border: 0; border-radius: 4px; background: transparent; text-align: left; cursor: pointer; }
.item-details:focus-visible { outline: 3px solid rgba(57,122,167,.3); outline-offset: 2px; }
.item-primary { min-width: 0; display: flex; align-items: center; gap: 11px; }
.sprite-box { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; background: #eceae2; border: 1px solid #deddd5; border-radius: 5px; image-rendering: pixelated; }
.sprite-box img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.item-name { display: block; font-size: 12px; font-weight: 800; }
.item-category { display: block; margin-top: 4px; color: #66716f; font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.item-location { color: #4f5c5c; font-size: 11px; line-height: 1.45; }
.item-location small { display: block; margin-top: 2px; color: #687371; font-size: 9px; }
.row-tags { display: flex; justify-content: flex-end; gap: 5px; }
.tag { padding: 4px 6px; border-radius: 3px; font-size: 8px; font-weight: 900; letter-spacing: .5px; }
.tag.missable { color: #a32f2b; background: #f4d7d2; }
.tag.choice { color: #756117; background: #efe5b7; }
.tag.hidden { color: #356b88; background: #d9e9f1; }
.tag.renewable { color: #1e6d54; background: #d8ebe3; }
.tag.temporary { color: #765719; background: #eee1b9; }
.details-chevron { width: 15px; color: #9fa5a3; }

.empty-state { padding: 64px 20px; text-align: center; border: 1px dashed #c7c6bd; border-radius: 6px; background: rgba(255,255,255,.3); }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #e4e2da; }
.empty-icon svg { width: 20px; }
.empty-state h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.empty-state p { margin: 7px 0 16px; color: var(--muted); font-size: 11px; }
.empty-state button { padding: 8px 13px; border: 1px solid #b8bab4; border-radius: 4px; background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }

dialog { max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); color: var(--ink); border: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(17,27,31,.58); backdrop-filter: blur(2px); }
.item-dialog { width: min(480px, calc(100vw - 30px)); padding: 0; border-radius: 7px; overflow: hidden; }
.item-dialog[open] { display: flex; flex-direction: column; }
#dialogContent { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.dialog-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; }
.dialog-hero { min-height: 148px; padding: 27px 68px 24px 28px; display: flex; flex: 0 0 auto; align-items: center; gap: 20px; color: white; background: #26383d; }
.dialog-sprite { width: 80px; height: 80px; display: grid; place-items: center; flex: 0 0 80px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 6px; }
.dialog-sprite img { width: 64px; image-rendering: pixelated; }
.dialog-hero .item-category { color: rgba(255,255,255,.86); }
.dialog-hero h2 { margin: 4px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; }
.dialog-body { min-height: 0; padding: 25px 28px 28px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); }
.dialog-label { margin: 0 0 5px; color: #68716f; font-size: 8px; font-weight: 900; letter-spacing: 1.2px; }
.dialog-body > p:not(.dialog-label) { margin: 0 0 19px; font-size: 12px; line-height: 1.55; }
.dialog-body a { color: var(--blue); font-weight: 700; text-underline-offset: 2px; }
.source-code { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.raid-details { margin: 0 0 19px; }
.raid-context { margin: 0 0 8px; color: #52625e; font-size: 10px; line-height: 1.45; }
.raid-drop-list { margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.raid-drop-row { min-height: 32px; padding: 6px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.4; }
.raid-drop-row:last-child { border-bottom: 0; }
.raid-drop-row strong { font-size: 11px; }
.raid-drop-row span { color: #5f6d69; text-align: right; }
.dialog-badges { display: flex; gap: 5px; margin-bottom: 22px; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.dialog-copy { height: 44px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #b8bab4; border-radius: 4px; background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.dialog-copy:hover { background: #efeee7; }
.dialog-copy svg { width: 14px; }
.dialog-toggle { width: 100%; height: 44px; border: 0; border-radius: 4px; color: white; background: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.dialog-toggle.is-collected { color: #485552; background: #e2e5de; }
.confirm-dialog { width: min(390px, calc(100vw - 30px)); padding: 30px; overflow-y: auto; border-radius: 7px; text-align: center; }
.confirm-icon { width: 44px; height: 44px; margin: 0 auto 13px; display: grid; place-items: center; color: var(--game-color); background: #f5dfda; border-radius: 50%; }
.confirm-icon svg { width: 20px; }
.confirm-dialog h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; }
.confirm-dialog p { margin: 9px 0 23px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.confirm-actions button { height: 39px; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 10px; font-weight: 800; cursor: pointer; }
.confirm-actions button:last-child { color: white; border-color: var(--game-color); background: var(--game-color); }
.save-import-dialog { position: relative; width: min(450px, calc(100vw - 30px)); padding: 29px; overflow-y: auto; border-radius: 7px; }
.save-import-icon { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: var(--game-color); border-radius: 50%; }
.save-import-icon svg { width: 20px; }
.save-import-status { margin: 18px 0 5px; color: var(--game-color); font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.save-import-dialog h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; }
.save-import-copy { margin: 8px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.save-import-results { margin: 0 0 19px; border-block: 1px solid var(--line); }
.save-import-results > div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.save-import-results > div:last-child { border-bottom: 0; }
.save-import-results dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.save-import-results dd { margin: 0; font-size: 15px; font-weight: 800; }
.save-import-requirements { margin: 0 0 17px; border-block: 1px solid var(--line); }
.save-import-requirements > div { min-height: 38px; display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.save-import-requirements > div:last-child { border-bottom: 0; }
.save-import-requirements dt { color: var(--muted); font-size: 9px; font-weight: 800; }
.save-import-requirements dd { margin: 0; font-size: 10px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.save-import-ambiguity { margin: 0 0 17px; padding: 10px 12px; color: #664f21; background: #f4e8c4; border-left: 3px solid #c39227; border-radius: 3px; font-size: 10px; line-height: 1.5; }
.save-import-drop-zone { min-height: 104px; margin: 0 0 17px; padding: 16px; display: grid; place-items: center; gap: 4px; color: #5e6a68; text-align: center; border: 2px dashed #b9c0bc; border-radius: 5px; background: #f4f3ed; }
.save-import-drop-zone.drag-active { color: var(--game-color); border-color: var(--game-color); background: color-mix(in srgb, var(--game-color) 8%, var(--surface)); }
.save-import-drop-zone svg { width: 23px; color: var(--game-color); }
.save-import-drop-zone strong { color: var(--ink); font-size: 11px; }
.save-import-drop-zone span { font-size: 9px; }
.save-import-local { margin: 0 0 20px; display: flex; align-items: center; gap: 8px; color: #52625e; font-size: 10px; line-height: 1.45; }
.save-import-local svg { width: 15px; flex: 0 0 15px; color: var(--green); }
.save-import-dialog .confirm-actions button { min-height: 42px; height: auto; padding: 8px; line-height: 1.3; }
.save-import-dialog .confirm-actions button:disabled { color: #8f9895; border-color: var(--line); background: #e5e6e1; cursor: default; }
.backup-restore-options { display: grid; gap: 10px; }
.backup-restore-options section { padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: #f7f5ee; }
.backup-restore-options h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.backup-restore-options p { margin: 5px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.backup-restore-options button { min-height: 40px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.backup-restore-options button:hover { border-color: #b9bbb3; background: #efeee7; }
.backup-restore-options button svg { width: 14px; }
.progress-import-actions.has-replace { grid-template-columns: auto 1fr 1fr; }
.roadmap-dialog { position: relative; width: min(680px, calc(100vw - 30px)); padding: 0; overflow: hidden; border-radius: 7px; background: var(--surface); }
.roadmap-dialog[open] { display: flex; flex-direction: column; }
.roadmap-dialog-content { min-height: 0; padding: 30px 68px 32px 32px; overflow-y: auto; overscroll-behavior: contain; }
.roadmap-eyebrow { margin: 0 0 4px; color: var(--game-color); font-size: 9px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
.roadmap-dialog h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; }
.roadmap-direction { margin: 12px 0 5px; color: #334a50; font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 700; line-height: 1.45; }
.roadmap-reliability { margin: 0; color: #5b6866; font-size: 11px; line-height: 1.55; }
.roadmap-sections { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
.roadmap-section h3, .roadmap-not-goal h3 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.roadmap-section ul, .roadmap-not-goal ul { margin: 0; padding-left: 18px; color: #4f5d5b; font-size: 11px; line-height: 1.55; }
.roadmap-section li + li, .roadmap-not-goal li + li { margin-top: 4px; }
.roadmap-not-goal { margin-top: 26px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 5px; background: #f1efe7; }
.roadmap-not-goal p { margin: 0; color: #4f5d5b; font-size: 11px; line-height: 1.55; }
.roadmap-not-goal ul { margin-block: 10px; columns: 2; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; padding: 11px 15px; display: flex; align-items: center; gap: 8px; color: white; background: #26383d; border-radius: 5px; box-shadow: var(--shadow); font-size: 11px; font-weight: 700; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 15px; color: #65c5a5; }
.sidebar-scrim { display: none; }
.loading-state, .load-error { padding: 46px 24px; display: grid; justify-items: center; gap: 7px; color: var(--muted); text-align: center; border: 1px dashed #c7c6bd; border-radius: 6px; background: rgba(255,255,255,.3); }
.loading-state strong, .load-error strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.loading-spinner { width: 24px; height: 24px; margin-bottom: 4px; border: 3px solid #d4d5ce; border-top-color: var(--game-color); border-radius: 50%; animation: loading-spin .8s linear infinite; }
.load-error button { margin-top: 8px; padding: 8px 14px; border: 1px solid #b8bab4; border-radius: 4px; background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.control-bar button:disabled, .control-bar input:disabled, .workspace-action:disabled, .top-actions button:disabled, .list-summary button:disabled { opacity: .5; cursor: default; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.legal-footer { padding: 22px 5% 28px; color: #68706d; background: #ebe9e1; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.55; text-align: center; }
.legal-footer p { width: min(860px, 100%); margin: 3px auto; }
.legal-footer a { color: #526d78; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: 244px; transition: transform .25s ease; box-shadow: 10px 0 30px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 15; display: block; background: rgba(16,25,28,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .menu-button { display: inline-grid; }
  .topbar { padding: 0 20px; }
  .crumb { margin-right: auto; margin-left: 13px; }
  .hero { grid-template-columns: 1fr 260px; padding-inline: 5%; }
  .save-drop-state { left: 50%; }
  .control-bar { grid-template-columns: 1fr auto; }
  .search-box { grid-column: 1 / -1; }
}

@media (max-height: 600px) {
  .sidebar { padding-block: 16px 12px; }
  .brand { padding-bottom: 14px; }
  .game-nav { margin-top: 14px; }
  .sidebar-bottom { padding-top: 10px; }
  .side-action { padding-block: 6px; }
}

@media (max-width: 650px) {
  .saved-state { display: none; }
  .crumb span, .crumb svg { display: none; }
  .hero { min-height: 270px; grid-template-columns: 1fr; align-items: start; gap: 27px; padding: 35px 22px 31px; }
  .hero-progress { width: min(100%, 330px); }
  .hero h1 { font-size: 38px; }
  .hero-ball { right: -110px; top: -58px; }
  .workspace { padding: 30px 16px 70px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
  .workspace-actions { width: 100%; }
  .workspace-action { flex: 1; justify-content: center; }
  .control-bar { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding-inline: 5px; }
  .special-filters { width: 100%; flex-wrap: wrap; overflow: visible; }
  .special-filter-label { flex-basis: 100%; margin-bottom: 1px; }
  .special-filters button { flex: 1; padding-inline: 7px; }
  .category-primary-list, .category-tabs.has-overflow .category-primary-list, .category-overflow { max-height: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .category-tab { flex: 0 0 auto; }
  .list-summary { min-height: 45px; }
  .item-row { grid-template-columns: 44px minmax(0,1fr); gap: 4px; padding: 10px 11px; }
  .item-details { grid-template-columns: minmax(0,1fr) 15px; gap: 8px; }
  .item-primary { gap: 9px; }
  .item-location { grid-column: 1; margin-top: -6px; }
  .row-tags { grid-column: 1; justify-content: flex-start; }
  .details-chevron { grid-column: 2; grid-row: 1 / 4; }
  .sprite-box { width: 39px; height: 39px; flex-basis: 39px; }
  .dialog-hero { padding-left: 20px; gap: 14px; }
  .dialog-body { padding: 22px 20px 24px; }
  .roadmap-dialog-content { padding: 26px 56px 28px 22px; }
  .roadmap-sections { grid-template-columns: 1fr; gap: 22px; }
  .roadmap-not-goal { padding: 16px; }
  .roadmap-not-goal ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .loading-spinner { animation: none; }
}

@media (hover: none), (pointer: coarse) {
  .save-drop-state { display: none !important; }
  .workspace.save-drag-active { outline: 0; }
}
