/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Responsive Full Page Layout */
body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    background-color: #f8f9fa;
}

/* Title Bar */
#title {
    font-size: 2.5rem;
    padding: 15px;
    background: linear-gradient(to right, pink 50%, lightblue 50%);
    color: black;
    width: 100%;
}

/* Main Container */
.container {
    flex: 1;
    display: flex;
    width: 100%;
}

/* Sections */
.left,
.right {
    flex: 1;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Background Colors */
.left {
    background-color: pink;
}

.right {
    background-color: lightblue;
}

/* Game Buttons */
.game-button {
    width: 150px;
    height: 150px;
    font-size: 60px;
    border: 3px solid black;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: black;
    font-family: Arial, sans-serif;
    background-color: white;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.game-button:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Game Descriptions */
p {
    font-size: 1.5rem;
    margin-top: 10px;
    font-weight: bold;
}

/* ======== Responsive Design ======== */

/* Tablets */
@media (max-width: 1024px) {
    #title {
        font-size: 2rem;
        padding: 10px;
    }

    .game-button {
        width: 120px;
        height: 120px;
        font-size: 50px;
    }

    p {
        font-size: 1.3rem;
    }
}

/* Mobile Portrait */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left,
    .right {
        width: 100%;
        height: 50%;
    }

    #title {
        font-size: 1.8rem;
    }

    .game-button {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    p {
        font-size: 1.2rem;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }

    .left,
    .right {
        height: 100%;
    }

    .game-button {
        width: 80px;
        height: 80px;
        font-size: 35px;
    }

    p {
        font-size: 1rem;
    }
}

/* Small Mobile (Portrait) */
@media (max-width: 480px) {
    #title {
        font-size: 1.5rem;
        padding: 8px;
    }

    .game-button {
        width: 80px;
        height: 80px;
        font-size: 35px;
    }

    p {
        font-size: 1rem;
    }
}
/* Sticky Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 12px;
  text-align: center;
  padding: 6px 0;
  background: #111;
  color: #ccc;
  z-index: 1000;
}

.footer a {
  color: #6aa9ff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.voice-launcher {
    width: min(92vw, 760px);
    margin: 16px auto 72px;
    padding: 20px;
    border: 3px solid #111;
    border-radius: 24px;
    background: #fffef7;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.voice-launcher h2 {
    font-size: clamp(1.3rem, 3vw, 2rem);
    margin-bottom: 10px;
}

#voice-mode-summary,
#voice-status {
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    font-weight: bold;
}

#voice-status {
    margin-top: 14px;
    color: #17325c;
}

.voice-game-picker {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 14px 0;
}

.voice-game-select,
#voice-start-btn {
    border: 3px solid #111;
    border-radius: 16px;
    background: #fff;
    color: #111;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    font-weight: bold;
    padding: 14px 18px;
    cursor: pointer;
}

.voice-game-select.is-selected {
    background: #111;
    color: #fff;
}

#voice-start-btn {
    width: min(100%, 360px);
    background: #ffd94d;
}


/* ============================================================================
   BRIGHTDOTS DOCUMENT PAGES
   ----------------------------------------------------------------------------
   Shared styling for the non-game pages: Privacy Policy, Private Beta, System
   Help. All three carried a byte-identical 308-line <style> block inline — 616
   duplicated lines that had to be edited in three places to change one colour.

   SCOPING, and why it matters: index.html also links this file, and the block
   styled bare `body`, `body::before`, `strong`, `table`, `th` and `td`. Left
   unscoped, the dark night background and the fixed background image would have
   landed on the Game Center home page. Every element selector below is
   therefore scoped to `body.bd-doc` / `.bd-doc`, and a document page opts in
   with <body class="bd-doc">. The .pp-* classes need no scoping — they are
   already namespaced and appear nowhere else.

   The background-image URL is ../images/... rather than images/... because a
   URL in a stylesheet resolves relative to the STYLESHEET, not the page.
   ========================================================================= */
