:root {
  color-scheme: light;
  --mp-color-bg: #F7F7FB;
  --mp-color-surface: #FFFFFF;
  --mp-color-surface-subtle: #F0F0F7;
  --mp-color-text: #202033;
  --mp-color-text-muted: #6F7085;
  --mp-color-text-inverse: #FFFFFF;
  --mp-color-border: #DADAE6;
  --mp-color-border-strong: #BFC0CF;
  --mp-brand-050: #F5F3FF;
  --mp-brand-100: #EAE8FF;
  --mp-brand-200: #D6D1FF;
  --mp-brand-500: #6257E8;
  --mp-brand-600: #5E52D9;
  --mp-brand-700: #4B41BE;
  --mp-brand-800: #393195;
  --mp-accent-warm: #FF7A66;
  --mp-accent-warm-soft: #FFE8E3;
  --mp-success-text: #1F6E53;
  --mp-success-bg: #E7F6EF;
  --mp-success-border: #B9E4D1;
  --mp-warning-text: #8A5A0A;
  --mp-warning-bg: #FFF3D6;
  --mp-warning-border: #EBCF8F;
  --mp-error-text: #B83848;
  --mp-error-bg: #FDECEF;
  --mp-error-border: #F2BAC2;
  --mp-info-text: #285FAE;
  --mp-info-bg: #EAF2FF;
  --mp-info-border: #BCD5F6;
  --mp-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --mp-font-sm: 14px;
  --mp-font-md: 16px;
  --mp-font-lg: 18px;
  --mp-font-xl: 20px;
  --mp-font-2xl: 24px;
  --mp-font-3xl: 32px;
  --mp-font-4xl: 40px;
  --mp-space-1: 4px;
  --mp-space-2: 8px;
  --mp-space-3: 12px;
  --mp-space-4: 16px;
  --mp-space-5: 20px;
  --mp-space-6: 24px;
  --mp-space-8: 32px;
  --mp-space-10: 40px;
  --mp-space-12: 48px;
  --mp-radius-sm: 8px;
  --mp-radius-md: 12px;
  --mp-radius-lg: 16px;
  --mp-radius-xl: 20px;
  --mp-radius-2xl: 28px;
  --mp-shadow-low: 0 1px 2px rgba(32, 32, 51, .06);
  --mp-shadow-medium: 0 6px 20px rgba(32, 32, 51, .08);
  --mp-shadow-modal: 0 16px 48px rgba(32, 32, 51, .16);
  --mp-motion-fast: 120ms;
  --mp-motion-normal: 180ms;
  --mp-motion-slow: 260ms;
  --mp-content-max: 480px;

  /* Compatibility aliases while M1 markup is being upgraded. */
  --mp-bg: var(--mp-color-bg);
  --mp-surface: var(--mp-color-surface);
  --mp-text: var(--mp-color-text);
  --mp-muted: var(--mp-color-text-muted);
  --mp-accent: var(--mp-brand-600);
  --mp-border: var(--mp-color-border);

  font-family: var(--mp-font-family);
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--mp-color-bg); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--mp-color-bg);
  color: var(--mp-color-text);
  font-family: var(--mp-font-family);
  font-size: var(--mp-font-md);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, input, select { min-height: 44px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--mp-brand-700); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(94, 82, 217, .30);
  outline-offset: 2px;
}

.mp-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.mp-shell,
.mp-container {
  width: min(calc(100% - 40px), var(--mp-content-max));
  margin-inline: auto;
}

.mp-shell {
  flex: 1;
  padding-block: var(--mp-space-5) var(--mp-space-8);
}

.mp-container {
  margin-block: var(--mp-space-8);
}

.mp-screen {
  display: grid;
  gap: var(--mp-space-6);
}

.mp-stack {
  display: grid;
  gap: var(--mp-space-4);
}

.mp-section {
  display: grid;
  gap: var(--mp-space-3);
}

.mp-header {
  width: 100%;
  min-height: 56px;
  border-bottom: 1px solid rgba(218, 218, 230, .72);
  background: rgba(247, 247, 251, .96);
}

.mp-header__inner {
  width: min(calc(100% - 40px), var(--mp-content-max));
  min-height: 56px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-3);
}

