/* Hallmark · component: games and playground family · scope: app · genre: playful · theme: Playcity brand · redesign: polish · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V3 · weakest: V, shared navigation deliberately repeats across tools; each working surface keeps its own identity. */
/* Hallmark · answered F19 · Four weights preserve the existing Playcity roles: body, navigation, emphasis and headings. */

:root {
  --family-width: 960px;
  --family-gutter: 20px;
  --family-space-xs: 4px;
  --family-space-sm: 8px;
  --family-space-md: 12px;
  --family-space-lg: 16px;
  --family-space-xl: 24px;
  --family-section-space: 32px;
  --family-control-size: 44px;
  --family-header-size: 56px;
  --family-account-size: 68px;
  --family-account-max-size: 120px;
  --family-language-size: 104px;
  --family-menu-width: 208px;
  --family-menu-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 12%, transparent);
  --family-title-size: 30px;
  --family-title-leading: 1.25;
  --family-body-size: 16px;
  --family-copy-size: 14px;
  --family-label-size: 13px;
  --family-radius: 0;
  --family-motion: 150ms ease;
}

html,
body { overflow-x: clip; }

body { --family-focus: 2px solid var(--accent); }

.skip-link:not(:focus) {
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.t-wrap { max-width: var(--family-width); padding-inline: var(--family-gutter); }

/* One home destination and the same two service destinations on every screen. */
.t-head[data-family-header] { display: block; }
.t-head[data-family-header] .t-wrap {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--family-space-xl);
  height: auto;
  min-height: var(--family-header-size);
}
.t-head[data-family-header] .t-product { min-width: 0; }
.t-head[data-family-header] .t-playcity-link { min-width: var(--family-control-size); min-height: var(--family-control-size); }
.t-head[data-family-header] .t-playcity-mark { width: 68px; }
.t-head[data-family-header] svg.t-playcity-mark {
  height: auto;
  background: none;
  -webkit-mask: none;
  mask: none;
}
.games-hero .games-hero-heading { flex-wrap: wrap; align-items: center; column-gap: var(--family-space-lg); row-gap: var(--family-space-xs); }
.games-home-wordmark { display: block; width: 240px; max-width: 100%; height: auto; }
.games-home-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: clip;
  clip-path: inset(50%);
  white-space: nowrap;
}
.t-head[data-family-header] .t-head-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: var(--family-space-lg);
  min-width: 0;
}
.t-head[data-family-header] .t-head-nav > a {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  min-height: var(--family-control-size);
  margin: 0;
  border: 0;
  padding: 0 var(--family-space-xs);
  font-family: var(--font-sans);
  font-size: var(--family-label-size);
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
}
.t-head[data-family-header] .t-brand b { font: inherit; }
.t-head[data-family-header] .t-head-nav > a[aria-current] { font-weight: 700; }
.t-head[data-family-header] .t-head-nav > a:active { transform: translateY(1px); }
.t-head[data-family-header] .t-head-nav > a[aria-current]::after {
  position: absolute;
  inset: auto var(--family-space-xs) 0;
  height: 2px;
  background: var(--accent);
  content: "";
}
.t-head[data-family-header] .t-head-actions {
  gap: var(--family-space-sm);
  min-width: 0;
  margin: 0;
}
.t-family-switch { display: none; }
.t-family-service-slot { width: var(--family-control-size); height: var(--family-control-size); flex: none; }
.pc-service-menu-button + .t-family-service-slot { display: none; }
/* Match the compact account material in assets/css/site-header.css.
   Auth owns rendering, login redirects and the account popover; the family
   shell supplies its paper palette and retains 44px touch targets. */
