/* Minimal reset — only what a full-bleed game surface actually needs. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

/*
 * This is a tabletop, not a document.
 *
 * Everything on it is a physical object the player clicks and drags at: a stray drag
 * across the board selected the position names, put a highlight box behind the ward
 * labels, and left the browser's ghost image of a card back or a coin hanging off the
 * cursor. All three read as the interface coming apart.
 *
 * Note this gives up one of the four reasons cards are DOM rather than canvas (CLAUDE.md
 * §5) — accessibility, responsive layout and SEO are untouched, but card copy can no
 * longer be selected and copied. Deliberate, and reversible in one rule: adding
 * `user-select: text` to `.card__text` brings it back for the card's own words without
 * making the board draggable again. Worth revisiting at Phase 8, when the Reading
 * produces a premise a writer may well want to copy out.
 */
body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -webkit-user-select: none;
    user-select: none;
}

img,
canvas {
    display: block;
    max-width: 100%;
    /* Stops the browser's own drag-and-drop ghost. `draggable="false"` would do it too,
       but only on elements someone remembered to set it on. */
    -webkit-user-drag: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

h1,
h2,
h3,
p,
figure,
blockquote {
    margin: 0;
}

ul[role='list'] {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The tabletop is heavily animated; honour the OS-level preference. */
/*
 * The usual `prefers-reduced-motion` reset is deliberately absent.
 *
 * It sets `animation-duration: 0.01ms !important` on every element, which in a game
 * whose entire surface is dealt and turned cards does not reduce motion so much as
 * delete the product: cards materialised in place instead of being dealt, and a reveal
 * that holds a card up to be read flashed past in a hundredth of a second.
 *
 * That setting is very commonly switched on at the OS level by people who simply want
 * snappy window animations, and it then applies to every site they visit. Honouring it
 * here would silently break the game for them. Product decision, taken deliberately:
 * Talemancy is a game and it moves.
 */

/*
 * `hidden` means hidden, whatever else says otherwise.
 *
 * The attribute is only a UA `display: none`, so *any* author `display` beats it — and
 * every flex or grid button in this project declares one. A priced control was set
 * `hidden` in JS, reported itself hidden to the DOM, and stayed on screen; the harness
 * checked the attribute and agreed with it. Enforced once here rather than remembered at
 * every call site.
 */
[hidden] {
    display: none !important;
}
