/* Свой берег — original coastal material system, first coherent migration pass.
 * Load after feature styles. Presentation only: no layout, hit-box or scene changes.
 * Dimensional readability is a general game-UI principle, not copied branding/art.
 * Puzzle controls/materials are owned by puzzles.css. Never target its descendants.
 */
:root {
  --coast-cream: #fff4dc;
  --coast-cream-low: #e9d5ac;
  --coast-ink: #173c43;
  --coast-teal: #267b7b;
  --coast-teal-dark: #174e56;
  --coast-warm: #d8ae63;
  --coast-text: #f8f1df;
  --coast-muted: #bdcfca;
  --coast-edge: #a7c8be80;
  --coast-enamel: linear-gradient(160deg, #28545a 0%, #173d47 52%, #102e39 100%);
  --coast-card: linear-gradient(155deg, #254c52, #173740);
  --coast-paper: linear-gradient(165deg, #fff9e9 0%, #f4e7c9 55%, #e9d5ac 100%);
  --coast-button: linear-gradient(180deg, #2b7775 0%, #236d6c 48%, #1c6066 100%);
  --coast-raised: inset 0 1px 0 #fff8eab3, inset 0 -1px 0 #b8995c66, 0 3px 0 #766646, 0 5px 9px #041d2926;
  --coast-dark-raised: inset 0 1px 0 #d7ffed4d, inset 0 -1px 0 #082f3b80, 0 3px 0 #092b35, 0 5px 9px #041d2926;
  --coast-card-shadow: inset 0 1px 0 #e8fff01f, inset 0 -1px 0 #031e3066, 0 4px 12px #031d2526;
  --coast-focus: #ffdb88;
}

/* Shell only. Preserve all feature-specific dimensions and overflow rules. */
#modal:not(:has(#puzzle-panel)) {
  background: var(--coast-enamel);
  border-color: #c8d2b59c;
  color: var(--coast-text);
  box-shadow: inset 0 1px 0 #fff3d55c, inset 0 -2px 0 #061d3180, 0 8px 0 #09263180, 0 24px 70px #00121c80;
}
#modal:not(:has(#puzzle-panel))::backdrop { background: #031c2ab8; }
#modal:not(:has(#puzzle-panel)) > #close {
  color: var(--coast-cream);
  text-shadow: 0 2px 0 #082a35;
}

/* Hub: original positions, wrapping, typography, hero and 360 hit-targets stay intact. */
.map .pin, main .goal, main .city-scene-action {
  background: var(--coast-paper);
  border-color: #fff7dc;
  box-shadow: var(--coast-raised);
  color: var(--coast-ink);
}
.map .pin > i {
  color: #236c70;
  background: linear-gradient(150deg, #fffaf0, #d8e5d4);
  box-shadow: inset 0 1px 1px #ffffff, 0 2px 2px #6b81632b;
}
.map .pin span, main .goal h3 { color: var(--coast-ink); }
.map .pin small, main .goal p { color: #4d665f; }
main .game-modes {
  background: var(--coast-enamel);
  border-color: #c6d2b98f;
  box-shadow: inset 0 1px 0 #f9f4dc4d, 0 4px 0 #092b35, 0 10px 24px #051d3540;
}
main .game-modes button {
  background: linear-gradient(#47787566, #153e4626) !important;
  border-color: #c1dfc647;
  box-shadow: inset 0 1px 0 #e6fff126, 0 2px 0 #082c3659;
  color: #f2f0dc;
}
main .game-modes #locations {
  background: var(--coast-paper) !important;
  color: var(--coast-ink);
  border-color: #fff4d5;
  box-shadow: var(--coast-raised);
}
.balances :is(#money, #level, .quests-button, .icon), main .daily-btn {
  background: var(--coast-enamel);
  border-color: var(--coast-edge);
  box-shadow: var(--coast-dark-raised);
  color: var(--coast-text);
}
.balances #money { color: #ffe2a1; }
@media (min-width: 721px) {
  main .identity-button { background: var(--coast-enamel); border-color: var(--coast-edge); box-shadow: var(--coast-dark-raised); }
}

/* Selected existing dark cards: no recoloring of art, semantic error states or forms. */
#modalContent .shopitem,
#modalContent .quest-item,
#modalContent .city-card,
#modalContent .arena-intent,
#modalContent .arena-next-ticket,
#modalContent .arena-ticket,
#cloud-story-panel .cloud-chapter,
#cloud-story-panel .cloud-business,
#cloud-story-panel .cloud-professions article,
#cloud-story-panel .cloud-wardrobe article,
#cloud-story-panel .cloud-homes article,
#cloud-story-panel .cloud-accessory-grid article,
#cloud-story-panel .cloud-profile-card,
#cloud-story-panel .business-plan-menu,
#premium-wardrobe .premium-looks article,
#chat-panel .chat-compose,
#chat-panel .chat-settings,
#chat-panel .chat-profile,
#rating-panel .rating-personal,
#rating-panel .rating-history-card,
#spaces-panel .spaces-invite,
#spaces-panel .spaces-item,
#visits-panel .visits-consent,
#visits-panel .visits-confirm,
#visits-panel .visits-status,
#contacts-panel .contacts-person,
#contacts-panel .contacts-active,
#mastery-panel .mastery-path,
#wallet-panel .wallet-topup,
#wallet-panel .wallet-photo,
#vip-panel .vip-offer,
#team-panel .team-lobby {
  background: var(--coast-card);
  border-color: #b6d0b94f;
  box-shadow: var(--coast-card-shadow);
}

/* Light content retains explicit dark ink, including all user-authored messages. */
#chat-panel .chat-message, #rating-panel .rating-row, #rating-panel .rating-preview-person {
  background: var(--coast-paper);
  border-color: #fff3d7;
  box-shadow: inset 0 1px 0 #ffffffb3, 0 2px 0 #082b3640;
  color: var(--coast-ink);
}
#chat-panel .chat-message.own {
  background: linear-gradient(155deg, #e5f0d9, #c7dfcb);
  border-color: #eef8df;
}
#chat-panel .chat-message p.chat-message-text { color: #233e3e; }
#chat-panel .chat-log {
  background: linear-gradient(#092731, #12323d);
  border-color: #accbbb4f;
  box-shadow: inset 0 2px 5px #031e3559;
}
#rating-panel .rating-hero {
  background: linear-gradient(135deg, #286c70, #163d48);
  border-color: #d5d4ad80;
  box-shadow: var(--coast-card-shadow);
}
#rating-panel .rating-row.own { box-shadow: inset 4px 0 0 #267b7b, inset 0 1px 0 #fffdf2, 0 2px 0 #082b3640; }

/* Explicit action containers only — never generic button/header, scene anchors,
   inline chat author/report links, avatar canvases or puzzle cells. */
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
) {
  background: var(--coast-button);
  border-color: #91c4ad;
  color: var(--coast-text);
  box-shadow: var(--coast-dark-raised);
  text-shadow: 0 1px 1px #0b394c66;
  transition: transform 140ms cubic-bezier(.2,.8,.2,1), background-color 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):is(.primary, .chat-primary, .rating-primary) {
  background: var(--coast-paper);
  border-color: #fff3ce;
  color: var(--coast-ink);
  box-shadow: var(--coast-raised);
  text-shadow: 0 1px 0 #ffffff80;
}
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):is([aria-selected="true"], [aria-pressed="true"], .selected, .chosen) {
  border-color: #ffe5a5;
  box-shadow: inset 0 0 0 1px #ffe5a5, inset 0 1px 0 #ffffff66, 0 2px 0 #082c35;
}
@media (hover: hover) {
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #fff0bb;
  box-shadow: inset 0 1px 0 #ffffff80, 0 3px 0 #092b35, 0 5px 10px #031c3533;
}
}
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(.975);
  transition-duration: 90ms;
  box-shadow: inset 0 2px 4px #062f4059, 0 1px 0 #092b35;
}
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  text-shadow: none;
  box-shadow: inset 0 1px 0 #e6f2da26;
}
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
)[aria-busy="true"] {
  cursor: progress;
  border-color: var(--coast-warm);
  box-shadow: inset 0 -3px 0 var(--coast-warm);
}

