/* Theme layer: the app's colour tokens, on Araya's values (ds.css holds the system's own tokens and the switches). The map's sage stays here: --accent, --glow-rgb. */
:root{--bg:#fafafa;--bg-rgb:250,250,250;--ink:#333333;--ink-rgb:51,51,51;--accent:#4b5540;--accent-rgb:75,85,64;--glow-rgb:118,134,94;--artist-bg:#ededed;--hole:var(--bg);--grey-a:.7;--panel:#f3f3f3;--scrim:rgba(51,51,51,.3);color-scheme:light}
html[data-theme=dark]{--bg:#111111;--bg-rgb:17,17,17;--ink:#e2e2e2;--ink-rgb:226,226,226;--accent:#a2b18d;--accent-rgb:162,177,141;--glow-rgb:162,177,141;--artist-bg:#1c1c1c;--hole:var(--bg);--grey-a:.8;--panel:#1c1c1c;--scrim:rgba(0,0,0,.55);color-scheme:dark}

/* The theme switch: under the drift button, same linework family. */
.theme-entry{position:fixed;right:calc(env(safe-area-inset-right) + 14px);top:calc(env(safe-area-inset-top) + 158px);z-index:4;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:var(--ink);cursor:pointer;opacity:.38;transition:opacity .3s,color .3s}
.globe-entry[hidden]+.artists-entry+.drift-entry+.theme-entry,.drift-entry[hidden]+.theme-entry{top:calc(env(safe-area-inset-top) + 110px)}
.globe-entry[hidden]+.artists-entry+.drift-entry[hidden]+.theme-entry{top:calc(env(safe-area-inset-top) + 62px)}
.artists-entry[hidden]+.drift-entry+.theme-entry{top:calc(env(safe-area-inset-top) + 110px)}
.artists-entry[hidden]+.drift-entry[hidden]+.theme-entry,.globe-entry[hidden]+.artists-entry[hidden]+.drift-entry+.theme-entry{top:calc(env(safe-area-inset-top) + 62px)}
.globe-entry[hidden]+.artists-entry[hidden]+.drift-entry[hidden]+.theme-entry{top:calc(env(safe-area-inset-top) + 14px)}
.theme-entry svg{display:block;width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
.theme-entry:hover,.theme-entry:focus-visible{opacity:.9}.theme-entry:focus-visible{outline:var(--ds-focus)}
/* The door to the room: under the theme switch, one step below wherever that sits. The count stands to its left. */
.chat-entry{position:fixed;right:calc(env(safe-area-inset-right) + 14px);top:calc(env(safe-area-inset-top) + 206px);z-index:4;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:var(--ink);cursor:pointer;opacity:.38;transition:opacity .3s,color .3s}
.globe-entry[hidden]+.artists-entry+.drift-entry+.theme-entry+.chat-entry,.drift-entry[hidden]+.theme-entry+.chat-entry{top:calc(env(safe-area-inset-top) + 158px)}
.globe-entry[hidden]+.artists-entry+.drift-entry[hidden]+.theme-entry+.chat-entry{top:calc(env(safe-area-inset-top) + 110px)}
.artists-entry[hidden]+.drift-entry+.theme-entry+.chat-entry{top:calc(env(safe-area-inset-top) + 158px)}
.artists-entry[hidden]+.drift-entry[hidden]+.theme-entry+.chat-entry,.globe-entry[hidden]+.artists-entry[hidden]+.drift-entry+.theme-entry+.chat-entry{top:calc(env(safe-area-inset-top) + 110px)}
.globe-entry[hidden]+.artists-entry[hidden]+.drift-entry[hidden]+.theme-entry+.chat-entry{top:calc(env(safe-area-inset-top) + 62px)}
.chat-entry svg{display:block;width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
.chat-entry .n{position:absolute;right:100%;top:50%;transform:translateY(-50%);margin-right:-3px;font:400 11px/1 var(--ds-voice);font-variant-numeric:tabular-nums;letter-spacing:var(--ds-voice-track);pointer-events:none}
.chat-entry.company{color:var(--accent);opacity:.85}
.chat-entry:hover,.chat-entry:focus-visible{opacity:.9}.chat-entry:focus-visible{outline:var(--ds-focus)}
#app:has(.stage:not([hidden])) .chat-entry{opacity:0;pointer-events:none;visibility:hidden;transition:opacity .3s,visibility 0s .3s}
#app:has(.stage:not([hidden])) .theme-entry{opacity:0;pointer-events:none;visibility:hidden;transition:opacity .3s,visibility 0s .3s}

/* Light only: faces are a quiet ink-wash, and text the shared (dark) alphas leave too faint is raised. */
:root:not([data-theme=dark]).calm .rec.lead{box-shadow:0 3px 8px rgba(24,33,23,.18),0 1px 2px rgba(17,17,19,.1)}
:root:not([data-theme=dark]).calm .place:before{background:rgba(var(--ink-rgb),.8)}
:root:not([data-theme=dark]).calm .place>.face{filter:grayscale(1) brightness(1.55) contrast(.5) sepia(.3) hue-rotate(38deg) saturate(.6) opacity(.62)}
:root:not([data-theme=dark]).calm .place>div.face{filter:brightness(1.7) contrast(.45) saturate(.5) sepia(.2) opacity(.6)}
:root:not([data-theme=dark]).calm .beacon.down>.eye{filter:grayscale(1) brightness(1.55) contrast(.5) sepia(.3) hue-rotate(38deg) saturate(.6) opacity(.62)}
:root:not([data-theme=dark]).calm .place.hot>.face,:root:not([data-theme=dark]).calm .place.hot>div.face{filter:none}
:root:not([data-theme=dark]) .nowline .where{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .nowline>button>.card>.l{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .nowline>button>.card .c{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .nowline .co{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .reasonline{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .reasonline .where{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .cap>i{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .sheet-line{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) span.sheet-chip{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .join-field input::placeholder{color:rgba(var(--ink-rgb),.72)}

:root:not([data-theme=dark]) .sheet-more{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .sheet-report{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .mod-by{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .mod-ctx{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .mod-empty{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .mod-note{color:rgba(var(--ink-rgb),.8)}
:root:not([data-theme=dark]) .mod-tab:not([aria-selected=true]){color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .mod-chip:not(.hide){color:rgba(var(--ink-rgb),.82)}
/* the corner marks: .38 is under 3:1 on paper (hover, focus and .on keep their own, higher, values) */
:root:not([data-theme=dark]) :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry:not(.company),.friend-entry,.join-entry,.import-entry):not(:hover):not(:focus-visible):not(.on):not(.busy){opacity:.6}
/* a switch is instant: the ground does not crossfade for 1.8 s while everything else snaps (focus tints keep their ease) */
html.theme-switch .map,html.theme-switch body{transition:none}
:root:not([data-theme=dark]) .cap>i.m{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .stage-info .si-line{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .stage-info .si-chip{color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .nowline>.grip{opacity:.5}
/* Grey until heard (heard.js): on the dark ground a faded dark cover all but vanishes, so dark fades a little less. */
html[data-theme=dark] .rec:not(.lit)>img,html[data-theme=dark] .sleeve:not(.lit){filter:grayscale(1) opacity(.8)}
html[data-theme=dark] .map-greys>.rec>img{filter:none} /* (round 27: the group is greyscale as a whole, each cover keeps its fade: --grey-a) */

/* quiet small texts raised to AA on paper (dark keeps its values) */
:root:not([data-theme=dark]) .kp-vis:not(.public){color:rgba(var(--ink-rgb),.72)}
:root:not([data-theme=dark]) .fb-attach small{opacity:.66}
:root:not([data-theme=dark]) :is(.alpha-word,.alpha-static){color:rgba(var(--ink-rgb),.72)}

/* Desktop controls (map-design A7): a little firmer at rest (.6), and each says its word in a die-cut chip on hover and keyboard focus
   (data-label; the aria-label carries the same word). Right-hand column: the chip stands to the left; the bottom-left row: above. */
@media (min-width:600px){
  :root :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry:not(.company),.friend-entry,.join-entry,.import-entry,.you-entry):not(:hover):not(:focus-visible):not(.on):not(.busy){opacity:.6}
  :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry,.import-entry,.you-entry)[data-label]::after{content:attr(data-label);position:absolute;z-index:1;box-sizing:border-box;padding:5px 12px 6px 10px;border:var(--ds-edge);border-radius:var(--ds-r-field);background:var(--ds-cut-bg),var(--panel);clip-path:var(--ds-cut-tr);color:var(--ink);font:400 11px/1.3 var(--ds-voice);letter-spacing:var(--ds-voice-track);white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s}
  /* (below the control, right-aligned: never over the ◉ N mark left of the globe nor Chat's count) */
  :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry)[data-label]::after{right:0;top:calc(100% - 8px)}
  :is(.import-entry,.you-entry)[data-label]::after{left:50%;bottom:calc(100% - 2px);transform:translateX(-50%)}
  :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry,.import-entry,.you-entry)[data-label]:is(:hover,:focus-visible)::after{opacity:1}
  :is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry,.import-entry,.you-entry)[data-label]:focus-visible{clip-path:none}
  /* One S mark: the bottom-left S becomes a text button, Join. */
  .join-entry{width:auto;min-width:44px;padding:0 14px;border-radius:0;color:var(--ink);font:400 12px/44px var(--ds-voice);letter-spacing:var(--ds-voice-track);text-align:center}
  .join-entry:before{content:attr(data-label);position:static;inset:auto;background:none;-webkit-mask:none;mask:none;transform:none}
}
@media (prefers-reduced-motion:reduce){:is(.globe-entry,.lens-entry,.wall-entry,.artists-entry,.drift-entry,.theme-entry,.chat-entry,.import-entry,.you-entry)[data-label]::after{transition:none}}