.mp-header__brand,
.mp-brand {
  color: var(--mp-color-text);
  font-size: var(--mp-font-md);
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

.mp-header__meta {
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
  font-weight: 600;
}

.mp-page-title {
  margin: 0;
  font-size: var(--mp-font-2xl);
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mp-page-lead {
  margin: 0;
  color: var(--mp-color-text-muted);
  line-height: 1.6;
}

.mp-eyebrow {
  margin: 0 0 var(--mp-space-2);
  color: var(--mp-brand-700);
  font-size: var(--mp-font-sm);
  font-weight: 700;
  letter-spacing: .12em;
}

.mp-muted { color: var(--mp-color-text-muted); }

.mp-brand-hero {
  padding-top: var(--mp-space-8);
  text-align: center;
}

.mp-brand-hero__wordmark {
  margin: 0;
  font-size: clamp(28px, 8vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .075em;
}

.mp-brand-hero__copy {
  margin: var(--mp-space-4) 0 0;
  color: var(--mp-color-text);
  font-size: var(--mp-font-lg);
  font-weight: 600;
}

.mp-rhythm-dots {
  height: 18px;
  margin-top: var(--mp-space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

}

.mp-rhythm-dots span {
  display: block;
  border-radius: 999px;
  background: var(--mp-brand-600);
}

.mp-rhythm-dots span:nth-child(1) { width: 7px; height: 7px; }
.mp-rhythm-dots span:nth-child(2) { width: 5px; height: 5px; background: var(--mp-brand-200); }
.mp-rhythm-dots span:nth-child(3) { width: 8px; height: 8px; background: var(--mp-accent-warm); }
.mp-rhythm-dots span:nth-child(4) { width: 4px; height: 4px; background: var(--mp-brand-500); }


.mp-service-home {
  align-content: start;
}

.mp-service-home__lead {
  margin-top: var(--mp-space-3);
}

.mp-game-catalog {
  display: grid;
  gap: var(--mp-space-4);
}

.mp-game-catalog__future {
  text-align: center;
  font-size: var(--mp-font-sm);
}

.mp-game-card {
  padding: var(--mp-space-5);
  border: 1px solid var(--mp-brand-200);
  border-radius: var(--mp-radius-xl);
  display: grid;
  gap: var(--mp-space-4);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 122, 102, .10), transparent 26%),
    linear-gradient(145deg, #FFFFFF 0%, var(--mp-brand-050) 100%);
  box-shadow: var(--mp-shadow-low);
}

.mp-game-card__mark {
  height: 42px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.mp-game-card__mark span {
  width: 8px;
  border-radius: 999px;
  background: var(--mp-brand-600);
}

.mp-game-card__mark span:nth-child(1) { height: 18px; }
.mp-game-card__mark span:nth-child(2) { height: 34px; background: var(--mp-accent-warm); }
.mp-game-card__mark span:nth-child(3) { height: 25px; background: var(--mp-brand-200); }

.mp-game-card__body {
  display: grid;
  gap: var(--mp-space-2);
}

.mp-game-card__body .mp-eyebrow {
  margin: 0;
}

.mp-game-card__title {
  margin: 0;
  font-size: var(--mp-font-2xl);
  line-height: 1.3;
}

.mp-game-card__description,
.mp-game-card__meta,
.mp-wolf-summary p {
  margin: 0;
}

.mp-game-card__description {
  color: var(--mp-color-text-muted);
}

.mp-game-card__meta {
  color: var(--mp-brand-700);
  font-size: var(--mp-font-sm);
  font-weight: 700;
}

.mp-game-intro--wolf {
  padding-top: var(--mp-space-8);
}

.mp-wolf-summary {
  color: var(--mp-color-text-muted);
}

.mp-game-intro {
  padding: var(--mp-space-6) 0 var(--mp-space-2);
  text-align: center;
}

.mp-game-intro__name {
  margin: 0;
  font-size: var(--mp-font-3xl);
  line-height: 1.25;
  font-weight: 700;
}

.mp-game-intro__description {
  margin: var(--mp-space-2) 0 0;
  color: var(--mp-color-text-muted);
}

.mp-button {
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--mp-radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mp-space-2);
  color: var(--mp-color-text);
  background: transparent;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--mp-motion-fast) cubic-bezier(.2,.8,.2,1),
    border-color var(--mp-motion-fast) cubic-bezier(.2,.8,.2,1),
    transform var(--mp-motion-fast) cubic-bezier(.2,.8,.2,1);
}

.mp-button--primary,
.mp-primary {
  width: 100%;
  min-height: 56px;
  border-color: var(--mp-brand-600);
  background: var(--mp-brand-600);
  color: var(--mp-color-text-inverse);
}

.mp-button--secondary,
.mp-secondary {
  width: 100%;
  border-color: var(--mp-color-border);
  background: var(--mp-color-surface);
  color: var(--mp-color-text);
}

.mp-button--text {
  width: auto;
  min-height: 44px;
  padding-inline: var(--mp-space-2);
  color: var(--mp-brand-700);
}

.mp-button--compact { min-height: 44px; padding: 8px 12px; border-radius: var(--mp-radius-md); }

.mp-button--primary:disabled,
.mp-primary:disabled {
  border-color: #E9E9F0;
  background: #E9E9F0;
  color: #8D8E9D;
}

.mp-button--secondary:disabled,
.mp-secondary:disabled,
.mp-button--text:disabled {
  opacity: .55;
}

@media (hover: hover) and (pointer: fine) {
  .mp-button--primary:not(:disabled):hover,
  .mp-primary:not(:disabled):hover {
    border-color: var(--mp-brand-700);
    background: var(--mp-brand-700);
  }
  .mp-button--secondary:not(:disabled):hover,
  .mp-secondary:not(:disabled):hover {
    border-color: var(--mp-brand-200);
    background: var(--mp-brand-050);
  }
}

.mp-button:active:not(:disabled) { transform: translateY(1px); }

.mp-action-dock {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-inline: calc(var(--mp-space-5) * -1);
  padding:
    var(--mp-space-4)
    var(--mp-space-5)
    max(var(--mp-space-4), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(218, 218, 230, .82);
  background: rgba(247, 247, 251, .97);
}

.mp-action-dock__note {
  margin: 0 0 var(--mp-space-2);
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
  text-align: center;
}

.mp-form {
  display: grid;
  gap: var(--mp-space-5);
  margin: 0;
}

.mp-field,
.mp-form label {
  display: grid;
  gap: var(--mp-space-2);
  font-weight: 600;
}

.mp-field__label { font-weight: 600; }

.mp-field__input,
.mp-field__select,
.mp-form input,
.mp-form select {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-md);
  background: var(--mp-color-surface);
  color: var(--mp-color-text);
  font-size: var(--mp-font-md);
  font-weight: 400;
}

.mp-field__input:focus,
.mp-field__select:focus,
.mp-form input:focus,
.mp-form select:focus {
  border-color: var(--mp-brand-600);
}

.mp-field__hint,
.mp-form small {
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
  font-weight: 400;
}

.mp-field__error {
  margin: 0;
  color: var(--mp-error-text);
  font-size: var(--mp-font-sm);
  font-weight: 500;
}

.mp-choice-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.mp-choice-group legend {
  margin-bottom: var(--mp-space-2);
  font-weight: 600;
}

.mp-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--mp-space-2);
}

