.arcade-preparation-info { min-height:1.4em; margin:12px 0; color:var(--muted,#a9cbd5); font-size:.84rem; }
.arcade-preview-label { display:block; padding:7px 12px; background:#163342; color:#9ce4de; text-align:center; font:600 12px system-ui; }
#update-notice { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; width:min(460px,calc(100vw - 32px)); padding:20px; }
#update-notice[hidden] { display:none; }
#update-notice .update-notice-copy { display:grid; grid-template-columns:36px minmax(0,1fr); gap:12px; align-items:start; width:100%; }
#update-notice .update-notice-copy > span:last-child { min-width:0; }
#update-notice .update-notice-icon { width:36px; height:36px; }
#update-notice strong { font-size:1rem; line-height:1.35; }
#update-notice small { margin-top:4px; font-size:.84rem; line-height:1.45; }
#update-notice #update-state { margin:10px 0 0; color:#b9d5e7; font-size:.84rem; line-height:1.5; overflow-wrap:anywhere; }
#update-notice button { justify-self:end; min-height:44px; max-width:100%; padding:11px 18px; color:#062826; background:#86e1dc; font-size:.84rem; white-space:normal; }
#update-notice button:disabled { opacity:.65; cursor:default; }
.arcade-preview-label button { margin-left:12px; padding:5px 10px; border:1px solid #64959e; border-radius:8px; color:#c9f9f4; background:#204654; font:inherit; cursor:pointer; }
.arcade-spotlight { width:100%; margin:8px 0 22px; }
.arcade-spotlight label { display:block; margin-bottom:8px; color:var(--ink,#e7faff); font-size:.92rem; font-weight:750; }
.arcade-search-field { display:flex; align-items:center; gap:12px; width:100%; min-height:54px; padding:0 16px; border:1px solid #537987; border-radius:16px; background:#112d3a; color:#e7faff; }
.arcade-search-field:focus-within { outline:2px solid #7ce0d8; outline-offset:3px; border-color:#7ce0d8; }
.arcade-search-field svg { width:21px; height:21px; flex-shrink:0; color:#6ecfc9; }
.arcade-search-field input { min-width:0; width:100%; flex:1; padding:14px 0; border:0; outline:0; border-radius:0; color:inherit; background:transparent; font:inherit; box-shadow:none; }
.arcade-search-field input:focus { outline:0; box-shadow:none; }
.arcade-search-field input::placeholder { color:#9ebdc9; opacity:1; }
.arcade-search-field kbd { flex-shrink:0; padding:3px 7px; border:1px solid #597784; border-radius:6px; font:600 .7rem system-ui; color:#9ebdc9; }
.arcade-search-field button { flex-shrink:0; width:36px; min-height:36px; border:0; border-radius:9px; background:transparent; color:inherit; font-size:1.5rem; cursor:pointer; }
.arcade-search-field button[hidden] { display:none; }
.arcade-spotlight > p { min-height:1.4em; margin:8px 2px 0; color:var(--muted,#9ebdc9); font-size:.8rem; }
html[data-arcade-home-view="dashboard"] body[data-arcade-screen="home"] { display:flex; flex-direction:column; }
html[data-arcade-home-view="dashboard"] body[data-arcade-screen="home"] .arcade-preview-label { flex:none; }
html[data-arcade-home-view="dashboard"] body[data-arcade-screen="home"] .app-shell { flex:1; height:auto; min-height:0; }
html[data-arcade-home-view="dashboard"] #home.active { grid-template-rows:auto auto minmax(0,1fr) auto; row-gap:6px; }
html[data-arcade-home-view="dashboard"] #home .arcade-spotlight { grid-row:1; margin:0; }
html[data-arcade-home-view="dashboard"] #home .arcade-spotlight label { margin-bottom:4px; font-size:.8rem; }
html[data-arcade-home-view="dashboard"] #home .arcade-search-field { min-height:42px; }
html[data-arcade-home-view="dashboard"] #home .arcade-search-field input { padding-block:9px; }
html[data-arcade-home-view="dashboard"] #home .arcade-spotlight > p { margin-top:4px; font-size:.72rem; }
html[data-arcade-home-view="dashboard"] #home #arcade-game-library { grid-row:2; }
html[data-arcade-home-view="dashboard"] #home .arcade-vitrine { grid-row:3; }
html[data-arcade-home-view="dashboard"] #home .arcade-preparation-info { grid-row:4; min-height:0; margin:0; }
html[data-arcade-home-view="dashboard"] #home .arcade-preparation-info:empty { display:none; }
/* A escolha usa as capas e o gabinete do próprio Arcade. As ilustrações só são pedidas ao abrir. */
.arcade-mode-choice {
  box-sizing: border-box;
  width: min(752px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto;
  padding: clamp(20px, 3.5vw, 32px);
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: dark;
  color: #f7f4ef;
  background: radial-gradient(ellipse at 0% 0%, #14567e, transparent 67%), linear-gradient(150deg, #103e67, #081f42 80%);
  border: 1px solid #677984;
  border-radius: 24px;
  box-shadow: 0 24px 80px #020916b3, inset 0 1px 0 #ffffff14;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-align: start;
  scrollbar-color: #71818b #151d2b;
}
.arcade-mode-choice::backdrop { background: #061b37c4; }
.arcade-mode-choice #arcade-mode-title {
  margin: 0;
  color: #fff3d7;
  font-size: clamp(1.7rem, 4.3vw, 2.45rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.045em;
}
.arcade-mode-choice #arcade-mode-copy {
  max-width: 60ch;
  margin: 10px 0 0;
  color: #d3dce1;
  font-size: 1rem;
  line-height: 1.5;
}
.arcade-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.arcade-mode-options button {
  --mode-accent: #a0e9d9;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #6d8588;
  border-radius: 16px;
  color: #f8f7ef;
  background: linear-gradient(130deg, #115879, #0d446c);
  box-shadow: 0 4px 0 #0c1721;
  font: inherit;
  text-align: start;
  cursor: pointer;
  touch-action: manipulation;
}
.arcade-mode-options button[data-mode="dashboard"] {
  --mode-accent: #ffd697;
  border-color: #88806c;
  background: linear-gradient(130deg, #235584, #153760);
}
.arcade-mode-options button:enabled:hover { border-color: var(--mode-accent); }
.arcade-mode-options button:enabled:hover .arcade-mode-caption strong { color: var(--mode-accent); }
.arcade-mode-options button:focus-visible,
.arcade-mode-choice #arcade-mode-later:focus-visible { outline: 3px solid #ffe3a7; outline-offset: 3px; }
.arcade-mode-options button:disabled { cursor: progress; }
.arcade-mode-options button:disabled .arcade-mode-caption { opacity: .8; }
.arcade-mode-art {
  display: block;
  width: 100%;
  aspect-ratio: 20 / 11;
  background-color: #0b3452;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid #ffffff28;
}
.arcade-mode-choice[open] .mode-art-classic { background-image: url("../assets/home-modes/classic.webp"); }
.arcade-mode-choice[open] .mode-art-arcade { background-image: url("../assets/home-modes/cabinet.webp"); }
.arcade-mode-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-content: start;
  gap: 5px 12px;
  padding: 15px 16px 17px;
}
.arcade-mode-caption strong {
  color: #fff6e6;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.arcade-mode-caption::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: 8px;
  height: 8px;
  margin-inline-end: 2px;
  border-block-start: 2px solid var(--mode-accent);
  border-inline-end: 2px solid var(--mode-accent);
  transform: rotate(45deg);
}
.arcade-mode-caption span {
  grid-column: 1/-1;
  color: #dce3e5;
  font-size: .89rem;
  line-height: 1.45;
}
.arcade-mode-footer { display: grid; justify-items: center; gap: 9px; margin-top: 16px; }
.arcade-mode-choice #arcade-mode-status { margin: 0; color: #b4e9dc; font-size: .9rem; line-height: 1.45; }
.arcade-mode-choice #arcade-mode-status:empty { display: none; }
.arcade-mode-choice #arcade-mode-later {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid #72808b;
  border-radius: 999px;
  color: #0b3052;
  background: #aedfff;
  font: 650 .94rem/1.25 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.arcade-mode-choice #arcade-mode-later:hover { border-color: #adbac4; background: #d0eeff; }
@media (max-width: 540px) {
  .arcade-mode-choice { padding: 18px; border-radius: 19px; }
  .arcade-mode-choice #arcade-mode-copy { margin-top: 8px; font-size: .93rem; }
  .arcade-mode-options { grid-template-columns: minmax(0, 1fr); gap: 11px; margin-top: 16px; }
  .arcade-mode-options button { display: grid; grid-template-columns: 44% minmax(0, 1fr); align-items: stretch; border-radius: 13px; }
  .arcade-mode-art { height: 100%; min-height: 108px; aspect-ratio: auto; background-size: contain; border: 0; border-inline-end: 1px solid #ffffff24; }
  .arcade-mode-options button[data-mode="dashboard"] .arcade-mode-art { background-color: #070f24; }
  .arcade-mode-caption { padding: 12px; gap: 4px; }
  .arcade-mode-caption strong { font-size: 1.17rem; }
  .arcade-mode-caption span { font-size: .84rem; line-height: 1.35; }
  .arcade-mode-footer { margin-top: 14px; }
}
@media (max-width: 340px) {
  .arcade-mode-choice { width: calc(100vw - 18px); padding: 14px; }
  .arcade-mode-options button { grid-template-columns: 40% minmax(0, 1fr); }
}
@media (max-height: 460px) and (min-width: 541px) {
  .arcade-mode-choice { padding: 14px 20px; }
  .arcade-mode-choice #arcade-mode-title { font-size: 1.5rem; }
  .arcade-mode-choice #arcade-mode-copy { max-width: none; margin-top: 5px; font-size: .89rem; }
  .arcade-mode-options { gap: 10px; margin-top: 12px; }
  .arcade-mode-options button { display: grid; grid-template-columns: 42% minmax(0,1fr); }
  .arcade-mode-art { min-height: 100px; height: 100%; aspect-ratio: auto; background-size: contain; border: 0; border-inline-end: 1px solid #ffffff24; }
  .arcade-mode-caption { align-content: center; gap: 4px; padding: 10px; }
  .arcade-mode-caption strong { font-size: 1.17rem; }
  .arcade-mode-caption span { font-size: .83rem; }
  .arcade-mode-footer { margin-top: 10px; }
}
@media (forced-colors: active) {
  .arcade-mode-choice[open] .arcade-mode-art { forced-color-adjust: none; }
  .arcade-mode-options button:focus-visible,
  .arcade-mode-choice #arcade-mode-later:focus-visible { outline-color: Highlight; }
}
@media(max-width:520px) {
  #update-notice { right:max(10px,env(safe-area-inset-right)); bottom:max(10px,env(safe-area-inset-bottom)); width:calc(100vw - 20px); padding:16px; }
  #update-notice button { width:100%; justify-self:stretch; }
  .arcade-search-field kbd { display:none; }
}
@media(prefers-reduced-motion:reduce) { .achievement-toast { animation:none!important; } }

/* Keep the collection and cabinet in the same vertical scroll flow on small screens. */
@media (max-width:499px), (max-height:500px) {
  html[data-arcade-home-view="dashboard"] #home.has-account-library.active {
    display:flex;
    flex-direction:column;
    overflow-x:hidden;
    overflow-y:auto;
  }

  html[data-arcade-home-view="dashboard"] #home.has-account-library.active > * {
    flex:none;
  }

  html[data-arcade-home-view="dashboard"] #home.has-account-library .arcade-vitrine {
    height:auto;
  }
}

@media (max-width:499px) {
  html[data-arcade-home-view="dashboard"] #home.has-account-library .arcade-vitrine {
    display:flex;
    flex-direction:column;
  }

  html[data-arcade-home-view="dashboard"] #home.has-account-library .arcade-vitrine-stage {
    flex:none;
    height:140px;
  }
}

@media (min-width:500px) and (max-height:500px) {
  html[data-arcade-home-view="dashboard"] #home.has-account-library .arcade-vitrine {
    grid-template-rows:auto auto;
  }
}