.t-head[data-family-header] .t-head-auth {
  --pc-auth-surface: var(--surface);
  --pc-auth-surface-strong: var(--surface);
  --pc-auth-border: var(--line);
  --pc-auth-hover: var(--grid);
  --pc-auth-muted: var(--ink-2);
  --pc-auth-text: var(--ink);
  --pc-auth-shadow: var(--family-menu-shadow);
  --pc-auth-font-family: var(--font-sans);
  --pc-auth-control-height: var(--family-control-size);
  --pc-auth-control-font-size: var(--family-copy-size);
  --pc-auth-control-font-weight: 500;
  --pc-auth-control-line-height: 1;
  --pc-auth-login-padding: 0 var(--family-space-md);
  --pc-auth-compact-control-size: var(--family-control-size);
  --pc-auth-compact-icon-control-size: var(--family-control-size);
  --pc-auth-compact-avatar-size: 22px;
  min-width: var(--family-account-size);
  flex: none;
}
.t-head[data-family-header] .t-head-auth:not(.pc-auth-loading):not(.pc-auth-ready) {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.t-head[data-family-header] .pc-service-menu-button {
  width: var(--family-control-size);
  height: var(--family-control-size);
}
.t-head[data-family-header] .pc-auth-login {
  display: block;
  min-width: var(--family-account-size);
  max-width: var(--family-account-max-size);
  line-height: calc(var(--family-control-size) - 2px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: none;
}
.t-head[data-family-header] :is(.t-family-account, .pc-auth-chip) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--family-control-size);
  height: var(--family-control-size);
  border: 1px solid transparent;
  border-radius: var(--radius-full, 999px);
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  transition: background-color var(--family-motion);
}
.t-head[data-family-header] :is(.t-family-account, .pc-auth-chip):hover {
  background: var(--grid);
}
.t-head[data-family-header] .pc-auth-chip[aria-expanded="true"] {
  background: var(--grid);
  box-shadow: inset 0 -2px 0 currentColor;
}
.t-head[data-family-header] .pc-auth-skeleton {
  width: var(--family-account-size);
  height: var(--family-control-size);
  background: var(--grid);
  animation: none;
}
/* The same SVG hydration as the common header: icon names never become
   visible text while the Material font is unavailable. */
.t-head[data-family-header] .t-head-auth .material-symbols-outlined {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  overflow: hidden;
  pointer-events: none;
}
.t-head[data-family-header] .t-head-auth .material-symbols-outlined[data-symbol-ready="1"] {
  visibility: visible;
  background-color: currentColor;
  -webkit-mask-image: var(--app-icon-url);
  mask-image: var(--app-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  text-indent: -9999px;
  white-space: nowrap;
}
.t-head[data-family-header] .pc-auth-item-danger { color: var(--miss); }
.t-head[data-family-header] .game-language select {
  width: var(--family-language-size);
  max-width: var(--family-language-size);
  min-height: var(--family-control-size);
  border-color: var(--ink-2);
  border-radius: var(--family-radius);
  font-family: var(--font-sans);
}
.t-head[data-family-header] :is(a, button, select, summary):focus-visible {
  outline: var(--family-focus);
  outline-offset: 2px;
}

/* Titles lead directly into the tool; rules separate real content. */
body .t-hero {
  padding-block: var(--family-space-xl);
  border-bottom: 0;
  background-image: none;
}
body .t-hero--compact { padding-block: var(--family-space-lg); }
.t-hero h1,
:is(.game-heading, .taller-heading, .typing-heading, .mt-heading) h1 {
  min-width: 0;
  font-size: var(--family-title-size);
  line-height: var(--family-title-leading);
  overflow-wrap: break-word;
  text-wrap: balance;
}
.t-hero .t-lede { margin-top: var(--family-space-sm); font-size: var(--family-copy-size); }
.t-sec { margin-top: var(--family-section-space); }
.t-sec-h { justify-content: flex-start; font-size: var(--family-body-size); letter-spacing: 0; }
.t-sec-h::before,
.t-sec-h::after { display: none; }
.t-register { margin-top: var(--family-space-md); border-radius: var(--family-radius); }
.t-row { gap: var(--family-space-lg); padding: var(--family-space-lg); }
.t-row-body b { font-size: var(--family-body-size); overflow-wrap: break-word; }
.t-row-body p { font-size: var(--family-copy-size); }
:is(.t-row-tag, .apt-field label, .calc-row > label, .calc-out-head, .lb-title, .lb-head, .t-table th) {
  font-family: var(--font-sans);
  font-size: var(--family-label-size);
  letter-spacing: 0;
  text-transform: none;
}
.t-row-tag { border: 0; padding: 0; color: var(--ink-2); }
.lab-announcement-label { font-size: 12px; }
.t-new { font-family: var(--font-sans); font-size: 12px; letter-spacing: 0; }
.t-topic {
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--family-label-size);
  letter-spacing: 0;
}
.gc-filter { border-color: var(--ink-2); }