:root {
    --bd-night: #1b0b3a;
    --bd-night-deep: #12062a;
    --bd-purple: #7b3ff2;
    --bd-violet: #a855f7;
    --bd-cyan: #38bdf8;
    --bd-green: #2f8f3f;
    --bd-orange: #ff8a2b;
    --bd-pink: #ff4d9d;
    --bd-cream: #fdf3dc;
    --bd-dim: #cbb6e8;

    --ink: #241a34;
    --ink-soft: #4b415e;
    --paper: #fffdf7;
    --rule: #e6dff2;

    --bd-font: "Nunito", "Baloo 2", "Quicksand", ui-rounded, system-ui,
        -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body.bd-doc {
    /* Resets, NOT redundancy. The home-page `body` rule at the top of this file
       sets display:flex, height:100vh and text-align:center for the Game Center
       landing page. A document page inherits those unless it says otherwise,
       which would centre every paragraph and clamp the page to one screen with
       the rest unreachable. These four lines undo exactly that. */
    display: block;
    height: auto;
    min-height: 100vh;
    text-align: left;

    margin: 0;
    font-family: var(--bd-font);
    color: var(--ink);
    background: var(--bd-night-deep);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Key art as a fixed backdrop, heavily washed so it reads as texture
   behind the document rather than competing with it. A pseudo-element
   is used instead of `background-attachment: fixed`, which iOS Safari
   does not handle reliably. */
body.bd-doc::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(18, 6, 42, .78), rgba(18, 6, 42, .9)),
        url("../images/bkgnd/bright-dots-bkgd(3)-v1.00.png") center 30% / cover no-repeat,
        var(--bd-night-deep);
}

/* ---------- Masthead ---------- */
.pp-head {
    padding: clamp(28px, 6vw, 64px) 20px clamp(60px, 9vw, 96px);
    text-align: center;
    color: var(--bd-cream);
}

.pp-head img {
    width: clamp(96px, 18vw, 132px);
    height: auto;
    border-radius: 26%;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 92%);
    mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 92%);
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, .55));
}

.pp-head h1 {
    margin: 14px 0 6px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
}

.pp-head p {
    margin: 0;
    color: var(--bd-dim);
    font-size: .95rem;
}

/* ---------- Paper ---------- */
.pp-paper {
    max-width: 860px;
    margin: -48px auto clamp(40px, 8vw, 90px);
    padding: clamp(24px, 5vw, 56px);
    background: var(--paper);
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}

.pp-paper h2 {
    margin: 2.4em 0 .5em;
    font-size: clamp(1.2rem, 3.2vw, 1.45rem);
    font-weight: 800;
    color: #3a1b6b;
    scroll-margin-top: 18px;
}

.pp-paper h2:first-of-type {
    margin-top: 1.2em;
}

.pp-paper h3 {
    margin: 1.6em 0 .4em;
    font-size: 1.02rem;
    font-weight: 800;
    color: #4a2a7d;
}

.pp-paper p,
.pp-paper li {
    color: var(--ink-soft);
    font-size: .98rem;
}

.pp-paper ul,
.pp-paper ol {
    padding-left: 1.3em;
}

.pp-paper li {
    margin: .35em 0;
}

.pp-paper a {
    color: #6d28d9;
    font-weight: 700;
}

.bd-doc strong {
    color: var(--ink);
}

.pp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: .85rem;
    color: var(--ink-soft);
}

/* ---------- Callouts ---------- */
.pp-draft {
    margin: 18px 0 0;
    padding: 14px 18px;
    border-left: 5px solid var(--bd-orange);
    border-radius: 10px;
    background: #fff5e8;
    font-size: .9rem;
    color: #7a4a10;
}

.pp-promise {
    margin: 26px 0;
    padding: 20px 22px;
    border: 2px solid #e3d6ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #faf6ff, #f4ecff);
}

.pp-promise h2 {
    margin: 0 0 .4em;
}

.pp-promise ul {
    margin: 0;
}

.pp-note {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: 5px solid var(--bd-cyan);
    border-radius: 10px;
    background: #eef9ff;
    font-size: .93rem;
    color: #124d68;
}

/* ---------- Contents ---------- */
.pp-toc {
    margin: 26px 0 10px;
    padding: 18px 22px;
    border: 1px solid var(--rule);
    border-radius: 16px;
    background: #fbf9ff;
}

.pp-toc h2 {
    margin: 0 0 .4em !important;
    font-size: .8rem !important;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-soft) !important;
}

.pp-toc ol {
    margin: 0;
    columns: 2;
    column-gap: 30px;
    font-size: .92rem;
}

@media (max-width: 560px) {
    .pp-toc ol {
        columns: 1;
    }
}

/* ---------- Tables ---------- */
.pp-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--rule);
    border-radius: 14px;
}

.bd-doc table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .9rem;
}

.bd-doc th,
.bd-doc td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
}

.bd-doc th {
    background: #f6f1ff;
    color: #3a1b6b;
    font-weight: 800;
}

.bd-doc tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- Footer ---------- */
.pp-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    padding: 16px calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(9, 3, 22, .85);
    border-top: 1px solid rgba(168, 85, 247, .28);
    color: var(--bd-dim);
    font-size: .82rem;
    text-align: center;
}

.pp-footer a {
    color: var(--bd-cyan);
    text-decoration: none;
}

.pp-footer a:hover {
    text-decoration: underline;
}

.pp-footer .sep {
    opacity: .45;
}