.mp-choice {
  position: relative;
  display: block;
}

.mp-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mp-choice span {
  min-height: 50px;
  padding: 10px;
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mp-color-surface);
  color: var(--mp-color-text);
  font-weight: 600;
}

.mp-choice input:checked + span {
  border-color: var(--mp-brand-600);
  background: var(--mp-brand-100);
  color: var(--mp-brand-800);
  box-shadow: inset 0 0 0 1px var(--mp-brand-600);
}

.mp-choice input:checked + span::before {
  content: "✓";
  margin-right: var(--mp-space-1);
}

.mp-choice input:focus-visible + span {
  outline: 3px solid rgba(94, 82, 217, .30);
  outline-offset: 2px;
}

.mp-room-code-input {
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  border: 1px solid var(--mp-color-border-strong);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-color-surface);
  color: var(--mp-color-text);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .32em;
  text-align: center;
}

.mp-card,
.mp-panel {
  padding: var(--mp-space-5);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-xl);
  background: var(--mp-color-surface);
  box-shadow: var(--mp-shadow-low);
}

.mp-card--subtle {
  border-color: transparent;
  background: var(--mp-color-surface-subtle);
  box-shadow: none;
}

.mp-badge {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mp-brand-100);
  color: var(--mp-brand-800);
  font-size: var(--mp-font-sm);
  font-weight: 600;
  white-space: nowrap;
}

.mp-badge--neutral {
  background: var(--mp-color-surface-subtle);
  color: var(--mp-color-text-muted);
}

.mp-badge--warning {
  background: var(--mp-warning-bg);
  color: var(--mp-warning-text);
}

