/* ==========================================================================
   Workshop Phone — shell
   "The phone should animate naturally into view from the player's hand...
   feel like a physical object carried by the player." The slide-from-hand
   animation (position, transform, transition) is the exact same one the
   old Builder Phone already established in buildmode.css — proven, not
   redesigned. The case itself was refined this phase (Interface & Design
   Refinement) toward "immediately recognisable as a modern smartphone" —
   real proportions, a real status bar, a home indicator — while staying
   wood and brass rather than becoming a generic glass slab; "its own
   identity while remaining clearly part of the Workshop" meant refining
   this material language, not replacing it.
   ========================================================================== */
.workshop-phone {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 290px;
  height: 600px;
  max-height: 84vh;
  background: var(--wood-dark);
  border: 6px solid var(--wood-mid);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float), inset 0 0 0 2px var(--brass);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(140%);
  transition: transform var(--duration-slow) cubic-bezier(0.2, 0.8, 0.3, 1), border-color var(--duration-medium) var(--ease-standard);
}
.workshop-phone.open {
  transform: translateY(0);
}

/* Version 4, Phase 3 ("The Phone's Settings, Made Real") — the theme-
   aware layer every app screen's own colours now read from, instead of
   hardcoding a light-mode value directly. Defined once here (the light
   defaults — identical to what every rule below used to hardcode, so
   light mode is visually unchanged) and overridden at `[data-theme=
   "dark"]`. Reuses existing tokens rather than inventing new hex values:
   dark mode is "paper on ink" — this codebase's own light-mode pairing
   ("ink on paper"), simply inverted, the same two tokens doing double
   duty rather than a second dark-specific palette. Accent colours
   (`--screen-glow`, `--brass-bright`, active/hover states) are
   deliberately untouched below — real accents don't need to invert. */
.workshop-phone {
  --phone-ink: var(--ink);
  --phone-ink-soft: var(--ink-soft);
  --phone-surface-subtle: rgba(0, 0, 0, 0.04);
  --phone-surface-subtle-lighter: rgba(0, 0, 0, 0.03);
  --phone-border-subtle: rgba(0, 0, 0, 0.12);
  --phone-page-bg: white;
  --phone-base-1: var(--paper);
  --phone-base-2: var(--paper-dark);
}
.workshop-phone[data-theme="dark"] {
  --phone-ink: var(--paper);
  --phone-ink-soft: rgba(237, 227, 208, 0.65);
  --phone-surface-subtle: rgba(255, 255, 255, 0.08);
  --phone-surface-subtle-lighter: rgba(255, 255, 255, 0.06);
  --phone-border-subtle: rgba(255, 255, 255, 0.16);
  --phone-page-bg: var(--wood-dark);
  --phone-base-1: var(--ink);
  --phone-base-2: var(--wood-dark);
}

/* "Real brightness control... should visibly affect the Phone's own
   rendered screen, not claim to change the actual device screen." Wraps
   everything that's actually *display* (status bar, header, app
   content, home indicator — see `PhoneUI.js`'s own constructor comment)
   so the filter below dims the screen exactly the way a real phone's
   own backlight would, never the physical wood/brass case around it. A
   transparent flex pass-through otherwise — same column layout the
   case itself used to apply directly to these same four children. */
.workshop-phone-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  filter: brightness(var(--phone-brightness, 1));
}

/* Version 3, Phase 13 ("The Phone Becomes a Device") — "let a player
   change... the phone's own border colour." Four curated cases, each an
   existing token, not a colour picker; `[data-border="oak"]` is
   deliberately identical to the rule above (the un-set default) so a
   fresh Workshop looks exactly as it always has. Set by
   `PhoneUI.setAppearance()`, read from `SettingsStore.get("phone")`.
   `border-color`'s own transition (declared above, alongside `transform`)
   is what makes an appearance change read as a real material change
   rather than a flicker — verifying that motion live isn't possible
   through this project's own dev browser pane specifically (it never
   reports the tab as visible, so Chromium legitimately never ticks
   `requestAnimationFrame`/CSS animation timelines for it at all — see
   `.claude/DEV_NOTES.md`); the end state (which colour a given preset
   actually resolves to) is what's checked here instead. */
.workshop-phone[data-border="walnut"] { border-color: var(--wood-dark); }
.workshop-phone[data-border="brass"] { border-color: var(--brass); }
.workshop-phone[data-border="teal"] { border-color: var(--teal); }