.t-btn,
.chip,
.apt-opt {
  min-height: var(--family-control-size);
  border-radius: var(--family-radius);
  touch-action: manipulation;
}
.t-btn { transition: background-color var(--family-motion), border-color var(--family-motion); }
.t-btn:focus-visible,
.chip:focus-visible,
.apt-opt:focus-visible { outline: var(--family-focus); outline-offset: 2px; }
.t-btn:disabled,
.t-btn[aria-disabled="true"] { cursor: not-allowed; }
.t-btn[aria-busy="true"] { cursor: progress; }
:is(.apt-field input, .calc-row input, .calc-row select, .lb-nick input) {
  min-width: 0;
  min-height: var(--family-control-size);
  border-radius: var(--family-radius);
}
:is(.apt-field input, .calc-row input, .calc-row select, .lb-nick input):focus-visible {
  outline: var(--family-focus);
  outline-offset: 2px;
}
.t-doc,
.t-faq { overflow-wrap: anywhere; }
.pg-games-link { margin-top: var(--family-space-sm); }

/* The map workspace keeps its own material and height calculations. */
.joseon-page { --j-header-size: var(--family-header-size); }
.joseon-page .j-workspace { height: calc(var(--j-mobile-viewport, 100dvh) - var(--j-header-size)); }
.j-head.t-head[data-family-header] { display: block; height: auto; padding: 0; }
.j-head.t-head[data-family-header] .t-wrap { max-width: none; }

@media (max-width: 720px) {
  :root {
    --family-gutter: 16px;
    --family-language-size: 68px;
    --family-account-max-size: var(--family-account-size);
    --family-title-size: 24px;
    --family-section-space: 24px;
  }
  .t-head[data-family-header] .t-wrap {
    grid-template-columns: auto minmax(44px, 1fr) auto;
    gap: var(--family-space-xs);
    padding-inline: var(--family-space-md);
  }
  .t-head[data-family-header] .t-playcity-mark { width: 52px; }
  .games-home-wordmark { width: 208px; }
  .t-head[data-family-header] .t-head-actions,
  .t-head[data-family-header] .pc-auth-actions { gap: var(--family-space-xs); }
  .t-head[data-family-header] .t-head-nav { display: none; }
  .t-family-switch { display: block; min-width: 0; justify-self: start; max-width: 100%; }
  .t-family-switch summary {
    display: flex;
    align-items: center;
    gap: var(--family-space-xs);
    min-height: var(--family-control-size);
    min-width: var(--family-control-size);
    font-size: var(--family-label-size);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    color: var(--ink);
  }
  .t-family-switch summary::-webkit-details-marker { display: none; }
  .t-family-switch summary:focus-visible { box-shadow: inset 0 -2px 0 var(--accent); }
  .t-family-switch summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t-family-switch summary > svg { flex: none; }
  .t-family-switch[open] summary > svg { transform: rotate(180deg); }
  .t-family-switch > nav {
    position: absolute;
    inset: 100% auto auto var(--family-space-md);
    display: grid;
    width: var(--family-menu-width);
    padding: var(--family-space-xs);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: var(--family-menu-shadow);
  }
  .t-family-switch > nav > a {
    margin: 0;
    border: 0;
    padding: var(--family-space-sm) var(--family-space-md);
    min-height: var(--family-control-size);
    font-size: var(--family-label-size);
    font-weight: 500;
    text-decoration: none;
  }
  .t-family-switch > nav > a[aria-current] { font-weight: 700; background: var(--accent-soft); }
  .t-family-switch > nav > a::after { display: none; }
  .t-head[data-family-header] .t-head-actions {
    grid-column: 3;
  }
  .games-page .games-command-primary { flex-wrap: wrap; gap: var(--family-space-xs); }
  .games-page .games-command-primary strong { min-width: 0; flex: 1 1 100%; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --family-motion: 0s; }
}