.mp-notice {
  margin: 0 0 var(--mp-space-4);
  padding: 12px 14px;
  border: 1px solid var(--mp-info-border);
  border-radius: var(--mp-radius-md);
  background: var(--mp-info-bg);
  color: var(--mp-info-text);
  overflow-wrap: anywhere;
}

.mp-notice > p {
  margin: 0;
}

.mp-notice > .mp-stack:not(:empty) {
  margin-top: var(--mp-space-3);
}

.mp-notice[data-kind="success"] {
  border-color: var(--mp-success-border);
  background: var(--mp-success-bg);
  color: var(--mp-success-text);
}

.mp-notice[data-kind="warning"] {
  border-color: var(--mp-warning-border);
  background: var(--mp-warning-bg);
  color: var(--mp-warning-text);
}

.mp-notice[data-kind="error"] {
  border-color: var(--mp-error-border);
  background: var(--mp-error-bg);
  color: var(--mp-error-text);
}

.mp-room-context {
  margin: 0;
  padding: var(--mp-space-4);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-brand-050);
  color: var(--mp-brand-800);
  text-align: center;
  font-size: var(--mp-font-lg);
  font-weight: 700;
}

.mp-room-code {
  padding: var(--mp-space-2) 0 var(--mp-space-4);
  text-align: center;
}

.mp-room-code__label {
  margin: 0 0 var(--mp-space-1);
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
  font-weight: 600;
}

.mp-room-code__value,
.mp-code {
  display: block;
  color: var(--mp-color-text);
  font-size: clamp(36px, 11vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .16em;
}

.mp-qr-area,
.mp-invite {
  display: grid;
  justify-items: center;
  gap: var(--mp-space-3);
  padding: var(--mp-space-5);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-xl);
  background: var(--mp-color-surface);
  text-align: center;
}

.mp-qr-area__code {
  padding: 16px;
  border-radius: var(--mp-radius-md);
  background: #FFFFFF;
}

.mp-qr-area canvas,
.mp-invite canvas {
  display: block;
  width: min(176px, 100%);
  max-width: 176px;
  height: auto;
  image-rendering: pixelated;
}

.mp-qr-area__caption {
  margin: 0;
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
}

.mp-invite-link {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mp-player-list,
.mp-players {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mp-color-border);
}

.mp-player-row,
.mp-players li {
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mp-color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-3);
  overflow-wrap: anywhere;
}

.mp-player-row__name {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-player-row__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--mp-space-1);
  flex-wrap: wrap;
}

.mp-player-row__status {
  color: var(--mp-warning-text);
  font-size: var(--mp-font-sm);
  font-weight: 600;
  white-space: nowrap;
}

.mp-player-list-wrap {
  max-height: 300px;
  overflow: auto;
  overscroll-behavior: contain;
}

.mp-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-3);
  flex-wrap: wrap;
}

.mp-settings-summary p { margin: 0; }

.mp-waiting-cue {
  padding: var(--mp-space-6) var(--mp-space-4);
  border-radius: var(--mp-radius-xl);
  background: var(--mp-brand-050);
  text-align: center;
}

.mp-waiting-cue__motif {
  margin: 0 0 var(--mp-space-2);
  color: var(--mp-brand-500);
  letter-spacing: .38em;
}

.mp-waiting-cue p { margin: 0; }

.mp-connection-status {
  margin-bottom: var(--mp-space-4);
}

.mp-extra {
  margin-top: var(--mp-space-6);
}

.mp-saved {
  padding: var(--mp-space-4) 0;
  border-top: 1px solid var(--mp-color-border);
  display: flex;
  gap: var(--mp-space-2);
  flex-wrap: wrap;
  align-items: center;
}

.mp-saved:first-child { border-top: 0; }
.mp-saved p { width: 100%; margin: 0; }

.mp-back-button {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-left: -8px;
  padding: 8px;
  border: 0;
  border-radius: var(--mp-radius-sm);
  background: transparent;
  color: var(--mp-brand-700);
  font-weight: 600;
}

.mp-howto {
  padding-top: var(--mp-space-1);
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
}

.mp-howto summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-brand-700);
  font-weight: 600;
  cursor: pointer;
}

.mp-howto p { margin: var(--mp-space-2) 0 0; }

.mp-support-section h2 {
  margin: 0 0 var(--mp-space-3);
  font-size: var(--mp-font-lg);
}

footer {
  width: min(calc(100% - 40px), var(--mp-content-max));
  margin: 0 auto;
  padding: 0 0 max(var(--mp-space-6), env(safe-area-inset-bottom));
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
}


