/* privacy462: the cookie card (game + website pages) and the cookie section of the Privacy window.
   Night is the default; day = :root[data-theme="light"] (the game and the website use the same switch).
   The card sits at the bottom, below the game's windows (#modal-root is 40), and never covers the whole screen. */
.p462-bar {
  --p462-bg: linear-gradient(180deg, #2b2014, #17100a); --p462-ink: #f6e9c8; --p462-soft: #cdbb93; --p462-edge: #c99a3c; --p462-line: rgba(240, 207, 114, .22);
  --p462-btn: linear-gradient(180deg, #4a3520, #2b1d10); --p462-btn-ink: #f6e9c8; --p462-link: #ffd978;
  position: fixed; z-index: 35; inset-inline: 0; bottom: 0; margin: 0 auto; box-sizing: border-box;
  width: min(560px, calc(100% - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding: 12px 14px; border: 2px solid var(--p462-edge); border-radius: 16px; background: var(--p462-bg); color: var(--p462-ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
  font: 14px/1.5 var(--f-ui, system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Noto Sans Thai', Tahoma, sans-serif); text-align: start;
  display: grid; gap: 6px; /* no entrance animation: a paused / reduced-motion page must never leave the card invisible */
}
:root[data-theme="light"] .p462-bar {
  --p462-bg: linear-gradient(180deg, #fffaf0, #f3e3bd); --p462-ink: #3b2a17; --p462-soft: #6b5636; --p462-edge: #c7a159; --p462-line: rgba(140, 95, 30, .25);
  --p462-btn: linear-gradient(180deg, #fff8ea, #ecd9b2); --p462-btn-ink: #3b2a17; --p462-link: #7a5208;
  box-shadow: 0 10px 26px rgba(90, 60, 10, .25), inset 0 1px 0 rgba(255, 255, 255, .7);
}
/* opened on purpose from "cookie settings": above the game's own buttons and windows (the first-visit card stays below the windows) */
.p462-bar.p462-set { z-index: 90; }
.p462-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p462-ic { font-size: 18px; line-height: 1; }
.p462-title { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.p462-x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--p462-line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.p462-text, .p462-more { margin: 0; overflow-wrap: anywhere; }
.p462-text { color: var(--p462-ink); }
.p462-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--p462-soft); }
.p462-pol { padding: 4px 0; min-height: 32px; border: 0; background: none; color: var(--p462-link); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; }
.p462-now { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--p462-line); font-weight: 600; }
.p462-now::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; }
.p462-now.yes::before { background: #4fc46a; }
.p462-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.p462-btn { min-height: 44px; padding: 8px 10px; border-radius: 999px; border: 2px solid var(--p462-edge); background: var(--p462-btn); color: var(--p462-btn-ink); font: inherit; font-weight: 700; line-height: 1.25; cursor: pointer; overflow-wrap: anywhere; }
.p462-btn.p462-all { background: linear-gradient(#ffe48f, #e3a93b 55%, #b8761c); color: #2a1300; border-color: #fff0b8; }
.p462-btn:focus-visible, .p462-pol:focus-visible, .p462-x:focus-visible, .p462-link:focus-visible { outline: 3px solid #6cc4ff; outline-offset: 2px; }
@media (max-width: 300px) { .p462-btns { grid-template-columns: 1fr; } }
/* a short screen (phone on its side): one compact row — the text on one side, the buttons on the other */
@media (max-height: 460px) and (min-width: 560px) {
  .p462-bar { width: min(760px, calc(100% - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 12px; font-size: 13px; row-gap: 2px; }
  .p462-bar .p462-head, .p462-bar .p462-text, .p462-bar .p462-more { grid-column: 1; }
  .p462-bar .p462-btns { grid-column: 2; grid-row: 1 / span 3; align-self: center; grid-template-columns: 1fr; gap: 6px; margin: 0; min-width: 170px; }
  .p462-bar .p462-btn { min-height: 38px; }
}

/* the Privacy window (game): the cookie section */
.p462-h { margin: 16px 0 8px; font-size: 16px; }
.p462-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 14px; }
.p462-upd { opacity: .8; }
.p462-h, .p462-legal li, .p462-foot > * { min-width: 0; overflow-wrap: anywhere; }
.p462-foot .p462-open { max-width: 100%; }

/* website pages: the footer link + the policy page */
.p462-link { padding: 4px 2px; min-height: 32px; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.w403-pol .p462-link { color: var(--gold, #f2c24e); }
:root[data-theme='light'] .w403-pol .p462-link { color: var(--gold3, #7a5208); }
.p462-policy h2 { margin: 22px 0 10px; font-size: 19px; scroll-margin-top: 80px; }
.p462-policy ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; line-height: 1.65; }
.p462-setbtn { cursor: pointer; font: inherit; }
