.party-page { --party-ink: #302039; --party-gold: #f6d58a; --game-ink: #302039; --game-muted: #695273; --game-line: #d6bdd8; color-scheme: light; color: var(--party-ink); background: radial-gradient(ellipse at 85% 3%, #e8d5ef, transparent 42%), #faf6f9; }
.party-page .merge-nav { background: transparent; border-color: #dfcce2; }
.party-page .merge-nav .wordmark, .party-page .merge-directory { color: #54315e; }
.party-page .merge-nav-button { color: #4d2d57; border-color: #d6badb; background: #f6ecf8; box-shadow: inset 0 1px #ffffffa0, 0 1px #54315e14; }
.party-page .merge-nav-button:hover { color: #2f1a38; background: #eddcf2; border-color: #bc98c4; }
.party-page .wallet-button { border-color: #dab878; background: #fff0cb; color: #5a3817; }
.party-page .game-tool[aria-pressed="true"] { border-color: #c992c5; background: #f1d9f4; color: #482150; }
.party-layout { width: min(100% - 36px, 1050px); margin: 20px auto 48px; }
.party-title { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin: 0 0 14px; }
.party-title h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.06; letter-spacing: -.06em; }
.party-title h1 span { color: #85436e; }
.party-title p { margin: 6px 0 0; color: #695273; }
.party-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.party-modes { margin: 0; border-color: #d3b8d9; background: #f3e6f6; }
.party-modes button { color: #593561; min-height: 40px; padding-inline: .72rem; }
.party-modes button[aria-pressed="true"] { background: #5a315d; border-color: #48244b; color: #fff4e0; }
.party-modes button:hover:not([aria-pressed="true"]) { background: #e8d5ee; color: #3a1d42; }
.party-guide { white-space: nowrap; background: #f5ebf7; border-color: #cfb2d6; color: #4c2a56; }
.party-guide:hover { background: #ebd9f0; color: #31173a; }
.party-layout .game-tools { margin-bottom: 8px; }
.party-console { overflow: hidden; border-radius: 22px; border: 1px solid #c8a8ca; background: #fff9f6; box-shadow: 0 16px 45px #3e223a29; }
.party-setup { display: grid; grid-template-columns: 1.35fr 1fr; }
.party-cover { position: relative; min-height: 365px; background: #301a31; }
.party-cover img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 47% 50%; }
.party-form { display: grid; align-content: center; gap: 13px; padding: clamp(16px, 4vw, 36px); }
.party-form h2 { margin: 0; font-size: clamp(22px, 3.5vw, 33px); }
.party-form p { margin: 3px 0 0; color: #745772; }
.party-local-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .64rem; border: 1px solid #e0bb8e; border-radius: 10px; background: #fff0dd; }
.party-local-resume p { margin: 0; color: #654053; overflow-wrap: anywhere; font-size: .85rem; }
.party-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.party-pack-picker { display: grid; gap: 6px; padding: 9px 10px; border: 1px solid #d9c0d6; border-radius: 12px; background: #fbf2f8; }
.party-pack-label { font-size: 13px; font-weight: 760; color: #54315e; }
.party-pack-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.party-pack-pill {
  flex: 1 1 auto; min-height: 36px; padding: 5px 10px; border: 1px solid #cdb0d3; border-radius: 999px;
  background: #fff9fd; color: #583462; font: 720 12.5px/1.2 var(--sans); cursor: pointer; white-space: nowrap;
}
.party-pack-pill:hover:not([aria-pressed="true"]) { background: #f2e4f6; }
.party-pack-pill[aria-pressed="true"] { border-color: #5a315d; background: #5a315d; color: #fff4df; }
.party-pack-note { margin: 0; font-size: 12px; color: #6e4e72; }
.party-guide-packs { margin: 0 0 10px; }
.party-felt-pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; flex: none; }
.party-felt-pills span { flex: none; padding: 5px 10px; border: 1px solid #c7959d; border-radius: 20px; font-size: 12px; color: #ffe3a9; }
.party-pack-badge { background: #4a2a4d; border-color: #dfba80 !important; color: #ffefc8 !important; font-weight: 740; }
.party-names-hint { margin: -4px 0 0; font-size: 12px; color: #7b5f7e; }
.party-names { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.party-form :is(input, select), .party-rule-form input { min-width: 0; min-height: 42px; padding: 7px 10px; border: 1px solid #d4b9cf; border-radius: 9px; background: #fffaf9; color: #39213b; font: inherit; }
.party-form input::placeholder { color: #6c4f70; opacity: .78; }
.party-form select { width: 85px; color-scheme: light; }
.party-page .merge-primary { background: var(--party-gold); border-color: #e4ba67; color: #382239; font-weight: 800; }
.party-form > button { width: 100%; justify-self: stretch; min-height: 48px; font-size: 1rem; }
.party-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(184px, 24%); }
.party-felt { min-width: 0; display: grid; align-content: start; gap: 12px; padding: clamp(13px, 2.5vw, 26px); color: #ffefdc;
  background: repeating-linear-gradient(45deg,#fff1 0 1px,transparent 1px 4px), radial-gradient(ellipse at 50% 39%, #663c60, #29192f 87%); }
.party-felt-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.party-felt-header h2 { min-width: 0; overflow-wrap: anywhere; font-size: clamp(17px, 3.3vw, 25px); margin: 0; color: #fff4dc; }
.party-felt-header > span { flex: none; padding: 5px 10px; border: 1px solid #c7959d; border-radius: 20px; font-size: 12px; color: #ffe3a9; }
.party-seats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.party-seats li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; min-width: 0; padding: 5px 9px; border: 1px solid #aa7a9e; border-radius: 9px; background: #30193382; color: #f7dff3; font-size: 12px; overflow-wrap: anywhere; }
.party-seats li[data-current] { background: #f4d187; color: #371f37; border-color: #f5cd73; font-weight: 800; }
.party-seats small { font-size: .76em; opacity: .9; }
.party-round { display: grid; grid-template-columns: minmax(82px, .65fr) minmax(0, 1.35fr); align-items: center; gap: clamp(13px, 3vw, 32px); border: 1px solid #c09cb582; padding: clamp(12px, 3.5vw, 32px); border-radius: 14px; background: #2b19336b; }
.party-stage { display: grid; place-items: center; }
.party-card { isolation: isolate; display: grid; position: relative; place-content: center; justify-items: center; width: min(100%, 132px); aspect-ratio: .69; border: 1px solid #ffedbd; border-radius: 11px; box-shadow: 0 6px 0 #bd918e, 0 8px 0 #6e435b, 0 12px 19px #1a101f6b; }
.party-card-back { cursor: pointer; color: #ffe5a5; background: repeating-linear-gradient(135deg,#ffdb8f13 0 1px,transparent 1px 6px), radial-gradient(#75416a,#42244b); font: inherit; }
.party-card-back::before { content: ''; position: absolute; z-index: -1; inset: 6px; border: 1px solid #ffe8b899; border-radius: 7px; }
.party-card-back span { font-size: clamp(23px, 5vw, 51px); font-weight: 900; line-height: 1.1; }
.party-card-back small { font-weight: 750; }
.party-card-back:disabled { cursor: default; opacity: .78; }
.party-card-back:enabled:hover { box-shadow: 0 6px 0 #ad8382, 0 8px 0 #6e435b, 0 12px 22px #ffdcad52; }
.party-card-face { grid-template-rows: auto 1fr auto; place-content: stretch; padding: 7%; background: linear-gradient(150deg,#fff8e7,#fbddc9); color: #452337; }
.party-card-face[data-red] { color: #a22c49; }
.party-card-face b { justify-self: start; font: 750 clamp(12px, 3.8vw, 26px)/1 Georgia, serif; }
.party-card-face b:last-child { justify-self: end; transform: rotate(180deg); }
.party-card-face strong { align-self: center; font: 750 clamp(27px, 7vw, 63px)/1 Georgia, serif; }
.party-card-face[data-reveal] { animation: party-reveal .4s cubic-bezier(.12,.68,.2,1) both; }
@keyframes party-reveal { from { transform: perspective(560px) rotateY(-88deg) scale(.92); opacity: .25; } to { transform: perspective(560px) rotateY(0); opacity: 1; } }
.party-task h3 { margin: 0 0 6px; font-size: clamp(20px, 4.5vw, 38px); line-height: 1.12; letter-spacing: -.04em; color: #fff0bf; overflow-wrap: anywhere; }
.party-task p { margin: 0; font-size: clamp(12px, 2.2vw, 15px); line-height: 1.6; }
.party-prompt { margin-top: 8px; padding: 6px 9px; width: fit-content; max-width: 100%; overflow-wrap: anywhere; border-radius: 8px; color: #362339; background: #f6deba; font-weight: 800; }
.party-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.party-felt .party-options button, .party-felt .party-subtle { background: #4a2d4b; border-color: #bf91ad; color: #ffefda; }
.party-options button { min-height: 35px; padding: 5px 9px; font-size: 12px; overflow-wrap: anywhere; }
.party-options button[aria-pressed="true"] { background: #76466c; border-color: #ffe5a6; }
.party-rule-form { display: flex; flex-wrap: wrap; gap: 5px; }
.party-rule-form input { flex: 1 1 130px; min-height: 35px; width: 130px; }
.party-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.party-side { min-width: 0; padding: 16px; }
.party-side h3 { font-size: 15px; margin: 0 0 9px; }
.party-side .merge-button { margin-top: 10px; background: #f6ebf6; border-color: #d2b2d5; color: #522f5b; box-shadow: none; }
.party-side .merge-button:hover { background: #ebd9ee; border-color: #b78ebd; color: #361a3e; }
.party-house { padding: 7px 9px; border-radius: 8px; margin: 0 0 11px; background: #f5e4ed; color: #523451; font-weight: 650; overflow-wrap: anywhere; }
.party-history { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.party-history li { display: grid; grid-template-columns: 42px 1fr; gap: 5px; align-items: center; font-size: 12px; line-height: 1.3; }
.party-history li span { min-width: 0; overflow-wrap: anywhere; }
.party-history b { display: block; padding: 6px 3px; text-align: center; color: #5e3457; background: #f6e7ee; border-radius: 5px; }
.party-history b[data-red] { color: #a12743; }
.party-no-history, .party-hand-status { font-size: 13px; }
.party-no-history { margin: 0; color: #6b4d61; }
.party-hand-status { margin: 0; color: #ffe5a9; }
.party-summary { padding: 20px; text-align: center; border: 1px solid #d8aebd; border-radius: 14px; background: #4b2a49; }
.party-summary h3 { font-size: clamp(22px, 4vw, 32px); margin: 0; color: #ffe8ac; }
.party-summary p { margin: 8px 0 14px; }
.party-room { --game-ink: #fff3e1; --game-muted: #ead5e6; --game-accent: #f6d58a; margin-bottom: 10px; background: #38223d; border-color: #865d85; }
.party-room .room-members li, .party-room .room-actions .merge-button:not(.merge-primary) { background: #57385d; border-color: #97709a; }
.party-room :is(.room-join input, .room-link) { background: #2b1931; border-color: #99729b; }
.party-dialog > p { margin: 8px 0 12px; }
.party-rules { display: grid; gap: 6px; list-style: none; padding: 0; margin: 0; }
.party-rules li { display: grid; grid-template-columns: 25px minmax(70px, auto) 1fr; align-items: baseline; gap: 9px; padding: 7px; border-radius: 7px; color: #442640; background: #f7e9f0; font-size: 12px; }
.party-rules b { font: 800 15px Georgia, serif; }
.party-page [hidden] { display: none; }
.party-page.game-focus .game-screen { --game-screen-width: 65rem; background: #f5eaf1; }
.party-page.game-focus :is(.party-console, .party-room) { width: min(100%, 1060px); margin-inline: auto; }
.party-page.game-focus .party-setup { grid-template-columns: minmax(0, 1fr); }
.party-page.game-focus .party-form { width: min(100%, 32rem); justify-self: center; }
.party-page.game-focus :is(.party-cover, .party-guide) { display: none; }

@media (max-width: 690px) {
  .party-layout { width: min(100% - 16px, 1050px); margin-top: 22px; }
  .party-title { display: grid; gap: 11px; padding-inline: 5px; }
  .party-title p { font-size: 13px; }
  .party-setup, .party-board { grid-template-columns: 1fr; }
  .party-cover { min-height: 0; aspect-ratio: 2.12; }
  .party-form, .party-side { padding: 12px; }
  .party-felt { gap: 8px; }
  .party-seats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .party-seats li { flex: none; }
  .party-round { grid-template-columns: minmax(66px, .68fr) minmax(0, 1.32fr); }
  .party-card { max-width: 96px; }
  .party-rule-form input { width: 100%; }
  .party-history { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 420px) and (orientation: landscape) {
  .party-page.game-focus .party-form {
    grid-template-columns: minmax(9rem, .72fr) minmax(0, 1fr);
    grid-template-areas: "title title" "resume resume" "count names" "start names";
    align-items: start;
    gap: 7px 12px;
    padding: 9px 12px;
  }
  .party-page.game-focus .party-setup-heading { grid-area: title; }
  .party-page.game-focus .party-local-resume { grid-area: resume; }
  .party-page.game-focus .party-count { grid-area: count; }
  .party-page.game-focus .party-names { grid-area: names; }
  .party-page.game-focus .party-form > button { grid-area: start; }
  .party-page.game-focus .party-setup-heading p { display: none; }
  .party-page.game-focus .party-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .party-page.game-focus .party-board { grid-template-columns: minmax(0, 1fr) minmax(135px, 25%); }
  .party-page.game-focus .party-stage .party-card { width: 61px; }
  .party-page.game-focus .party-felt { gap: 5px; padding: 8px; }
  .party-page.game-focus .party-round { padding: 7px; }
  .party-page.game-focus .party-history { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .party-options .merge-button, .party-actions .merge-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .party-card-face[data-reveal] { animation: none; } }
.party-page.game-reduced-motion .party-card-face[data-reveal] { animation: none; }