/* Gameplay flow */
.mp-game-shell {
  padding-bottom: calc(var(--mp-space-12) + 76px);
}

.mp-game-content {
  display: grid;
  gap: var(--mp-space-6);
}

.mp-game-heading {
  display: grid;
  gap: var(--mp-space-2);
}

.mp-game-status {
  margin-top: var(--mp-space-5);
  text-align: center;
}

.mp-game-progress {
  margin: 0 0 var(--mp-space-6);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--mp-space-1);
}

.mp-game-progress__step {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--mp-color-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.mp-game-progress__step > span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--mp-color-border);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--mp-color-surface);
  line-height: 1;
}

.mp-game-progress__step[data-status="done"] {
  color: var(--mp-brand-700);
}

.mp-game-progress__step[data-status="done"] > span {
  border-color: var(--mp-brand-200);
  background: var(--mp-brand-100);
}

.mp-game-progress__step[data-status="current"] {
  color: var(--mp-color-text);
}

.mp-game-progress__step[data-status="current"] > span {
  border-color: var(--mp-brand-600);
  background: var(--mp-brand-600);
  color: var(--mp-color-text-inverse);
}

.mp-game-confirmed {
  display: grid;
  justify-items: center;
  gap: var(--mp-space-3);
  padding-block: var(--mp-space-8);
  text-align: center;
}

.mp-game-confirmed__mark {
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--mp-success-bg);
  color: var(--mp-success-text);
  font-size: var(--mp-font-2xl);
  font-weight: 700;
}

.mp-status-count {
  margin: 0;
  color: var(--mp-brand-700);
  font-size: var(--mp-font-lg);
  font-weight: 700;
  text-align: center;
}

.mw-common-card {
  margin: 0;
  padding: var(--mp-space-4);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-color-surface);
  display: grid;
  gap: var(--mp-space-2);
}

.mw-common-card__label,
.mw-common-card__question {
  margin: 0;
}

.mw-common-card__label {
  font-size: var(--mp-font-sm);
  font-weight: 700;
  letter-spacing: .04em;
}

.mw-common-card__question {
  font-size: clamp(20px, 5.6vw, 28px);
  line-height: 1.5;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mw-prompt-recheck {
  display: grid;
  gap: var(--mp-space-3);
}

.mw-prompt-recheck__button {
  min-height: 44px;
}

.mw-secret--open {
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.mw-secret {
  min-height: min(560px, calc(100dvh - 170px));
  padding: var(--mp-space-8) var(--mp-space-5);
  border-radius: var(--mp-radius-2xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--mp-space-5);
  background: #27253D;
  color: #FFFFFF;
  text-align: center;
  box-shadow: var(--mp-shadow-medium);
}

.mw-secret__icon {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #CBC8DD;
  font-size: var(--mp-font-xl);
}

.mw-secret__title,
.mw-secret__label,
.mw-secret__prompt,
.mw-secret__question,
.mw-secret__lead,
.mw-secret__helper,
.mw-secret__warning {
  margin: 0;
}

.mw-secret__title {
  font-size: var(--mp-font-2xl);
  line-height: 1.35;
}

.mw-secret__label {
  color: #CBC8DD;
  font-size: var(--mp-font-sm);
  font-weight: 700;
  letter-spacing: .08em;
}

.mw-secret__lead,
.mw-secret__helper,
.mw-secret__warning {
  color: #CBC8DD;
}

.mw-secret__prompt {
  max-width: 100%;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mw-secret__question {
  max-width: 100%;
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1.55;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mw-secret__helper {
  padding: 10px 14px;
  border-radius: var(--mp-radius-md);
  background: rgba(255,255,255,.08);
  font-size: var(--mp-font-sm);
}

.mw-secret__button {
  width: 100%;
  max-width: 360px;
}

.mw-secret .mp-button--primary {
  border-color: #FFFFFF;
  background: #FFFFFF;
  color: #27253D;
}

.mw-secret .mp-button--text {
  color: #FFFFFF;
}

.mp-answer-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--mp-space-2);
  list-style: none;
}

.mp-answer-row {
  min-width: 0;
  padding: var(--mp-space-4);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-lg);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--mp-space-3);
  background: var(--mp-color-surface);
}

.mp-answer-row__order {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--mp-brand-100);
  color: var(--mp-brand-800);
  font-size: var(--mp-font-sm);
  font-weight: 700;
}

