body.spieldeck-game-page .site-account-shell {
  margin-top: 24px;
}

body.spieldeck-game-page .site-account-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.spieldeck-game-page .site-account-panel-actions {
  align-items: center;
  justify-content: flex-end;
}

body.spieldeck-game-page .site-account-benefits {
  margin-top: 2px;
}

body.spieldeck-game-page .game-hero-links {
  scrollbar-width: thin;
}

@media (max-width: 720px) {
  body.spieldeck-game-page main.app,
  body.spieldeck-game-page main[class$="-app"] {
    width: min(100% - 16px, 760px);
    padding-top: 8px;
  }

  body.spieldeck-game-page header.site-topbar,
  body.spieldeck-game-page header[class$="-topbar"] {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 62px;
    margin-bottom: 12px;
    padding: 9px 10px;
    border-radius: 18px;
  }

  body.spieldeck-game-page header .site-brand,
  body.spieldeck-game-page header [class$="-brand"] {
    flex: 0 1 auto;
    min-width: 0;
    gap: 9px;
  }

  body.spieldeck-game-page header .site-brand-mark,
  body.spieldeck-game-page header [class$="-brand-mark"] {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body.spieldeck-game-page header .site-brand-copy,
  body.spieldeck-game-page header [class$="-brand-copy"] {
    min-width: 0;
  }

  body.spieldeck-game-page header .site-brand-copy > span,
  body.spieldeck-game-page header [class$="-brand-copy"] > span {
    display: none;
  }

  body.spieldeck-game-page header .site-topbar-actions,
  body.spieldeck-game-page header [class$="-topbar-actions"] {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    min-width: 0;
    gap: 5px;
  }

  body.spieldeck-game-page header .site-support,
  body.spieldeck-game-page header [class$="-support"] {
    display: none;
  }

  body.spieldeck-game-page header .site-account-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 5px;
  }

  body.spieldeck-game-page header .site-account-button,
  body.spieldeck-game-page header .site-account-link,
  body.spieldeck-game-page header .site-account-logout,
  body.spieldeck-game-page header .site-account-save-quick,
  body.spieldeck-game-page header .site-return,
  body.spieldeck-game-page header [class$="-return"],
  body.spieldeck-game-page header .focus-toggle-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  body.spieldeck-game-page header .site-account-logout {
    display: none;
  }

  body.spieldeck-game-page section.hero,
  body.spieldeck-game-page section[class$="-hero"] {
    margin-bottom: 12px;
  }

  body.spieldeck-game-page section.hero > *,
  body.spieldeck-game-page section[class$="-hero"] > *,
  body.spieldeck-game-page [class$="-controls-panel"] {
    min-width: 0;
    max-width: 100%;
  }

  body.spieldeck-game-page section.hero > .eyebrow,
  body.spieldeck-game-page section[class$="-hero"] > [class$="-copy"] > .eyebrow {
    margin-bottom: 7px;
    font-size: 0.7rem;
  }

  body.spieldeck-game-page section.hero h1,
  body.spieldeck-game-page section[class$="-hero"] h1 {
    margin-bottom: 8px;
    font-size: clamp(1.75rem, 8.5vw, 2.55rem);
    line-height: 1.02;
  }

  body.spieldeck-game-page section.hero > .hero-copy,
  body.spieldeck-game-page section[class$="-hero"] > [class$="-copy"] > p:not(.eyebrow) {
    display: none;
  }

  body.spieldeck-game-page .game-hero-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  body.spieldeck-game-page .game-hero-links a {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    scroll-snap-align: start;
    font-size: 0.8rem;
  }

  body.spieldeck-game-page .board-panel .setup-panel,
  body.spieldeck-game-page [class$="-controls-panel"] .setup-panel {
    grid-template-columns: minmax(0, 1.3fr) minmax(112px, 0.7fr);
    gap: 10px;
    margin-bottom: 10px;
  }

  body.spieldeck-game-page .mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.spieldeck-game-page .choice-pill {
    width: auto;
    min-width: 0;
  }

  body.spieldeck-game-page .choice-pill span {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  body.spieldeck-game-page .difficulty-field {
    min-width: 0;
  }

  body.spieldeck-game-page .difficulty-select {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.84rem;
  }

  body.spieldeck-game-page .mode-hint,
  body.spieldeck-game-page .notice-text {
    display: none;
  }

  body.game-viergewinnt .metric-grid,
  body.game-chess .metric-grid,
  body.game-dame .metric-grid,
  body.game-memory .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body.game-viergewinnt .metric-card,
  body.game-chess .metric-card,
  body.game-dame .metric-card,
  body.game-memory .metric-card {
    min-width: 0;
    min-height: 64px;
    padding: 9px;
  }

  body.game-viergewinnt .metric-card span,
  body.game-chess .metric-card span,
  body.game-dame .metric-card span,
  body.game-memory .metric-card span {
    font-size: 0.62rem;
    line-height: 1.15;
  }

  body.game-viergewinnt .metric-card strong,
  body.game-chess .metric-card strong,
  body.game-dame .metric-card strong,
  body.game-memory .metric-card strong {
    font-size: 1.05rem;
  }

  body.game-memory .setup-panel {
    grid-template-columns: 1fr;
  }

  body.spieldeck-game-page [class$="-controls-panel"] .status-copy h2 {
    margin-block: 4px 0;
    font-size: clamp(1.15rem, 5.2vw, 1.4rem);
  }

  body.spieldeck-game-page [class$="-controls-panel"] .action-row {
    margin-top: 10px;
  }

  body.spieldeck-game-page .board-panel .status-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  body.spieldeck-game-page .board-panel .status-copy h2 {
    margin-block: 4px 0;
    font-size: clamp(1.15rem, 5.4vw, 1.48rem);
  }

  body.spieldeck-game-page .board-panel .reset-button {
    width: auto;
    min-height: 42px;
    padding-inline: 12px;
    font-size: 0.82rem;
  }

  body.spieldeck-game-page .site-account-shell {
    width: min(100% - 2px, 760px);
    margin-top: 16px;
  }

  body.spieldeck-game-page .site-account-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
  }

  body.spieldeck-game-page .site-account-panel-copy {
    gap: 7px;
  }

  body.spieldeck-game-page .site-account-panel p {
    font-size: 0.9rem;
    line-height: 1.48;
  }

  body.spieldeck-game-page .site-account-benefits {
    gap: 6px;
  }

  body.spieldeck-game-page .site-account-benefit {
    min-height: 29px;
    padding-inline: 9px;
    font-size: 0.74rem;
  }

  body.spieldeck-game-page .site-account-panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  body.spieldeck-game-page .site-account-panel-actions > * {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 430px) {
  body.spieldeck-game-page header .focus-toggle-button {
    width: 38px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    position: relative;
  }

  body.spieldeck-game-page header .focus-toggle-button::after {
    content: "◉";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff8ec;
    font-size: 0.9rem;
  }

  body.spieldeck-game-page header [class$="-return"] {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0;
  }

  body.spieldeck-game-page header [class$="-return"]::after {
    content: "Spiele";
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.spieldeck-game-page * {
    scroll-behavior: auto !important;
  }
}
