:root {
  --gv-surface: var(--gx-s1); --gv-surface-2: var(--gx-s2); --gv-raised: var(--gx-s3);
  --gv-line: var(--gx-line); --gv-line-strong: var(--gx-line-2);
  --gv-header-bg: var(--gx-bg); --gv-bar-bg: var(--gx-bg);
}
.gv-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.gv-guide__note, .gv-steps p, .gv-guide > p { display: none; }
.gv-pill { height: 40px; border: 0; border-radius: 12px; background: var(--gx-s1); color: var(--gx-t1); }
.gv-btn { min-height: 52px; border: 0; border-radius: var(--gx-r-md); box-shadow: none; }
.gv-btn--primary { background: var(--gx-red); color: var(--gx-red-ink); }
.gv-btn--secondary { background: var(--gx-s2); color: var(--gx-t1); }
.gv-code, .gv-exit, .gv-sprays { border: 0; }
.gv-code { border-radius: var(--gx-r-lg); background: var(--gx-s1); padding-inline: 16px; }
.gv-exit { background: var(--gx-bg); }
.gv-exit .gv-wrap { padding: 20px; border-radius: var(--gx-r-lg); background: var(--gx-s1); }
.gv-seg { --gx-thumb: var(--gx-s3); --gx-thumb-r: 999px; }
.view-switch-button, .view-switch-button[aria-pressed="true"] { background: none; transition: color .2s var(--gx-ease); }
.gv-more { margin-top: 32px; padding-top: 0; border-top: 0; }
.gv-guide { padding-top: 0; border-top: 0; }
[data-i18n="warehouse.page.000"], [data-i18n="warehouse.page.002"], [data-i18n="warehouse.page.030"], [data-i18n="warehouse.page.031"], [data-i18n="warehouse.page.039"], [data-i18n="warehouse.page.106"], [data-i18n="warehouse.page.079"], [data-i18n="warehouse.ui.decode_caption"] { display: none; }
.input-description { display: none; }
#emptyIntro h1, .gv-head__title { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.gv-intro__lead { display: none; }
.weapon-card { background-color: rgba(15,25,35,0); }
#categoryNav { --gx-thumb: var(--gx-s3); --gx-thumb-r: 999px; }
#categoryNav .category-jump-button, #categoryNav .category-jump-button[aria-current="location"] { background: none; transition: color .2s var(--gx-ease); }
#textCode:focus, #textCode:focus-visible { outline: 2px solid var(--gx-red); outline-offset: -2px; }
.code-editor-region-inner { padding: 0; }

/* Action rows share one grid: equal columns, one gap, one row height per tier */
.gv-actions, .gv-head-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gv-actions .gv-btn { min-height: 52px; padding: 0 12px; }
.gv-head-tools { margin-top: 8px; }
.gv-head-tools .gv-btn, .gv-head-tools__paste {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--gx-r-md);
  background: var(--gx-s2); color: var(--gx-t1);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.gv-head-tools__paste::before {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.9%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%228%22 y=%223%22 width=%228%22 height=%224%22 rx=%221.500%22/%3E%3Cpath d=%22M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.9%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%228%22 y=%223%22 width=%228%22 height=%224%22 rx=%221.500%22/%3E%3Cpath d=%22M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2%22/%3E%3C/svg%3E") center / contain no-repeat;
}
.gv-head-tools__paste:hover { color: var(--gx-t1); text-decoration: none; }
@media (hover: hover) { .gv-head-tools__paste:hover { background: var(--gx-s3); } }
@media (min-width: 768px) {
  .gv-head-tools { grid-template-columns: 1fr; }
  .gv-head-tools__paste { display: none; }
}

/* ========== 2026-11-02: full spec pass ========== */
.gv-main { --gv2-gap: 12px; }