.mp-answer-row__body {
  min-width: 0;
}

.mp-answer-row__name,
.mp-answer-row__answer {
  overflow-wrap: anywhere;
}

.mp-answer-row__answer {
  margin: 3px 0 0;
  color: var(--mp-color-text);
}

.mp-vote-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.mp-vote-legend {
  margin-bottom: var(--mp-space-3);
  font-weight: 700;
}

.mp-vote-list {
  display: grid;
  gap: var(--mp-space-2);
}

.mp-vote-choice {
  position: relative;
  display: block;
}

.mp-vote-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mp-vote-choice__visual {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-3);
  background: var(--mp-color-surface);
  font-weight: 600;
}

.mp-vote-choice__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mp-vote-choice__check {
  flex: 0 0 auto;
  color: transparent;
  font-size: var(--mp-font-sm);
  white-space: nowrap;
}

.mp-vote-choice input:checked + .mp-vote-choice__visual {
  border-color: var(--mp-brand-600);
  background: var(--mp-brand-100);
  box-shadow: inset 0 0 0 1px var(--mp-brand-600);
}

.mp-vote-choice input:checked + .mp-vote-choice__visual .mp-vote-choice__check {
  color: var(--mp-brand-800);
}

.mp-vote-choice input:checked + .mp-vote-choice__visual .mp-vote-choice__check::before {
  content: "✓ ";
}

.mp-vote-choice input:focus-visible + .mp-vote-choice__visual {
  outline: 3px solid rgba(94, 82, 217, .30);
  outline-offset: 2px;
}

.mp-result-details {
  border-top: 1px solid var(--mp-color-border);
}

.mp-result-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--mp-brand-700);
  font-weight: 600;
  cursor: pointer;
}

.mp-result-details > :not(summary) {
  margin-bottom: var(--mp-space-4);
}

.mw-countdown {
  min-height: min(560px, calc(100dvh - 170px));
  padding: var(--mp-space-8) var(--mp-space-5);
  border-radius: var(--mp-radius-2xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--mp-space-3);
  background: #24223A;
  color: #FFFFFF;
  text-align: center;
}

.mw-countdown__eyebrow,
.mw-countdown__title,
.mw-countdown__lead {
  margin: 0;
}

.mw-countdown__eyebrow {
  color: #CBC8DD;
  font-size: var(--mp-font-sm);
  font-weight: 700;
  letter-spacing: .12em;
}

.mw-countdown__title {
  font-size: var(--mp-font-2xl);
}

.mw-countdown__lead {
  color: #CBC8DD;
}

.mw-countdown__number {
  min-height: 112px;
  display: grid;
  place-items: center;
  font-size: clamp(76px, 26vw, 112px);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mw-countdown__number--pulse {
  animation: mp-countdown-pop 520ms cubic-bezier(.2,.8,.2,1);
}

@keyframes mp-countdown-pop {
  from { opacity: .25; transform: scale(.82); }
  to { opacity: 1; transform: scale(1); }
}

body.mp-countdown-stage,
body.mp-countdown-stage .mp-app {
  background: #1E1C31;
  color: #FFFFFF;
}

body.mp-countdown-stage .mp-header {
  border-bottom-color: rgba(255,255,255,.12);
  background: rgba(30,28,49,.96);
}

body.mp-countdown-stage .mp-header__brand,
body.mp-countdown-stage .mp-header__meta,
body.mp-countdown-stage .mp-game-progress__step[data-status="current"] {
  color: #FFFFFF;
}

body.mp-countdown-stage .mp-game-progress__step {
  color: #AFAEC3;
}

body.mp-countdown-stage .mp-game-progress__step > span {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.06);
  color: #CBC8DD;
}

body.mp-countdown-stage .mp-game-progress__step[data-status="done"] > span,
body.mp-countdown-stage .mp-game-progress__step[data-status="current"] > span {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.14);
  color: #FFFFFF;
}

.mw-result-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--mp-color-text-muted);
  text-align: center;
}

.mw-result-hero {
  position: relative;
  overflow: hidden;
  padding: var(--mp-space-8) var(--mp-space-5);
  border: 1px solid var(--mp-brand-200);
  border-radius: var(--mp-radius-2xl);
  display: grid;
  justify-items: center;
  gap: var(--mp-space-2);
  background: linear-gradient(145deg, var(--mp-brand-050), #FFFFFF 62%, var(--mp-accent-warm-soft));
  color: var(--mp-color-text);
  text-align: center;
  box-shadow: var(--mp-shadow-medium);
  animation: mp-result-enter 320ms cubic-bezier(.2,.8,.2,1);
}

.mw-result-hero[data-outcome="wolf"] {
  border-color: #F2C3BA;
}

.mw-result-hero__motif {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--mp-space-1);
}

