.game-header { display: block; margin: 0; color: var(--header-ink, #fff9dc); background: var(--header-bg, var(--ink)); }
.game-bar {
  width: var(--page-shell-width); min-height: 66px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.game-header :is(.brand, .wordmark) {
  display: inline-flex; align-items: center; gap: 10px; --title-icon-size: 32px;
  font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: -.05em;
}
.game-header-actions { --action-gap: clamp(6px, 2vw, 16px); display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px var(--action-gap); }
/* Keep the language capsule a steady distance from the account, whatever the gap between other actions. */
.game-header-actions > .game-language-control { margin-inline-end: calc(8px - var(--action-gap)); }
@media (min-width: 651px) {
  .game-header-actions > .game-language-control { margin-inline-end: calc(10px - var(--action-gap)); }
}
.game-header-actions:empty { display: none; }
.game-header .connection { font-size: 14px; white-space: nowrap; }
:is(.game-header,.turn-actions) .fullscreen-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 10px;
  border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font-size: 13px; box-shadow: none;
}
.game-header .fullscreen-toggle:enabled:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
:is(.game-header,.turn-actions) .fullscreen-toggle svg { width: 17px; height: 17px; }
@media (min-width: 1024px) {
  .game-header[data-workspace] .game-bar { width: auto; min-height: 54px; margin-inline: clamp(14px, 1.5vw, 32px); }
}
@media (max-width: 720px) {
  /* The longest title, the language capsule and the account stay on one row in a 360px-wide page:
     a 375px window with a classic scrollbar, or the space its gutter reserves. */
  .game-bar { min-height: 54px; padding-block: 4px; flex-wrap: wrap; gap: 2px 6px; }
  .game-header :is(.brand, .wordmark) { font-size: 18px; gap: 6px; }
  .game-header-actions { margin-inline-start: auto; }
}
@media (max-width: 1023px) {
  .game-header[data-workspace] .game-bar { width: calc(100% - 24px); min-height: 48px; }
}
@media (max-width: 360px) {
  .game-bar { column-gap: 2px; }
  .game-header :is(.brand, .wordmark) { --title-icon-size: 26px; font-size: 16px; }
  .game-header .connection { font-size: 12px; }
}
.game-nav { display: flex; align-items: center; flex: none; }
.game-title-icon { flex: none; display: block; width: var(--title-icon-size, 32px); height: auto; border-radius: 18%; }
.game-nav .game-home {
  position: relative; display: inline-flex; align-items: center; min-height: 40px;
  margin-inline-start: 4px; padding: 2px 9px; border-radius: 8px;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.game-home::before {
  content: ''; position: absolute; inset-block: 10%; inset-inline-start: -4px;
  border-inline-start: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.game-nav .game-home:is(:hover, :focus-visible) {
  text-decoration: none; background-color: color-mix(in srgb, currentColor 10%, transparent);
}
.game-nav .game-home:active { background-color: color-mix(in srgb, currentColor 16%, transparent); }
.game-nav .platform-launcher, .platform-drawer .drawer-close {
  display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 8px; box-shadow: none; color: inherit; background: transparent;
  font: inherit; cursor: pointer;
}
.game-nav .platform-launcher { margin-inline-end: 6px; }
.platform-launcher::before {
  content: ''; width: 20px; height: 20px;
  background: radial-gradient(circle, currentColor 2px, transparent 2.4px) center / calc(100% / 3) calc(100% / 3);
}
.game-nav .platform-launcher:hover, .platform-drawer .drawer-close:hover, .platform-drawer nav a:hover {
  background: color-mix(in srgb, currentColor 10%, transparent); transform: none;
}
.game-nav :focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.platform-drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0; width: min(336px, calc(100% - 42px));
  height: 100dvh; max-height: none; max-width: none; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-inline-end: 1px solid var(--line, var(--edge)); background: var(--card, var(--paper));
  color: var(--ink, #f5f1fe); box-shadow: 5px 0 28px #0003; text-align: start;
}
.platform-drawer::backdrop { background: rgb(15 15 22 / .58); }
.platform-drawer[open] { display: flex; flex-direction: column; }
.drawer-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px 24px; border-bottom: 1px solid var(--line, var(--edge));
}
.drawer-heading strong { font-size: 22px; line-height: 1.25; letter-spacing: -.03em; }
.platform-drawer .drawer-close { font: 400 26px/1 system-ui, sans-serif; }
.platform-drawer nav { display: grid; flex: none; padding: 16px 14px; }
.platform-drawer nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 8px;
  color: inherit; text-decoration: none; font-size: 15px; font-weight: 700;
}
.platform-drawer nav .drawer-home {
  min-height: 48px; padding-inline: 14px; gap: 10px; border-radius: 10px;
  background: #d1f879; color: #192a27; font-size: 16px; font-weight: 750;
}
.platform-drawer nav .drawer-home:is(:hover, :focus-visible) { background: #bff05a; text-decoration: none; }
.drawer-home::before {
  content: ''; flex: none; width: 18px; height: 18px; background: currentColor;
  clip-path: polygon(50% 4%, 100% 46%, 89% 58%, 82% 52%, 82% 94%, 58% 94%, 58% 65%, 42% 65%, 42% 94%, 18% 94%, 18% 52%, 11% 58%, 0 46%);
}
:where([data-link-icon]) { display: inline-flex; align-items: center; gap: .4em; }
[data-link-icon]::after {
  content: ''; flex: none; width: var(--link-icon-size, 20px); aspect-ratio: 1;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' opacity='.09'/%3E%3Cpath d='m10.25 8 4 4-4 4' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-link-icon="back"]::after { order: -1; transform: rotate(180deg); }
[data-link-icon="up"]::after { transform: rotate(-90deg); }
[data-link-icon="down"]::after { transform: rotate(90deg); }
[data-link-icon="external"]::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' opacity='.09'/%3E%3Cpath d='M13 7.5h4v4m0-4-5.5 5.5M10 8.5H8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V14' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.drawer-home { --link-icon-size: 24px; }
.platform-drawer nav > a[data-link-icon]::after { margin-inline-start: auto; }
.drawer-catalog-heading {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center;
  gap: 10px; margin: 14px 4px 0 10px;
}
.drawer-catalog-heading h2 { margin: 0; font-size: 15px; font-weight: 750; line-height: 1.4; letter-spacing: .02em; }
.drawer-catalog-heading::after {
  content: ''; grid-column: 2; grid-row: 1; height: 1px; background: var(--line, var(--edge));
}
.platform-drawer .drawer-catalog-heading a {
  grid-column: 3; grid-row: 1; gap: 4px; padding: 0 6px;
  color: var(--credit-color); font-size: 13px;
}
.platform-drawer nav img { display: block; flex: none; border-radius: 7px; }
.platform-drawer nav .drawer-guidelines { margin-top:10px; border-top:1px solid var(--line,var(--edge)); border-radius:0; font-size:14px; }
.drawer-credit {
  flex: none; margin-top: auto; padding: 6px 24px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line, var(--edge));
}
@media (prefers-reduced-motion: no-preference) {
  .game-nav .game-home { transition: background-color .14s ease; }
  .platform-drawer[open] { animation: platform-slide .18s ease-out; }
  @keyframes platform-slide { from { transform: translateX(-100%); } }
}
@media (max-width: 660px) {
  .game-nav .platform-launcher { margin-inline-end: 2px; }
  .game-nav .game-home { padding-inline: 8px 6px; }
}
.member-menu { position: relative; font: 600 14px/1.45 system-ui, sans-serif; text-align: start; }
.member-menu[data-member="pending"] { visibility:hidden; }
.member-menu svg { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.member-menu .member-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px;
  padding: 2px; list-style: none; white-space: nowrap; cursor: pointer; color: inherit; border-radius: 9px;
}
.member-link::-webkit-details-marker { display: none; }
.member-avatar {
  display: grid; flex: none; place-items: center; width: 36px; height: 36px; overflow: hidden;
  border-radius: 50%; color: #375b53; background: #deebe4;
}
.member-menu:is([data-member="yes"],[data-member="pending-member"]) .member-avatar { background: #e0d4f4; }
.member-menu:is([data-member="yes"],[data-member="pending-member"]) .member-avatar svg { width: 85%; height: 85%; }
.member-label { order: -1; font-weight: 650; }
.member-label:empty { display: none; }
/* On wide screens the account is a capsule level with the language capsule. A signed-in name gets a fixed
   width, so the header does not move while the name loads or from one name to the next. */
@media (min-width: 651px) {
  .member-menu .member-link {
    box-sizing: border-box; min-height: 40px; padding: 3px 3px 3px 14px;
    border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 999px;
  }
  .member-menu .member-link:hover,.member-menu[open] .member-link { background: color-mix(in srgb, currentColor 12%, transparent); }
  .member-link .member-avatar { width: 32px; height: 32px; }
  .member-label { min-width: 9em; text-align: center; }
  .member-menu:is([data-member="yes"],[data-member="pending-member"]) .member-label {
    display: block; width: 9em; overflow: hidden; text-overflow: ellipsis;
  }
}
@media (max-width: 650px) {
  .member-link:is(:hover,:focus-visible) .member-avatar,.member-menu[open] .member-link .member-avatar {
    box-shadow: 0 0 0 2px var(--header-bg,var(--paper,Canvas)), 0 0 0 3.5px #9d92bf;
  }
}
.member-panel {
  position: absolute; z-index: 12; inset: calc(100% + 8px) 0 auto auto;
  width: min(284px, calc(100vw - 24px)); max-height: calc(100dvh - 94px); overflow-y: auto;
  background: #fffefa; color: #1e302b; color-scheme: light;
  border: 1px solid #24392e26; border-radius: 14px;
  box-shadow: 0 16px 44px #18282226, 0 3px 8px #1828220c;
}
.member-identity {
  display: flex; align-items: center; gap: 13px; margin-inline: 14px; padding: 17px 3px;
  border-bottom: 1px solid #e4e8e1;
}
.member-identity > div { min-width: 0; }
.member-identity .member-avatar { width: 48px; height: 48px; }
.member-identity .member-avatar svg { width: 24px; height: 24px; }
.member-identity strong { display: block; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; }
.member-identity p { margin: 3px 0 0; color: #59675f; font: 450 13px/1.55 system-ui, sans-serif; }
.member-actions { display: grid; gap: 4px; padding: 8px; }
.member-actions .member-action {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px;
  margin: 0; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: inherit;
  text-align: start; text-decoration: none; box-shadow: none; font: inherit; cursor: pointer;
}
.member-actions a > svg:last-child { margin-inline-start: auto; width: 15px; height: 15px; }
.member-action > svg:first-child { color: #536859; }
.member-actions .member-action:is(:hover,:focus-visible) { color: #173e33; background: #edf1ea; text-decoration: none; transform: none; }
.member-actions form { margin: 2px 0 0; padding-top: 5px; border-top: 1px solid #dde3d8; }
.member-actions .member-logout { color: #526056; }
.member-menu :is(summary,a,button):focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
@media (prefers-reduced-motion: no-preference) {
  .member-menu[open] .member-panel { animation: member-open .14s ease-out; }
  @keyframes member-open { from { opacity: .4; transform: translateY(-4px); } }
}
@media (max-width: 650px) {
  .member-link .member-label { display: none; }
}
.closed-result,.event-replay { padding:clamp(16px,3vw,32px); }
.closed-result button { display:inline-flex; margin:6px 10px 6px 0; }
.history-notice { font-size:13px; line-height:1.6; color:inherit; }
.history-notice a,.closed-result a { color:inherit; font-weight:700; }
.event-replay .event-text { overflow-wrap:anywhere; white-space:pre-wrap; }
.event-replay input { display:block; width:100%; }
.event-replay button { margin:5px 6px 0 0; }

pico-analytics-choice:empty { display: none; }
pico-analytics-choice:not(:empty) {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  margin-block: 12px; font: 400 13px/1.6 system-ui, sans-serif;
}
pico-analytics-choice p { flex: 1 1 340px; margin: 0; color: inherit; font: inherit; }
pico-analytics-choice a { color: inherit; text-decoration: underline; }
pico-analytics-choice div { display: flex; gap: 8px; }
pico-analytics-choice button {
  width: auto; min-height: 34px; margin: 0; padding: 4px 12px; border: 1px solid currentColor;
  border-radius: 7px; color: inherit; background: transparent; box-shadow: none; font: inherit; cursor: pointer;
}
pico-analytics-choice button:is(:hover,:focus-visible) {
  background: color-mix(in srgb, currentColor 10%, transparent); transform: none;
}
pico-analytics-choice[data-notice]:not(:empty) {
  position: fixed; z-index: 15; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  width: fit-content; max-width: min(52rem, calc(100% - 24px)); margin: 0 auto; padding: 13px 16px;
  box-sizing: border-box; gap: 10px 20px; border: 1px solid #cad1c8; border-radius: 12px;
  background: #fffef9; color: #1c3129; color-scheme: light; box-shadow: 0 4px 24px #13251f30;
}
pico-analytics-choice[data-notice] p { flex: 1 1 20rem; }
pico-analytics-choice[data-notice] p > strong { display: block; font-size: 18px; line-height: 1.4; margin-bottom: 4px; }
pico-analytics-choice[data-notice] button { min-height: 40px; font-weight: 650; }
pico-analytics-choice[data-notice] button:first-child { color: white; background: #214d3b; border-color: #214d3b; }
@media (min-width: 1001px) {
  pico-analytics-choice[data-notice]:not(:empty) {
    inset: auto 0 0; width: 100%; max-width: none; min-height: 136px; border: 0; border-top: 1px solid #bdc8c0;
    border-radius: 0; padding: 24px max(32px, calc((100% - 72rem) / 2)); gap: 16px 36px; font-size: 15px;
  }
  pico-analytics-choice[data-notice] p > strong { font-size: 21px; margin-bottom: 6px; }
  pico-analytics-choice[data-notice] button { min-height: 46px; padding-inline: 20px; }
}
@media (max-width: 1000px) {
  pico-analytics-choice[data-notice]:not(:empty) { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