/* "Comfortable one-handed use... safe button placement... proper
   scaling." A fixed 290px corner panel works on desktop/tablet, where
   there's plenty of room either side of it, but on an actual small
   phone viewport it can crowd the edge or even overflow. Below this
   width, the phone becomes a full-width, bottom-anchored sheet instead
   — still slides up the same way, still the same shell, just sized to
   actually fit a thumb's reach rather than a fixed desktop measurement. */
@media (max-width: 420px) {
  .workshop-phone {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: 80vh;
    border-radius: var(--radius-lg);
  }
}

/* Interface & Design Refinement phase — "status bar." A real device's
   own clock (see PhoneSystem.js's own _updateStatusBar()) plus two
   honestly-decorative glyphs — a permanently-full signal/battery is the
   same "harmless fiction every phone mockup already tells" convention
   real product screenshots use, not something worth simulating for real. */
.workshop-phone-statusbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.workshop-phone-status-time {
  font-variant-numeric: tabular-nums;
}
.workshop-phone-status-icons {
  opacity: 0.85;
  font-size: 0.7rem;
}

.workshop-phone-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 8px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--brass-bright);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.workshop-phone-title {
  flex: 1;
  text-align: center;
}
.workshop-phone-home-button,
.workshop-phone-close-button {
  background: none;
  border: none;
  color: var(--brass-bright);
  font-size: var(--text-md);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.workshop-phone-home-button:hover,
.workshop-phone-close-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.workshop-phone-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* `background` is declared once, further down (the wallpaper-tint
     rule, Version 3 Phase 13 / Version 4 Phase 2) — this selector's own
     `background: var(--paper)` used to sit here too, but the wallpaper
     rule already always wins for that property (same selector, later in
     the file) and always resolves to a real value even with no
     `data-wallpaper` set, so keeping both was two declarations for one
     property, one of them permanently shadowed. */
  color: var(--phone-ink);
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
}

/* Version 3, Phase 13 ("The Phone Becomes a Device") — "app opening/
   closing should transition with a bit more phone-like motion." Every
   screen change (`PhoneUI.showHome()`/`prepareAppContainer()`) already
   does `this.content.innerHTML = ""` then appends fresh elements, so a
   plain CSS animation targeting the content area's own direct children
   fires automatically on every navigation — genuinely new elements, not
   ones being reused — with no imperative "start/stop the transition" JS
   needed at all. `animation`, not `transition`: this is a one-shot
   "arrive like this" on insertion, not an in-place change between two
   states, so `@keyframes` is the more honest fit for what's actually
   happening, independent of which mechanism this project's own dev
   tooling could or couldn't observe running (see `.claude/DEV_NOTES.md`
   if a future check here seems to hang — this phase found the headless
   browser pane used for verification doesn't tick `requestAnimationFrame`
   at all for a backgrounded tab, so neither a `transition` nor an
   `animation` can be watched progress through that tool; that's a
   tooling limitation, not evidence of anything wrong with the CSS
   itself). `--duration-medium` already resolves to `0ms` under
   `prefers-reduced-motion` (see tokens.css), so this snaps to its end
   state immediately there, the same as every other eased value this
   project already gates that way. */
@keyframes workshop-phone-screen-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.workshop-phone-content > * {
  animation: workshop-phone-screen-in var(--duration-medium) var(--ease-standard);
}

/* Interface & Design Refinement phase — "navigation... home indicator."
   The one purely cosmetic nod to "this is a touchscreen" every modern
   phone shares — not a real gesture surface, just the visual grammar
   that reads as one. */
.workshop-phone-home-indicator {
  flex-shrink: 0;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wood-dark);
  border: none;
  padding: 0;
  cursor: pointer;
}
.workshop-phone-home-indicator::after {
  content: "";
  width: 90px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(237, 227, 208, 0.35);
  transition: background var(--duration-fast) var(--ease-standard);
}
.workshop-phone-home-indicator:hover::after,
.workshop-phone-home-indicator:focus-visible::after {
  background: rgba(237, 227, 208, 0.6);
}

/* ==========================================================================
   Home screen — "a simple grid of icons... minimal, clear, readable,
   comfortable," with the wallpaper-and-icon-tile treatment a real
   home screen has instead of plain bordered boxes on a flat surface.
   ========================================================================== */