.mw-result-hero__motif span {
  width: 9px;
  height: 9px;
  border: 2px solid var(--mp-brand-500);
  border-radius: 999px;
}

.mw-result-hero__motif span:nth-child(2) {
  width: 18px;
  height: 18px;
}

.mw-result-hero__winner,
.mw-result-hero__copy,
.mw-result-hero__wolf-label,
.mw-result-hero__name,
.mw-result-hero__outcome {
  margin: 0;
}

.mw-result-hero__winner {
  color: var(--mp-brand-700);
  font-size: clamp(28px, 9vw, 42px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: .04em;
}

.mw-result-hero[data-outcome="wolf"] .mw-result-hero__winner {
  color: #A84335;
}

.mw-result-hero__copy {
  font-size: var(--mp-font-lg);
  font-weight: 700;
}

.mw-result-hero__wolf-label {
  margin-top: var(--mp-space-3);
  color: var(--mp-color-text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.mw-result-hero__name {
  max-width: 100%;
  font-size: clamp(30px, 9vw, 44px);
  line-height: 1.22;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mw-result-hero__outcome {
  max-width: 34ch;
  color: var(--mp-color-text-muted);
  font-weight: 600;
}

@keyframes mp-result-enter {
  from { opacity: 0; transform: scale(.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mw-personal-result {
  padding: var(--mp-space-4);
  border: 1px solid var(--mp-brand-200);
  border-radius: var(--mp-radius-xl);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: var(--mp-space-2);
  background: var(--mp-brand-050);
}

.mw-personal-result__label {
  margin: 0;
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
  font-weight: 700;
}

.mw-personal-result__points,
.mw-personal-result__rank {
  font-size: var(--mp-font-lg);
  white-space: nowrap;
}

.mw-personal-result__points {
  color: var(--mp-brand-700);
}

.mw-personal-result__divider {
  color: var(--mp-color-text-muted);
}

.mp-result-section {
  display: grid;
  gap: var(--mp-space-4);
}

.mw-prompt-compare {
  display: grid;
  gap: var(--mp-space-3);
}

.mw-prompt-card {
  display: grid;
  gap: var(--mp-space-3);
}

.mw-prompt-card--wolf {
  border-color: var(--mp-brand-200);
}

.mw-prompt-card__text {
  margin: 0;
  font-size: var(--mp-font-lg);
  line-height: 1.55;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mw-vote-result-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--mp-space-2);
  list-style: none;
}

.mw-vote-result-row {
  min-height: 46px;
  padding: 9px 0;
  border-bottom: 1px solid var(--mp-color-border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--mp-space-2);
}

.mw-vote-result-row__voter,
.mw-vote-result-row__target {
  overflow-wrap: anywhere;
}

.mw-vote-result-row__arrow {
  color: var(--mp-color-text-muted);
}

.mw-score-list {
  display: grid;
  gap: var(--mp-space-2);
}

.mw-score-row {
  padding: var(--mp-space-4);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-color-surface);
}

.mw-score-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-3);
}

.mw-score-row__points {
  color: var(--mp-brand-700);
  font-size: var(--mp-font-xl);
}

.mw-score-row__reason {
  margin: var(--mp-space-1) 0 0;
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-sm);
}

.mw-ranking {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.mw-ranking__row {
  min-height: 60px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--mp-color-border);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--mp-space-3);
}

.mw-ranking__row--leader {
  background: var(--mp-brand-050);
}

.mw-ranking__row--self {
  box-shadow: inset 3px 0 0 var(--mp-brand-600);
}

.mw-ranking__rank {
  color: var(--mp-brand-700);
  font-weight: 800;
}

.mw-ranking__name-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--mp-space-2);
}

.mw-ranking__name {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}

.mw-ranking__you {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--mp-brand-100);
  color: var(--mp-brand-800);
  font-size: 11px;
  font-weight: 700;
}