/* Touch screens keep no hover colour; press comes from the kit, never a darker fill */
.gv-btn--primary:active { background: var(--gx-red); transform: none; }
.gv-btn--secondary:active { background: var(--gx-s2); }
.gv-pill:active { transform: none; }
.gv-pill { gap: 6px; }
.weapon-card:active { background: rgba(32,44,57,0); }
.gv-btn--primary:disabled, .gv-btn--secondary:disabled { background: var(--gx-s2); color: var(--gx-t3); }
@media (hover: hover) and (pointer: fine) {
  .gv-btn--secondary:hover:not(:disabled) { background: var(--gx-s3); }
  .gv-btn--primary:hover:not(:disabled) { background: var(--gx-red-2); }
  .weapon-card:hover { background-color: var(--gx-s2); }
  .has-item:hover .accessory-image-box { background: var(--gx-s2); }
}
@media (hover: none) {
  .gv-btn--primary:hover:not(:disabled) { background: var(--gx-red); }
  .gv-btn--secondary:hover:not(:disabled) { background: var(--gx-s2); }
  .gv-pill:hover { background: var(--gx-s1); }
  .gv-icon-btn:hover { background: var(--gx-s1); color: var(--gv-text-2); }
  .gv-icon-btn[aria-expanded="true"]:hover { background: var(--gx-s3); color: var(--gx-t1); }
  .weapon-card:hover { background-color: rgba(32,44,57,0); }
  .has-item:hover .accessory-image-box { background: var(--gx-s1); }
  #clearCodeButton:hover, #modalZoomButton:hover, #modalCloseButton:hover { background: transparent; }
  .gv-head-tools__paste:hover { background: var(--gx-s2); }
}
.gv-icon-btn { transition: background-color .2s var(--gx-ease), color .2s var(--gx-ease); }
.gv-btn { transition: background-color .2s var(--gx-ease), color .2s var(--gx-ease); }
.view-switch-count, .category-jump-count { transition: color .2s var(--gx-ease); }
.status-pill, .status-dot { transition: color .2s var(--gx-ease), background-color .2s var(--gx-ease); }

/* Header */
.gv-header { border-bottom-color: var(--gx-line); }
.loading-hud { background: var(--gx-s1); border-bottom: 0; }

/* Empty state: title, then the field */
.gv-intro { padding: 16px 0 20px; }
.gv-intro .gv-code { margin-top: 16px; }
.gv-intro .gv-code > summary { display: none; }
.gv-intro #inputPanel { padding-top: 16px; }
body:not([data-loadout-state="empty"]) .gv-sample { display: none; }
.gv-sample { display: grid; gap: 8px; margin-bottom: 24px; }
.gv-sample__demo { width: 100%; }
.gv-decode { margin: 0; padding: 16px; border: 0; border-radius: var(--gx-r-lg); background: var(--gx-s1); }
.gv-decode__grid li { background: var(--gx-s2); border: 0; border-radius: var(--gx-r-sm); }
.gv-decode__controls .gv-btn { flex: 1 1 auto; margin-right: 0; min-height: 44px; }
.gv-decode__controls .gv-btn--primary { background: var(--gx-s2); color: var(--gx-t1); }
#decodeOpen[aria-disabled="true"] { background: var(--gx-s2); color: var(--gx-t3); }
.gv-decode__controls .gv-icon-btn { width: 44px; height: 44px; background: var(--gx-s2); }
html[data-ys-motion="on"].js .gv-decode:is([data-state="idle"],[data-state="reading"],[data-state="inflating"]) .gv-decode__grid li { background: var(--gx-s2); border: 0; opacity: .5; }