/* Version 3, Phase 13 — "let a player change the home screen's own
   wallpaper." Every preset only shifts which existing accent token tints
   the radial glow above the base — a curated set of the Workshop's own
   colours, not a free-form picker. `"paper"` (this file's own
   long-standing default) needs no rule of its own; it's the fallback
   below.
   Version 4, Phase 2 ("Playtesting Notes, Continued") — this used to be
   scoped to `.workshop-phone-content:has(.workshop-phone-home-grid)`,
   which only ever matches while the Home screen specifically is mounted.
   The wallpaper picker itself lives in the Settings app, a different
   screen — so picking a wallpaper never visibly changed anything on the
   screen actually being looked at, only a button's own active-state
   highlight; the tint only appeared after backing all the way out to
   Home, and even there it's a subtle blend easy to miss. Dropping the
   `:has()` gate makes this the phone's own backdrop on every screen,
   the same way a real phone's wallpaper isn't confined to its home
   screen — not a Settings-screen redesign (see `docs/ROADMAP_V4.md`'s
   own separate Phase 3 for that), just making the existing choice
   actually visible where it's made.
   Version 4, Phase 3 ("The Phone's Settings, Made Real") — the base itself
   (previously always `var(--paper)`/`var(--paper-dark)`, "the phone's own
   screen text is dark ink throughout, so the surface itself always needs
   to stay light") is no longer light-only, now that a real dark theme
   exists: `--phone-base-1`/`--phone-base-2` resolve to paper/paper-dark
   in light mode and ink/wood-dark in dark mode, so the identical tint
   formula below now layers over whichever base the current theme
   actually is. */
.workshop-phone-content {
  background: radial-gradient(ellipse at 50% -10%, var(--phone-wallpaper-tint, color-mix(in srgb, var(--brass) 16%, transparent)), transparent 60%), linear-gradient(180deg, var(--phone-base-1) 0%, var(--phone-base-2) 100%);
}
.workshop-phone[data-wallpaper="sage"] .workshop-phone-content {
  --phone-wallpaper-tint: color-mix(in srgb, var(--teal-bright) 18%, transparent);
}
.workshop-phone[data-wallpaper="glow"] .workshop-phone-content {
  --phone-wallpaper-tint: color-mix(in srgb, var(--screen-glow) 16%, transparent);
}
.workshop-phone[data-wallpaper="wood"] .workshop-phone-content {
  --phone-wallpaper-tint: color-mix(in srgb, var(--wood-light) 20%, transparent);
}
.workshop-phone-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3) var(--space-2);
  padding-top: var(--space-2);
}
.workshop-phone-app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: var(--space-1);
  cursor: pointer;
}
.workshop-phone-app-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 24px;
  line-height: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--wood-light), var(--wood-mid));
  box-shadow: var(--shadow-tile);
  transition: transform var(--duration-fast) var(--ease-standard);
}
.workshop-phone-app-tile:hover .workshop-phone-app-glyph {
  transform: translateY(-2px);
}
.workshop-phone-app-tile:active .workshop-phone-app-glyph {
  transform: translateY(0) scale(0.94);
}
.workshop-phone-app-label {
  font-size: 0.68rem;
  text-align: center;
  color: var(--phone-ink-soft);
}

/* ==========================================================================
   Shared app content patterns
   ========================================================================== */
.workshop-phone-section {
  margin-bottom: var(--space-3);
}
.workshop-phone-section h3 {
  margin: 0 0 6px;
  font-size: var(--text-sm);
}
.workshop-phone-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.workshop-phone-primary-button {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--screen-glow);
  color: #14211d;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
}
.workshop-phone-small-button {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle);
  color: var(--phone-ink);
  cursor: pointer;
  font-size: var(--text-xs);
}
.workshop-phone-small-button:hover {
  background: rgba(127, 216, 196, 0.15);
}
.workshop-phone-small-button.active {
  background: var(--screen-glow);
  color: #14211d;
  border-color: transparent;
}
.workshop-phone-textarea {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle-lighter);
  color: var(--phone-ink);
  font-family: inherit;
  font-size: var(--text-xs);
  resize: vertical;
  box-sizing: border-box;
}
.workshop-phone-textarea:focus {
  outline: none;
  border-color: var(--screen-glow);
}

.workshop-phone-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.workshop-phone-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--phone-surface-subtle-lighter);
}
.workshop-phone-list-row.active {
  outline: 1px solid var(--screen-glow);
}
.workshop-phone-list-label {
  flex: 1;
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workshop-phone-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--phone-border-subtle);
}

.workshop-phone-being-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--phone-surface-subtle-lighter);
  margin-bottom: 6px;
}
.workshop-phone-being-row.despawned {
  opacity: 0.55;
}

.workshop-phone-page-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.workshop-phone-page-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 1px solid var(--phone-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--phone-page-bg);
}

