/* Read aloud (speech.js), Simple words (words.js) and "Who is playing?" (who-plays.js): the speaker buttons, the
   "More" button after a rule told in simple words, and the one row on the new-hero screen. */

/* A speaker button: for a finger or a mouse (never a Tab stop). 44px to press; while the voice speaks its sound waves
   are drawn heavier and it is named "Stop reading", so the state is told by shape and by name, not by color. */
.say-btn { display: inline-grid; place-items: center; grid-auto-flow: column; gap: 4px; flex: none; min-width: 44px; min-height: 44px; padding: 0 8px; box-sizing: border-box;
  border: 1px solid #6b5d47; border-radius: 8px; background: rgba(22, 20, 15, 0.86); color: #e8dfc8; cursor: pointer; pointer-events: auto; font: inherit; -webkit-tap-highlight-color: transparent; }
.say-btn[hidden] { display: none; }
.say-btn:hover { border-color: #b9a680; }
.say-glyph { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.say-glyph path:first-child { fill: currentColor; stroke-width: 1; }
body.speaking .say-btn .say-glyph path:last-child { stroke-width: 3; }
.say-btn .padicon { display: none; width: 22px; height: 22px; }
body.pad-on .say-btn .padicon { display: inline-block; }
/* On a card, a sheet or a screen: in its top left corner, clear of its own buttons. */
.say-btn.say-corner { position: absolute !important; top: calc(8px + var(--safe-t, 0px)); left: calc(8px + var(--safe-l, 0px)); right: auto; bottom: auto; width: auto; height: auto; min-height: 44px; margin: 0; z-index: 3; grid-area: auto; }
#front > .say-btn.say-corner, #card > .say-btn.say-corner, #sheet > .say-btn.say-corner { left: auto; right: calc(8px + var(--safe-r, 0px)); }
/* The menu: at the foot of its side list, above the hint strip (its top corners hold the tabs and Close). */
#hub > .say-btn.say-corner { top: auto; bottom: calc(52px + var(--safe-b, 0px)); }
#tip > .say-inline, #hudStack #tip > .say-btn { order: 5; min-width: 44px; min-height: 44px; }
.talk-foot > .say-inline { order: -1; }
/* A passing remark: its speaker button has a column of its own before Dismiss (the chip is a grid of three otherwise, forge.css .bark). */
.bark.has-say { grid-template-columns: 54px minmax(0, 1fr) 44px 44px; }
.bark.has-say > .say-btn { grid-column: 3; grid-row: 1; border-color: transparent; background: none; padding: 0; }
.bark.has-say > .bark-close { grid-column: 4; grid-row: 1; }

/* "Say that again" on a touch screen, while Read aloud is on: a speaker mark at the end of the line at the top left.
   It stands inside the line, which is as tall as a thumb while it holds it, so the HUD's column gains no row. */
#hudStack #objective.has-say { min-height: 44px; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; padding-right: 0; align-items: center; flex-wrap: nowrap; pointer-events: auto; }
.say-again { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-left: auto; padding: 0; pointer-events: auto; border: 0; border-left: 1px solid #6b5d47; background: none; color: inherit; cursor: pointer; }
.say-again[hidden] { display: none; }

/* Simple words: the standard words of a rule, one press away. */
.words-more { margin-left: 8px; min-height: 44px; padding: 4px 12px; font-size: calc(13px * var(--ts, 1)); vertical-align: middle; }
.words-more[hidden] { display: none; }
.words-full { display: block; margin-top: 6px; opacity: 0.86; font-size: calc(13px * var(--ts, 1)); }
.words-full[hidden] { display: none; }
/* On a card that is itself a button there is no room for a button: the rule's numbers stand under its plain line. */
.words-nums { display: block; margin-top: 2px; font-size: calc(13px * var(--ts, 1)); opacity: 0.86; }

/* The voice sheet: the voice in use is told by the word "Chosen" as well as its edge. */
.read-set .read-voice .chat-opt-state:empty { visibility: hidden; }
.read-set .read-voice[aria-checked="true"] { border-color: var(--accent, #e0a060); }

/* "Who is playing?" on the new-hero screen: a line of its own above the name. */
.front .who-row { flex: 0 0 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; min-width: 0; }
.front .who-q { font-size: calc(15px * var(--ts, 1)); color: #cfc6ae; }
.front .who-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: 34rem; padding: 6px 12px; text-align: left; border: 1px solid #6b5d47; border-radius: 8px; background: rgba(22, 20, 15, 0.7); color: #e8dfc8; font: inherit; cursor: pointer; }
.front .who-choice.on { border-color: #e8dfc8; border-width: 2px; padding: 5px 11px; }
.front .who-words { display: grid; min-width: 0; }
.front .who-words small { font-size: calc(12px * var(--ts, 1)); color: #b5ab92; }
.front .who-state { font-weight: 700; min-width: 2.2em; text-align: right; }
.who-mark { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who-mark .who-tick { visibility: hidden; }
.who-choice.on .who-mark .who-tick { visibility: visible; }
.front.create .lay-main { flex-wrap: wrap; }
@media (max-height: 760px), (max-width: 620px) { .front .who-words small { display: none; } .front .who-choice { min-height: 44px; } }

/* Reading aloud by itself (speech.js): a small mark with a Stop, shown only while the voice reads something it was
   not pressed for. It is told in words; the Stop is as tall as a thumb. In play it is a row of the HUD's column at the
   top left. Over a conversation or a scene it stands at the top center (.say-float): the box and the caption are at the
   foot. Over a card, a sheet or a screen it is not shown: that layer's speaker button says Stop in words instead. */
.say-now { display: flex; align-items: center; gap: 8px; max-width: 100%; box-sizing: border-box; padding: 0 0 0 10px; border: 1px solid #6b5d47; border-radius: 8px; background: #16140f; color: #e8dfc8;
  font-size: calc(14px * var(--ts, 1)); white-space: nowrap; }
.say-now[hidden] { display: none; }
#hudStack > .say-now { pointer-events: auto; }
.say-now.say-float { position: fixed; top: calc(6px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%); z-index: 39; max-width: calc(100vw - 16px); pointer-events: auto; }
.say-now > .say-glyph { flex: none; }
.say-now > .say-glyph path:last-child { stroke-width: 3; }
.say-now-stop { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; border-left: 1px solid #6b5d47; border-radius: 0 7px 7px 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.say-now-stop:hover { background: #2a251b; }
.say-now-key { min-width: 1.5em; padding: 1px 5px; border: 1px solid #6b5d47; border-radius: 4px; font: inherit; font-weight: 400; text-align: center; text-decoration: none; }
.say-now-stop .padicon { display: none; width: 22px; height: 22px; }
body.pad-on .say-now-stop .padicon { display: inline-block; }
body.pad-on .say-now-key, .say-now.touch .say-now-key { display: none; }
.say-now-hold { display: none; font-weight: 400; text-decoration: none; }
body.pad-on .say-now:not(.say-float) .say-now-hold { display: inline; }
/* The new version notice (lab.css #updateNote) stands at the top center too: the mark stands under it. */
body:has(#updateNote:not([hidden])) .say-now.say-float { top: calc(72px + var(--safe-t, 0px)); }
/* A speaker button while the voice reads by itself: the word Stop takes the place of its picture, in the same room
   (its box does not grow: the heads of cards keep 52px for it). */
.say-btn .say-stop { display: none; font-size: 13px; font-weight: 700; }
body.speaking-auto .say-btn { padding: 0 4px; }
body.speaking-auto .say-btn .say-stop { display: inline; }
body.speaking-auto .say-btn .say-glyph, body.speaking-auto .say-btn .padicon { display: none; }
/* The sheet of what is read by itself: Everything and Nothing above the list. */
.read-auto .read-auto-all { margin-bottom: 10px; }
.read-auto .read-auto-all .chip { min-height: 44px; }
