/* Singing Bowl — No. 098
 * A dark, warm, incense-quiet room with one bronze bowl in it.
 * Self-contained; nothing leaks to the hub. */

:root {
  --bg: #0d0a08;
  --ink: #f3e9dc;
  --bronze: #c8934a;
  --glow: #ffc978;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ------------------------------------------------------------------ frame */

.frame { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.frame__corner {
  position: absolute;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: rgba(243, 233, 220, 0.3);
}
.frame__corner--tl { top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
.frame__corner--tr { top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
.frame__corner--bl { bottom: max(14px, env(safe-area-inset-bottom)); left: max(16px, env(safe-area-inset-left)); pointer-events: auto; }
.frame__corner--bl a { color: inherit; text-decoration: none; transition: color 0.18s ease; }
.frame__corner--bl a:hover { color: var(--glow); }
.frame__corner--bl a:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

.hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: max(14px, env(safe-area-inset-top));
  margin: 0;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 233, 220, 0.26);
  pointer-events: none;
  z-index: 6;
  text-align: center;
  white-space: nowrap;
  transition: opacity 0.8s ease;
}
.hint.is-gone { opacity: 0; }

/* ------------------------------------------------------------------- tray */

.tray {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  background: rgba(24, 17, 12, 0.7);
  border: 1px solid rgba(255, 201, 120, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sizes { display: inline-flex; gap: 5px; }

.size {
  min-width: 38px;
  height: 32px;
  padding: 0 11px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 233, 220, 0.55);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.size:hover { color: var(--ink); background: rgba(255, 201, 120, 0.1); }
.size[aria-checked="true"] { color: #2a1c0a; background: linear-gradient(180deg, #ffd89a, #e0a44f); border-color: rgba(255, 220, 170, 0.6); }
.size:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

.tool {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: rgba(243, 233, 220, 0.7);
  background: transparent;
  border: 1px solid rgba(255, 201, 120, 0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.tool:hover { color: var(--glow); border-color: var(--glow); }
.tool:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.tool[aria-pressed="false"] { color: rgba(243, 233, 220, 0.28); }

/* -------------------------------------------------- shared-badge docking
 * The whole screen is a rubbing surface, so keep the badges out of the middle
 * and off the tray. */
.opt-tipjar.opt-tipjar { top: calc(max(52px, env(safe-area-inset-top) + 52px)); bottom: auto; transform: none; }
.opt-fs.opt-fs { top: calc(max(106px, env(safe-area-inset-top) + 106px)); bottom: auto; transform: none; }
.opt-tipjar.opt-tipjar.tj-nudge { animation: none; }

/* the hint is nowrap, so give it room to shrink on a 320px phone */
@media (max-width: 360px) {
  .hint { font-size: 9px; letter-spacing: 0.09em; }
}

@media (prefers-reduced-motion: reduce) {
  .size, .tool, .hint { transition: none; }
}