/* Input/focus treatments are shell-scoped and do not change form geometry. */
#modal:not(:has(#puzzle-panel)) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select) {
  border-color: #b4cdb573;
  box-shadow: inset 0 2px 4px #021b2c40;
}
#modal:not(:has(#puzzle-panel)) :is(button, input, textarea, select, a, summary):focus-visible,
main :is(.pin, .daily-btn, .identity-button, .goal .primary):focus-visible,
main .game-modes button:focus-visible,
.balances button:focus-visible {
  outline: 3px solid var(--coast-focus);
  outline-offset: 3px;
}
/* Status stays textual; no endlessly animated shine, pulse or loading glow. */
#modalContent .arena-readiness[data-state="busy"] {
  color: #ffe3aa;
  background: #173b45;
  border-color: #d8ae6380;
}
#vip-panel .vip-ambient-lights { animation: none; }

/* Finite focus choreography, informed by reference footage's modal settling.
 * Durations/curves are original implementation choices, not measured replicas.
 * Replaces (does not stack with) style.css modalEnter. Never changes hit testing.
 * No fill-mode: scale/opacity return to ordinary computed styles after entry.
 */
@keyframes coast-dialog-settle {
  0% { opacity: 0; transform: translateY(10px) scale(.965); }
  72% { opacity: 1; transform: translateY(-1px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}
@keyframes coast-dialog-fade {
  from { opacity: .45; }
  to { opacity: 1; }
}
@keyframes coast-selection-confirm {
  0% { box-shadow: inset 0 0 0 2px #fff0bd, 0 2px 0 #082c35; }
  100% { box-shadow: inset 0 0 0 1px #ffe5a5, inset 0 1px 0 #ffffff66, 0 2px 0 #082c35; }
}
@media (prefers-reduced-motion: no-preference) {
  #modal[open]:not(:has(#puzzle-panel)) {
    animation: coast-dialog-settle 260ms cubic-bezier(.2,.7,.25,1) 1;
  }
  /* Active combat actors/canvases must not be rescaled by an ancestor. */
  #modal[open]:has(.arena-stage, #team-panel canvas):not(:has(#puzzle-panel)) {
    animation: coast-dialog-fade 180ms ease-out 1;
  }
  #modal[open]:not(:has(#puzzle-panel))::backdrop {
    animation: coast-dialog-fade 140ms ease-out 1;
  }
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):is([aria-selected="true"], [aria-pressed="true"], .selected, .chosen):not(:disabled):not([aria-disabled="true"]) {
    animation: coast-selection-confirm 180ms ease-out 1;
  }
  /* Hub controls use the same physical press, without moving their anchors. */
  main :is(.pin, .daily-btn, .identity-button), main .game-modes button,
  .balances button {
    transition: transform 140ms cubic-bezier(.2,.8,.2,1), box-shadow 120ms ease;
  }
  main :is(.pin, .daily-btn, .identity-button):active:not(:disabled),
  main .game-modes button:active:not(:disabled), .balances button:active:not(:disabled) {
    transform: scale(.975);
    transition-duration: 90ms;
    box-shadow: inset 0 2px 4px #062f4059, 0 1px 0 #092b35;
  }
}