/* ==========================================================================
   Per-app distinctness (Version 3, Phase 13, Wave 2) — "each app should
   read as distinctly itself rather than sharing one visual template."
   Every app below still builds on the shared vocabulary above (sections,
   rows, buttons) — what's here is each app's own small, content-grounded
   departure from it, not a second design system. Grouped by app, in the
   order this wave built them.
   ========================================================================== */

/* Bubble — a companion, not a list or a control panel. A real presence
   dot (the same convention a messaging app's own contact list already
   uses) and a Talk button styled as an actual speech bubble rather than
   the generic full-width rectangle every other app's primary action
   already is. */
.workshop-phone-bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workshop-phone-bubble-header h2 {
  margin: 0;
}
.workshop-phone-presence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--phone-ink-soft); /* sleeping/unknown — the honest default until refreshStatus() sets a real one */
}
.workshop-phone-presence-dot[data-presence="awake"] {
  background: var(--screen-glow);
}
.workshop-phone-presence-dot[data-presence="conversing"] {
  background: var(--brass-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass-bright) 25%, transparent);
}
.workshop-phone-presence-dot[data-presence="connecting"] {
  background: var(--brass);
}
.workshop-phone-presence-dot[data-presence="sleeping"] {
  background: var(--phone-ink-soft);
}
.workshop-phone-talk-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-bottom: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--phone-border-subtle);
  background: var(--screen-glow);
  color: #14211d;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}
.workshop-phone-talk-icon {
  display: flex;
  font-size: 1.1em;
}

/* Wardrobe — a closet, so outfits read as a grid of garments, not a
   scrolling list of rows. The swatch is now the card's own dominant
   surface (a real per-outfit colour, not a small fixed circle), the
   whole card is the tap target, and the active outfit gets a visible
   ring rather than relying on colour alone. */
.workshop-phone-outfit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.workshop-phone-outfit-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%; /* fills its grid row's own height even when a row-mate's longer name makes the row taller */
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--phone-surface-subtle-lighter);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}
.workshop-phone-outfit-card.active {
  border-color: var(--screen-glow);
}
.workshop-phone-outfit-swatch {
  display: block;
  width: 100%;
  height: 44px;
  flex-shrink: 0;
}
.workshop-phone-outfit-name {
  padding: 6px 8px;
  font-size: var(--text-xs);
  color: var(--phone-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Workshop — a portable control panel, so every control reads as an
   icon-forward tile or an icon-prefixed button like a real device's own
   control centre, instead of plain text buttons. Building this surfaced
   a real gap: `aria-pressed` was already being set correctly on the
   weather/lighting/music toggle buttons, but nothing anywhere gave it a
   visible look, so a listener had no way to *see* which option was
   current. Fixed once here for every button in this app that sets it,
   rather than per-button. */
.workshop-phone-control-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.workshop-phone-control-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle);
  color: var(--phone-ink);
  cursor: pointer;
  font-size: var(--text-xs);
  text-align: center;
}
.workshop-phone-control-tile:hover {
  background: rgba(127, 216, 196, 0.15);
}
.workshop-phone-control-tile-icon {
  display: flex;
  font-size: 1.3em;
}
.workshop-phone-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.workshop-phone-icon-button-icon {
  display: flex;
  font-size: 1.1em;
}
/* The "on" look is `.workshop-phone-primary-button`'s own existing
   default (it's always the affirmative highlighted button elsewhere,
   e.g. Wardrobe's "Save Current Outfit") — only a real toggle in its
   explicit "off" state (`aria-pressed="false"`) needs to look different
   from that default, so a non-toggle primary button (no `aria-pressed`
   attribute at all, e.g. "I'm Lost!") is untouched by this rule. */
.workshop-phone-primary-button[aria-pressed="false"] {
  background: var(--phone-surface-subtle);
  color: var(--phone-ink);
}
.workshop-phone-control-tile[aria-pressed="true"],
.workshop-phone-small-button[aria-pressed="true"] {
  background: var(--screen-glow);
  color: #14211d;
  border-color: transparent;
}

/* Beings — "Spawn a Being" reads as a roster, a tap-to-place tile grid
   (the shared paw-print icon, since no per-Being icon exists) rather
   than a plain list of rows. Column count adapts to however many
   Beings exist (unlike Workshop's fixed-count rows above), since a
   library can hold anywhere from one Being to many. */