/* Code panel */
#inputPanel { padding: 0 0 16px; }
.gv-code { margin-top: 24px; border-top: 0; }
.input-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.input-panel-header { flex-wrap: nowrap; min-height: 44px; }
.input-panel-controls { flex-direction: row-reverse; justify-content: space-between; flex: 1; min-width: 0; }
.status-pill { background: none; padding: 0; height: auto; min-width: 0; }
#codeEditorToggle { position: relative; width: 44px; min-height: 44px; padding: 0; flex: none; border-radius: 50%; background: var(--gx-s2); }
#codeEditorToggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#codeEditorToggle .ui-icon { width: 18px; height: 18px; transition: transform .24s var(--gx-ease-move); }
.code-editor-region { transition: none; }
.code-input-shell { margin-top: 8px; }
#textCode { min-height: 112px; border: 0; border-radius: var(--gx-r-md); background: var(--gx-s2); transition: box-shadow .2s var(--gx-ease); }
#textCode[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--gx-red-t); }
#clearCodeButton { border-radius: 50%; width: 44px; height: 44px; top: 2px; right: 2px; }
.input-help-main { display: none; }
#codeHelp { margin-top: 0; }
#shareHint[data-state="ready"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
#codeTypeBadge { background: var(--gx-s2); }
.action-grid { margin-top: 12px; }
.action-grid .gv-btn { min-height: 52px; }
/* Nothing typed: only the field and Load. The rest arrive with the first character. */
.gv-intro .input-panel-header { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip-path: inset(50%); }
.gv-intro #codeEditorToggle { display: none; }
.gv-intro #inputPanel:has(#textCode:placeholder-shown) #codeInputMeta,
.gv-intro #inputPanel:has(#textCode:placeholder-shown) .action-grid .gv-btn--secondary { display: none; }
.gv-intro .code-input-shell { margin-top: 0; }
.action-grid .gv-btn--secondary, #codeInputMeta { transition: opacity .2s linear; }
@starting-style { .action-grid .gv-btn--secondary, #codeInputMeta { opacity: 0; } }

/* Notices lose the side stripe */
.gv-callout { align-items: center; border-left: 0; border-radius: var(--gx-r-md); background: var(--gx-s1); }
.gv-callout > .gv-btn { min-height: 44px; border-radius: 12px; background: var(--gx-s2); }
.gv-notices { position: relative; }
.gv-notices .gx-ghost { width: 100%; }
#shareFallbackPanel input { border: 0; border-radius: 12px; background: var(--gx-s2); }

/* Player header */
#playerCardBox { border: 0; border-radius: var(--gx-r-md); }
#playerCardBox .player-card-open-indicator { width: 32px; height: 32px; border-radius: 50%; }
#levelBadge { background: var(--gx-s2); }
.gv-totals__body { display: none; }
.gv-totals summary { border-radius: 8px; }
.gx-sheet .gv-totals__body { display: block; position: static; padding: 0 12px 12px; border: 0; background: none; box-shadow: none; font-size: 15px; line-height: 1.6; color: var(--gx-t2); }
.gx-sheet .gv-totals__body strong { color: var(--gx-t1); font-variant-numeric: tabular-nums; }
.gx-sheet #totalsHelp, .gx-sheet .gv-totals__body p + p { margin-top: 8px; font-size: 14px; color: var(--gx-t3); }
.gv-side-exit { border: 0; border-radius: var(--gx-r-lg); background: var(--gx-s1); padding: 20px; }
.gv-side-exit__row img { border-radius: 12px; }

/* Toolbar */
.gv-toolbar { padding-bottom: 4px; }
.results-search { display: block; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: max-height .28s var(--gx-ease-move), opacity .2s linear, visibility 0s linear .28s; }
.is-search-open .results-search { max-height: 44px; opacity: 1; visibility: visible; transition: max-height .28s var(--gx-ease-move), opacity .2s linear, visibility 0s; }
.gv-toolbar:not(.is-search-open) { row-gap: 0; }
.gv-toolbar:not(.is-search-open) .category-nav-shell { margin-top: 8px; }
.gv-toolbar.is-search-open { row-gap: 8px; }
.weapon-search-input { height: 44px; border: 0; border-radius: var(--gx-r-md); background: var(--gx-s1); }
.weapon-search-input:focus, .weapon-search-input:focus-visible { outline: 2px solid var(--gx-red); outline-offset: -2px; }
.weapon-search-icon { top: 13px; }
.weapon-search-clear { width: 40px; height: 40px; border-radius: 50%; }
.weapon-card.search-match { background-color: rgba(32,44,57,0); }
.category-jump-button, .category-jump-button[aria-current="location"] { border: 0; }
@media (max-width: 639px) {
  .category-nav { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}
@media (min-width: 640px) {
  .results-search, .is-search-open .results-search { max-height: none; overflow: visible; opacity: 1; visibility: visible; transition: none; }
  .gv-toolbar:not(.is-search-open) { row-gap: 8px; }
  .gv-toolbar:not(.is-search-open) .category-nav-shell { margin-top: 0; }
  .gv-toolbar { background: var(--gx-bg); }
}

/* Weapons: each category is one card of rows */
#weaponCategories { overflow-anchor: none; }
.landscape-section { margin-top: var(--gv2-gap); padding: 8px; border-top: 0; border-radius: var(--gx-r-lg); background: var(--gx-s1); }
.landscape-column:first-child .landscape-section:first-child { margin-top: 4px; }
.category-header { padding: 4px 8px; }
.weapon-card { width: 100%; margin-inline: 0; border-radius: var(--gx-r-md); background-color: rgba(32,44,57,0); }
.weapon-image-frame { background: var(--gx-s2); border-radius: var(--gx-r-sm); }
.results-empty-state { border-radius: var(--gx-r-lg); background: var(--gx-s1); margin-top: 4px; }
.filter-reset-button { border: 0; background: var(--gx-s2); border-radius: var(--gx-r-md); }
.gv-skel-row { padding-inline: 8px; }
/* Leaving rows keep their place while the rest of the list settles */
.landscape-section.gv2-leaving { display: block !important; }
.landscape-column[hidden]:has(.gv2-leaving) { display: block !important; }
.weapon-card.gv2-leaving { display: grid !important; position: absolute; z-index: 0; pointer-events: none; }
.landscape-section > .weapon-inner-grid .weapon-card.gv2-leaving { margin: 0; }
.landscape-section { position: relative; }

/* Sprays */
.gv-sprays { margin-top: 24px; }
.accessory-image-box { background: var(--gx-s1); }
.is-empty .accessory-image-box { border: 0; background: var(--gx-s1); }
.accessory-zoom-hint { border-radius: 50%; width: 24px; height: 24px; }
.accessory-image-box + div { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.accessory-slot { border-radius: var(--gx-r-md); }

/* App exit */
.gv-exit { margin-top: 24px; padding: 0; border: 0; }
.gv-exit .gv-stores .gv-btn { min-height: 48px; }
.gv-exit__row img { border-radius: 12px; }

/* Guide */
.gv-guide { margin-top: 32px; }
.gv-steps { margin-top: 12px; padding: 4px 16px; border-radius: var(--gx-r-lg); background: var(--gx-s1); }
.gv-steps li { align-items: center; padding: 12px 0; border-top: 0; }
.gv-steps li::before { grid-row: auto; background: var(--gx-s2); }
.gv-steps h3 { font-size: 15px; font-weight: 600; }
.guide-faq { padding-inline: 16px; border-top: 1px solid var(--gx-line); background: var(--gx-s1); }
.gv-steps + .guide-faq { margin-top: 12px; border-top: 0; border-radius: var(--gx-r-lg) var(--gx-r-lg) 0 0; }
.guide-faq:last-of-type { border-radius: 0 0 var(--gx-r-lg) var(--gx-r-lg); }
.guide-faq summary .ui-icon, .gv-code > summary .ui-icon { transition: transform .26s var(--gx-ease-move); }
.gx-closing > summary .ui-icon, .guide-faq.gx-closing[open] > summary .ui-icon, .gv-code.gx-closing[open] > summary .ui-icon { transform: none; }
.gv-shot__frame { border: 0; }

/* Floating */
.back-to-top { border: 0; background: var(--gx-s2); color: var(--gx-t1); transform: translateY(8px); box-shadow: 0 4px 16px rgba(4,10,16,.35); transition: opacity .2s linear, transform .24s var(--gx-ease), visibility 0s linear .24s; }
.back-to-top.is-visible { transform: none; transition: opacity .2s linear, transform .24s var(--gx-ease), visibility 0s; }
.mobile-action-bar { backdrop-filter: none; -webkit-backdrop-filter: none; border-top-color: var(--gx-line); }
.mobile-action-bar .gv-btn { border-radius: var(--gx-r-md); }
.toast { border: 0; border-radius: var(--gx-r-md); background: var(--gx-s3); box-shadow: 0 8px 24px rgba(4,10,16,.42); }
.toast-action { border: 0; background: var(--gx-line-2); border-radius: 12px; }
.toast-close { border-radius: 50%; }
#toastContainer { transition: bottom .24s var(--gx-ease); bottom: calc(16px + env(safe-area-inset-bottom) + var(--v2-kb, 0px)); }
body.has-mobile-action-bar #toastContainer { bottom: calc(16px + var(--bar-h) + env(safe-area-inset-bottom) + var(--v2-kb, 0px)); }
.gv2-ghost { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }

/* Image viewer: bottom sheet on phones, fixed stage so it never changes height */
html[data-ys-motion] body .image-modal { opacity: 1; visibility: visible; transition: none; background: rgba(4,10,16,.6); }
html[data-ys-motion] body .image-modal .modal-dialog { translate: none; scale: 1; transition: none; }
.modal-dialog { width: min(720px, 100%); border: 0; border-radius: 24px; background: var(--gx-s1); grid-template-rows: auto auto minmax(0, 1fr); box-shadow: 0 12px 40px rgba(4,10,16,.5); }
.gv2-grab { display: none; }
.modal-toolbar { border-bottom: 0; padding: 8px 8px 8px 20px; }
.modal-caption { font-size: 15px; font-weight: 600; }
.modal-media { height: min(60dvh, 560px); margin: 0 12px 12px; padding: 12px; border-radius: var(--gx-r-md); background: var(--gx-bg); overflow: auto; }
#modalImage { max-height: 100%; }
.modal-media.is-zoomed #modalImage { max-height: none; }
#modalZoomButton, #modalCloseButton { transition: background-color .16s var(--gx-ease); }
#modalZoomButton:active, #modalCloseButton:active { background: var(--gx-s3); }
#modalZoomButton:focus:not(:focus-visible), #modalCloseButton:focus:not(:focus-visible) { outline: 0; }
@media (max-width: 600px) {
  html[data-ys-motion] body .image-modal { padding: 0; align-items: flex-end; }
  .modal-dialog { width: 100%; max-height: 88dvh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .gv2-grab { display: grid; }
  .modal-toolbar { padding-top: 0; }
  .modal-media { height: clamp(200px, 44dvh, 420px); }
}

/* Sheets: centred without a transform, so dragging only moves them vertically */
.gx-sheet { left: 0; right: 0; margin-inline: auto; transform: translateY(104%); }
.gx-sheet.is-on { transform: none; }
.gx-sheet-row { transition: background-color .16s var(--gx-ease); }
/* Handle: round press like every other pressable */
.gx-sheet-grab { position: relative; }
.gx-sheet-grab::before { position: relative; z-index: 1; transition: background-color .16s var(--gx-ease), width .2s var(--gx-ease-move); }
.gx-sheet-grab::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 24px; margin: -12px 0 0 -32px; border-radius: 12px; background: rgba(245,243,239,.08); opacity: 0; transform: scale(.8); transition: opacity .16s linear, transform .2s var(--gx-ease-move); }
.gx-sheet-grab:active::after, .gx-sheet-grab.is-held::after { opacity: 1; transform: none; }
.gx-sheet-grab:active::before, .gx-sheet-grab.is-held::before { background: var(--gx-t3); width: 44px; }

@keyframes gv-enter { from { opacity: 0; translate: 0 6px; } }

@media (min-width: 1024px) {
  .gv-totals { flex-basis: auto; margin-top: 0; }
  .gv-totals > summary { display: inline-flex; }
  .gv-totals__body { display: none; position: static; }
  .gx-sheet .gv-totals__body { display: block; padding: 0 12px 12px; font-size: 15px; line-height: 1.6; }
  .gv-intro { padding-top: 40px; }
  .gv-exit { margin-top: 32px; }
}
@media (min-width: 768px) {
  .gv-code { max-width: none; }
  .gv-steps { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .gv-btn, .gv-icon-btn, .results-search, .is-search-open .results-search, .back-to-top, .back-to-top.is-visible, #toastContainer { transition: none; }
}
body[data-loadout-state="empty"] .gv-intro .gv-code { margin-top: 16px; }
.modal-media { height: min(56dvh, 520px); }
@media (max-width: 600px) { .modal-media { height: clamp(200px, 38dvh, 360px); } }
/* One red per view: loading again is a quiet action once something is loaded */
body:not([data-loadout-state="empty"]) #loadButton:not(:disabled) { background: var(--gx-s2); color: var(--gx-t1); }
@media (hover: hover) and (pointer: fine) { body:not([data-loadout-state="empty"]) #loadButton:hover:not(:disabled) { background: var(--gx-s3); } }
.gv2-ghost { background: var(--gx-bg); }
.gv-list { position: relative; }
#weaponFilterEmpty.gv2-leaving { display: block !important; position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }
/* Keyboard open: nothing floats over the field */
html.gx-kb .back-to-top { opacity: 0; visibility: hidden; pointer-events: none; }
#weaponFilterEmpty.gv2-floating { position: absolute; left: 0; right: 0; top: 0; z-index: 1; margin-top: 0; }
/* The cover fades over the page, the ad stays above it so it never blinks */
body.gv2-swapping #adSlot { position: relative; z-index: 41; }