@media (prefers-reduced-motion: reduce) {
  #modal:not(:has(#puzzle-panel)),
  #modal:not(:has(#puzzle-panel)) *,
  #modal:not(:has(#puzzle-panel)) *::before,
  #modal:not(:has(#puzzle-panel)) *::after,
  main :is(.pin, .daily-btn, .identity-button, .goal .primary),
  main .game-modes button,
  .balances button {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  main :is(.pin, .daily-btn, .identity-button, .goal .primary):active,
  main .game-modes button:active,
  .balances button:active { transform: none; }
}

/* Immediate physical-state reset, including reduced-motion presses. */
@media (prefers-reduced-motion: reduce) {
:is(
  main .goal .primary,
  #modalContent > .primary,
  #modalContent .shopitem button,
  #modalContent .quest-item .primary,
  #modalContent .city-card .primary,
  #modalContent .city-answers button,
  #modalContent .arena-actions button,
  #modalContent .arena-next-ticket .primary,
  #modalContent #arena-start,
  #modalContent .pvp-mode-options button,
  #modalContent .pvp-secondary,
  #cloud-story-panel .cloud-secondary,
  #cloud-story-panel .cloud-section-nav button,
  #cloud-story-panel .cloud-place-tabs button,
  #cloud-story-panel .cloud-item button,
  #cloud-story-panel .cloud-wardrobe button,
  #cloud-story-panel .cloud-homes button,
  #cloud-story-panel .cloud-accessory-grid button,
  #cloud-story-panel .cloud-event-choices button,
  #cloud-story-panel .cloud-fight-actions button,
  #cloud-story-panel .primary,
  #premium-wardrobe .premium-looks button,
  #chat-panel .chat-tabs button,
  #chat-panel .chat-toolbar button,
  #chat-panel .chat-compose-bottom button,
  #chat-panel .chat-profile-actions button,
  #chat-panel .chat-report-actions button,
  #chat-panel .chat-guest-actions button,
  #chat-panel .chat-primary,
  #rating-panel .rating-tabs button,
  #rating-panel .rating-categories button,
  #rating-panel .rating-primary,
  #spaces-panel .spaces-theme button,
  #spaces-panel .spaces-footer button,
  #spaces-panel .spaces-leave button,
  #visits-panel .visits-tabs button,
  #visits-panel .visits-targets button,
  #visits-panel .visits-reactions button,
  #visits-panel .visits-owner-actions button,
  #visits-panel .primary,
  #team-panel .team-actions button,
  #team-panel .team-lobby-actions button,
  #contacts-panel .primary,
  #mastery-panel .primary,
  #wallet-panel .primary,
  #vip-panel .primary
):active:not(:disabled):not([aria-disabled="true"]) { transform: none; }
  #modal:not(:has(#puzzle-panel))::backdrop { animation: none !important; }
}