.workshop-phone-being-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.workshop-phone-being-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle);
  color: var(--phone-ink);
  cursor: pointer;
  font-size: var(--text-xs);
  text-align: center;
}
.workshop-phone-being-tile:hover {
  background: rgba(127, 216, 196, 0.15);
}
.workshop-phone-being-tile-icon {
  display: flex;
  font-size: 1.5em;
}
.workshop-phone-being-tile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Browser — a browser's own chrome, not a settings list: a favicon-style
   mark on every link/bookmark row, a pill-shaped address bar for adding
   one, and a real toolbar (back chevron + page title) over an opened
   page instead of a plain "← Back" text button. */
.workshop-phone-browser-favicon {
  display: flex;
  flex-shrink: 0;
  font-size: 1em;
  color: var(--phone-ink-soft);
}
.workshop-phone-browser-addressbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle-lighter);
}
.workshop-phone-browser-addressbar-icon {
  display: flex;
  flex-shrink: 0;
  font-size: 1em;
  color: var(--phone-ink-soft);
}
.workshop-phone-browser-addressbar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  color: var(--phone-ink);
  font-family: inherit;
  font-size: var(--text-xs);
}
.workshop-phone-browser-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 0;
  border-radius: var(--radius-pill);
  background: var(--phone-surface-subtle-lighter);
  flex-shrink: 0;
}
.workshop-phone-browser-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--phone-ink);
  cursor: pointer;
  font-size: 1.2em;
  flex-shrink: 0;
}
.workshop-phone-browser-back-button:hover {
  background: rgba(127, 216, 196, 0.15);
}
.workshop-phone-browser-toolbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--phone-ink-soft);
}

/* Emotes — the same tap-to-trigger tile grid as Beings' own roster (the
   shared sparkle icon, since no per-gesture icon exists). */
.workshop-phone-emotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.workshop-phone-emotes-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  background: var(--phone-surface-subtle);
  color: var(--phone-ink);
  cursor: pointer;
  font-size: var(--text-xs);
  text-align: center;
}
.workshop-phone-emotes-tile:hover {
  background: rgba(127, 216, 196, 0.15);
}
.workshop-phone-emotes-tile-icon {
  display: flex;
  font-size: 1.5em;
}
.workshop-phone-emotes-tile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Settings — deliberately the plainest app of the wave (see the file's
   own comment): every control stays a slider, checkbox, or toggle row.
   The one touch is the same small identity mark next to the heading
   every other app in this wave now carries. */
.workshop-phone-settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workshop-phone-settings-header h2 {
  margin: 0;
}
.workshop-phone-settings-header-icon {
  display: flex;
  font-size: 1.2em;
  color: var(--phone-ink-soft);
}

/* Version 4, Phase 3 ("The Phone's Settings, Made Real") — "live
   wallpaper previews instead of a generic dropdown." A real colour chip
   per option (the exact gradient formula `.workshop-phone-content` itself
   renders, see `SettingsPhoneApp.js`'s own `buildWallpaperPicker()`),
   not a text-labelled button — genuinely reads as picking a wallpaper,
   not choosing an item from a list. */
.workshop-phone-wallpaper-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-2);
}
.workshop-phone-wallpaper-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
}
.workshop-phone-wallpaper-swatch-chip {
  display: block;
  width: 44px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--phone-border-subtle);
  transition: box-shadow var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.workshop-phone-wallpaper-swatch:hover .workshop-phone-wallpaper-swatch-chip {
  border-color: var(--screen-glow);
}
.workshop-phone-wallpaper-swatch.active .workshop-phone-wallpaper-swatch-chip {
  border-color: var(--screen-glow);
  box-shadow: 0 0 0 2px var(--screen-glow);
}
.workshop-phone-wallpaper-swatch-label {
  font-size: 0.68rem;
  color: var(--phone-ink-soft);
}

/* Same live-swatch idea, reusing `.workshop-phone-swatch` (Wardrobe's own
   circular colour chip) rather than a second bespoke style — sized up
   slightly from its usual 16px list-row context, since here it's the
   primary control, not a secondary decoration next to a name. */
.workshop-phone-border-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.workshop-phone-border-swatch-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-pill);
  color: var(--phone-ink);
  font-size: var(--text-xs);
  cursor: pointer;
}
.workshop-phone-border-swatch-button:hover,
.workshop-phone-border-swatch-button.active {
  background: var(--phone-surface-subtle);
}
.workshop-phone-border-swatch {
  width: 20px;
  height: 20px;
}
.workshop-phone-border-swatch-button.active .workshop-phone-border-swatch {
  box-shadow: 0 0 0 2px var(--screen-glow);
}