.mw-ranking__score {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.mw-final-winner.mw-final-winner--celebration {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(36px, 9vw, 52px) var(--mp-space-5);
  border: 1px solid var(--mp-brand-200);
  border-radius: var(--mp-radius-2xl);
  display: grid;
  justify-items: center;
  gap: var(--mp-space-2);
  background:
    radial-gradient(circle at 50% 18%, rgba(111, 96, 229, .16), transparent 30%),
    radial-gradient(circle at 12% 12%, rgba(244, 174, 112, .17), transparent 24%),
    radial-gradient(circle at 88% 82%, rgba(172, 158, 255, .18), transparent 28%),
    linear-gradient(145deg, #FFFFFF 0%, #F4F1FF 58%, #FFF6EA 100%);
  text-align: center;
  box-shadow: 0 18px 46px rgba(58, 47, 119, .16);
  animation: mp-final-enter 380ms cubic-bezier(.2,.8,.2,1);
}

.mw-final-winner::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -138px;
  left: 50%;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(111, 96, 229, .16);
  border-radius: 999px;
  box-shadow:
    0 0 0 24px rgba(111, 96, 229, .055),
    0 0 0 52px rgba(111, 96, 229, .035);
  transform: translateX(-50%);
  pointer-events: none;
}

@keyframes mp-final-enter {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mw-final-winner__trophy {
  margin: var(--mp-space-1) 0;
  font-size: clamp(42px, 11vw, 54px);
  line-height: 1;
  filter: drop-shadow(0 5px 8px rgba(92, 70, 31, .14));
}

.mw-final-winner__label,
.mw-final-winner__name,
.mw-final-winner__meta {
  margin: 0;
}

.mw-final-winner__label {
  color: var(--mp-brand-700);
  font-size: var(--mp-font-sm);
  font-weight: 800;
  letter-spacing: .16em;
}

.mw-final-winner__name {
  max-width: 100%;
  font-size: clamp(40px, 12vw, 56px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.mw-final-winner__meta {
  color: var(--mp-color-text-muted);
  font-size: var(--mp-font-lg);
  font-weight: 800;
}

.mw-final-winner__list {
  width: 100%;
  margin-top: var(--mp-space-2);
  display: grid;
  gap: var(--mp-space-2);
}

.mw-final-winner__item {
  padding: 10px 12px;
  border-radius: var(--mp-radius-lg);
  display: flex;
  justify-content: space-between;
  gap: var(--mp-space-3);
  background: rgba(255,255,255,.72);
  text-align: left;
}

.mw-final-winner__item strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mw-final-winner__item span {
  flex: 0 0 auto;
  color: var(--mp-color-text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.mw-final-ranking-section {
  margin-top: var(--mp-space-5);
}

.mw-finished-actions {
  margin-top: var(--mp-space-6);
  padding: var(--mp-space-5);
  border: 1px solid var(--mp-color-border);
  border-radius: var(--mp-radius-xl);
  display: grid;
  gap: var(--mp-space-3);
  background: var(--mp-color-surface);
}

.mw-finished-actions__title {
  margin: 0;
  font-size: var(--mp-font-lg);
}

.mw-finished-actions__buttons {
  display: grid;
  gap: var(--mp-space-3);
}

.mw-finished-actions__buttons .mp-button {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 359px) {
  .mw-result-hero,
  .mw-final-winner,
  .mw-countdown {
    padding-inline: var(--mp-space-4);
  }

  .mw-final-winner {
    padding-block: var(--mp-space-7);
  }

  .mw-final-winner__trophy {
    font-size: 40px;
  }

  .mw-personal-result {
    grid-template-columns: 1fr auto;
  }

  .mw-personal-result__label {
    grid-column: 1 / -1;
  }

  .mw-personal-result__divider {
    display: none;
  }

  .mw-ranking__row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: var(--mp-space-2);
    padding-inline: 4px;
  }

  .mp-shell,
  .mp-container,
  .mp-header__inner,
  footer {
    width: min(calc(100% - 32px), var(--mp-content-max));
  }

  .mp-action-dock {
    margin-inline: calc(var(--mp-space-4) * -1);
    padding-inline: var(--mp-space-4);
  }

  .mp-choice-grid { gap: var(--mp-space-1); }
  .mp-choice span { padding-inline: 6px; }
  .mp-room-code-input { font-size: 27px; }
}

@media (min-width: 700px) {
  .mp-shell { padding-top: var(--mp-space-8); }
  .mp-card, .mp-panel { padding: var(--mp-space-6); }
}

@media (prefers-reduced-motion: reduce) {
  .mw-countdown__number--pulse,
  .mw-result-hero,
  .mw-final-winner {
    animation: none !important;
    transform: none !important;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