.pp-back {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: var(--bd-cream) !important;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
}

.pp-back:hover {
    background: rgba(255, 255, 255, .22);
}

:is(a, button):focus-visible {
    outline: 3px solid var(--bd-orange);
    outline-offset: 3px;
}

@media print {
    body.bd-doc {
        background: #fff;
    }

    .pp-head,
    .pp-footer {
        background: #fff;
        color: #000;
    }

    .pp-paper {
        margin: 0;
        box-shadow: none;
    }
}

/* ---- Draft-document helpers -------------------------------------------------
   Used by Terms of Use, and available to any other document page still carrying
   unfilled placeholders. Scoped to .bd-doc like everything else in this section.

   .fill  highlights a value that still needs filling in before publication, so
          a placeholder cannot quietly ship as if it were finished text.
   .sig   the two-column signature strip under a consent block.
   -------------------------------------------------------------------------- */
.bd-doc .fill {
    background: #ffe9e9;
    color: #8B1A1A;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.bd-doc .sig {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 16px;
}

.bd-doc .sig div {
    border-top: 1px solid var(--rule);
    padding-top: 6px;
    font-size: .85rem;
    color: var(--ink-soft);
}

@media (max-width: 560px) {
    .bd-doc .sig { grid-template-columns: 1fr; }
}

/* ---- Standard BrightDots footer --------------------------------------------
   Markup is generated by js/bd-footer.js so there is one definition of the
   links. This styles it in both contexts: on a .bd-doc document page and on the
   Game Center home, which is why it is NOT scoped to .bd-doc like the rest of
   the document-page section above.
   -------------------------------------------------------------------------- */
.bd-footer {
    margin: 40px auto 0;
    padding: 18px 20px 26px;
    max-width: 1100px;
    text-align: center;
    font-size: .85rem;
    line-height: 2;
    color: var(--bd-dim, #cbb6e8);
}

.bd-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .28);
    padding-bottom: 1px;
}

.bd-footer a:hover,
.bd-footer a:focus-visible {
    color: #fff;
    border-bottom-color: #fff;
}

.bd-footer .sep {
    margin: 0 8px;
    opacity: .45;
}

/* On the light document pages the dim purple would wash out, so darken there. */
body.bd-doc .bd-footer {
    color: var(--ink-soft);
}

body.bd-doc .bd-footer a {
    border-bottom-color: rgba(36, 26, 52, .3);
}

body.bd-doc .bd-footer a:hover,
body.bd-doc .bd-footer a:focus-visible {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

@media (max-width: 560px) {
    .bd-footer .sep { margin: 0 5px; }
}

/* ---- Form controls on a document page --------------------------------------
   Added for the beta feedback form, but written generically so any future
   BrightDots page with a form inherits the same look. Scoped to .bd-doc like
   everything else in this section, so it cannot reach the games.
   -------------------------------------------------------------------------- */
.bd-doc .pp-paper label {
    display: block;
    font-weight: 800;
    color: var(--ink);
    margin: 16px 0 5px;
}

.bd-doc .pp-hint {
    font-weight: 400;
    color: var(--ink-soft);
    font-size: .88em;
}

.bd-doc input[type="text"],
.bd-doc input[type="date"],
.bd-doc input[type="email"],
.bd-doc select,
.bd-doc textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--rule);
    border-radius: 10px;
}

.bd-doc textarea {
    min-height: 96px;
    resize: vertical;
}

.bd-doc input:focus,
.bd-doc select:focus,
.bd-doc textarea:focus {
    border-color: var(--bd-violet);
    outline: 3px solid rgba(168, 85, 247, .3);
    outline-offset: 1px;
}

/* Two-up field rows, collapsing to one column on a phone. */
.bd-doc .pp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* Checkbox and radio groups. */
.bd-doc .pp-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 7px 18px;
    margin-top: 5px;
}

.bd-doc .pp-checks label {
    font-weight: 400;
    margin: 0;
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.bd-doc .pp-checks input {
    margin-top: 5px;
    width: auto;
    flex: none;
}

.bd-doc .pp-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 30px;
}

.bd-doc .pp-btn {
    font: inherit;
    font-weight: 800;
    min-height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    background: var(--bd-purple);
    color: #fff;
}

.bd-doc .pp-btn-secondary {
    background: #ede6fa;
    color: #3a1b6b;
}

.bd-doc .pp-btn:hover,
.bd-doc .pp-btn:focus-visible {
    filter: brightness(1.1);
}

.bd-doc .pp-status {
    margin-top: 12px;
    min-height: 1.4em;
    font-weight: 800;
    color: #1B5E20;
}

@media (max-width: 560px) {
    .bd-doc .pp-row { grid-template-columns: 1fr; }
}
