/* =========================================================================
   Claudia at Boop — the shell: her desktop (tools/claudia/DESKTOP.md).
   One screen, nothing to scroll: a headline that can be knocked to pieces, the
   remote that plays her, the black box, and her, dancing. A menu bar and her windows float over it.
   The kit (tokens, type, buttons) is kit.css.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cl { margin: 0; font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; overscroll-behavior: none;
  --m: clamp(20px, 4.5vw, 76px); --bar: 52px; transition: background-color .45s var(--ease), color .45s var(--ease); }
body.cl ::selection { background: var(--clay); color: var(--ink); }
:where(.cl) a { color: inherit; }
:where(.cl) :is(p, h1, h2, ol, dl, figure) { margin: 0; }
:where(.cl) ol { padding: 0; list-style: none; }
:where(.cl) button { font: inherit; }
.cl-skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 8px; transition: top .2s; }
.cl-skip:focus { top: 12px; }
.cl-nojs { position: fixed; inset: auto 0 0 0; z-index: 99; margin: 0; padding: 16px var(--m); background: var(--ink); color: var(--cream); font: 400 15px/1.5 var(--sans); }

/* ---------- the menu bar ---------- */
.cl-bar { position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 70; display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 0 clamp(14px, 2.4vw, 32px); color: var(--bar-fg, var(--ink)); background: color-mix(in srgb, var(--bar-bg, var(--cream)) 95%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bar-fg, var(--ink)) 16%, transparent);
  transition: color .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease); }
.cl-bar > * { pointer-events: auto; }
body[data-bar="ink"] .cl-bar { --bar-fg: var(--cream); --bar-bg: var(--ink); }
.cl-lockup { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; justify-self: start; }
.cl-lockup__mark { height: 24px; width: auto; overflow: visible; }
.cl-lockup__mark .m { fill: currentColor; transition: fill .35s var(--ease); }
.cl-lockup__mark .s { fill: var(--clay); transform-origin: 100px 50px; transition: transform .5s var(--ease); }
.cl-lockup:hover .cl-lockup__mark .s { transform: rotate(45deg) scale(1.15); }
.cl-lockup__word { font: 600 21px/1 var(--sans); letter-spacing: -.03em; }
.cl-bar__tools { justify-self: end; display: flex; gap: 6px; }
.cl-tool { appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 4px; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 34%, transparent); background: transparent; color: inherit;
  font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: border-color .2s, background .2s, color .2s; }
.cl-tool:hover { border-color: currentColor; }
.cl-tool:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.cl-tool__dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; transition: background .2s, border-color .2s; }
.cl-tool[aria-pressed="true"] .cl-tool__dot { background: var(--clay); border-color: var(--clay); }
/* the way to the other page: the one plain, unmistakable link in the bar */
.cl-tool--go { height: 32px; padding: 0 13px; gap: 9px; border-color: currentColor; text-decoration: none; font-weight: 500; font-size: 11.5px; }
.cl-tool--go i { font: 400 14px/1 system-ui, sans-serif; font-style: normal; transition: transform .15s var(--ease); }
.cl-tool--go > span { white-space: nowrap; }
.cl-tool--go:hover { background: var(--ink); color: var(--cream); }
.cl-tool--go:hover i { transform: translateX(3px); }
.cl-tool--fill { height: 32px; padding: 0 14px; font-weight: 500; font-size: 11.5px; background: var(--bar-fg, var(--ink)); color: var(--bar-bg, var(--cream)); border-color: transparent; }
.cl-tool--fill:hover { background: var(--clay); color: var(--ink); }

/* ---------- her desktop: one fixed screen ---------- */
.desk { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: transparent; }
.desk__ground { position: absolute; inset: 0; background: var(--bg); transition: background-color .45s var(--ease); }
/* the floor she stands on: a hairline with a tick every thirtieth */
.desk__ground::after { content: ""; position: absolute; left: 0; right: 0; top: var(--floor, 86%); height: 7px; border-top: 1px solid var(--fg); opacity: .42;
  background: repeating-linear-gradient(90deg, var(--fg) 0 1px, transparent 1px 3.3333%) top / 100% 5px no-repeat; }
/* the left of the desktop: what she says she does, and under it the shelf */
.desk__col { position: absolute; left: var(--m); top: calc(var(--bar) + clamp(14px, 4.4vh, 46px)); bottom: calc(100% - var(--floor, 86%) + 22px); width: min(58vw, 900px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; transition: opacity .18s var(--ease); }      /* no z-index: a loose letter blends with the whole desktop (play.css) */
.desk__words { display: grid; gap: clamp(8px, 1.7vh, 18px); align-content: start; }
.desk__line { margin: 0; max-width: 7.4em; font: 700 clamp(40px, min(7.5vw, 13.4vh), 124px)/.93 var(--display); letter-spacing: -.045em; text-wrap: balance; }
.desk__sub { max-width: 29em; font: 400 clamp(17px, min(1.68vw, 2.9vh), 25px)/1.28 var(--serif); letter-spacing: -.004em; text-wrap: pretty; }
.desk__foot { position: absolute; left: var(--m); right: var(--m); top: calc(var(--floor, 86%) + 14px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px; z-index: 3; }
/* the keys at the foot: her windows, the other page, and the ways out. Each says what it does and answers at once */
.fn { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 6px; min-width: 0; margin: -4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.fn::-webkit-scrollbar { display: none; }
.fn__key { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px; border: 1px solid var(--ink); border-radius: 4px; background: var(--cream); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; -webkit-tap-highlight-color: transparent; transition: background-color .08s, color .08s, transform .05s; }
.fn__key span { font-weight: 400; color: var(--clay-deep); }
.fn__key em { font: 400 13px/1 system-ui, sans-serif; font-style: normal; }
.fn__key:hover, .fn__key.is-on { background: var(--ink); color: var(--cream); }
.fn__key:hover span, .fn__key.is-on span { color: var(--clay); }
.fn__key:active { transform: translateY(1px); background: var(--clay); color: var(--ink); }
.fn__key:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.fn__key--out { border-color: color-mix(in srgb, var(--ink) 38%, transparent); }
.fn__ico--play { width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.fn__ico--rec { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); }
.fn__gap { width: 10px; }
/* the small print has the whole second line to itself; a message about the sign-up takes that line's right end */
.desk__foot .fine { grid-column: 1 / -1; grid-row: 2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk__foot.has-note .fine { grid-column: 1; }
/* the newsletter: Boop's own sign-up (api/newsletter.js), as a field and a key (js/os/signup.js) */
.nl { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.nl__lead { margin-right: 4px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.nl__email { appearance: none; -webkit-appearance: none; box-sizing: border-box; width: clamp(170px, 15.5vw, 236px); height: 30px; margin: 0; padding: 0 10px; border: 1px solid var(--ink); border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 5%, var(--cream)); color: var(--ink); font: 400 12px/1 var(--mono); letter-spacing: .01em; user-select: text; -webkit-user-select: text; }
.nl__email::placeholder { color: color-mix(in srgb, var(--ink) 52%, transparent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: 1; }
.nl__email:focus { outline: 2px solid var(--clay); outline-offset: 1px; background: var(--cream); }
.nl__go { justify-content: center; background: var(--ink); color: var(--cream); }
.nl__go:hover { background: var(--clay); color: var(--ink); }
.nl__go:disabled { cursor: default; background: var(--clay); color: var(--ink); transform: none; }
.nl.is-sending .nl__email { opacity: .55; }
.nl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl__done { display: none; align-items: center; gap: 8px; height: 30px; padding: 0 11px; border: 1px solid var(--ink); border-radius: 4px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.nl__done::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); }
.nl.is-done .nl__lead, .nl.is-done .nl__email, .nl.is-done .nl__go { display: none; }
.nl.is-done .nl__done { display: inline-flex; }
.nl__note { grid-column: 2; grid-row: 2; justify-self: end; margin: 0; font: 400 10px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--clay-deep); white-space: nowrap; }
.nl__note:empty { display: none; }
@media (max-width: 1339px) { .desk__foot.has-note .fine__more { display: none; } }
@media (max-width: 1239px) and (min-width: 900px) { .nl__lead { display: none; } }
@media (max-width: 1099px) and (min-width: 900px) { .desk__foot { column-gap: 14px; } .desk__foot .fine { font-size: 9px; } .fn__key { padding: 0 9px; gap: 6px; } .nl__email { width: 150px; } }
/* the toys' layer: a real coin, a real ball, a real robot dog, over the page and in front of her (the coin leaves her hand) */
.cl-toys { position: fixed; inset: 0; z-index: 61; pointer-events: none; }
/* while she is inside a game she is its piece: the game takes the pointer, not her */
.is-ingame .cl-herhit { pointer-events: none; }

/* ---------- windows ---------- */
.cl-desk { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.win { position: absolute; display: grid; grid-template-rows: 36px minmax(0, 1fr); border: 1px solid var(--ink); border-radius: 6px; overflow: hidden; pointer-events: auto;
  box-shadow: 0 1px 0 rgba(15, 15, 13, .04), 0 22px 60px -12px rgba(15, 15, 13, .32); opacity: 0; transform: translateY(6px);
  transition: opacity .09s linear, transform .14s var(--ease), box-shadow .2s; will-change: transform; }     /* it is there inside a tenth of a second */
.win.is-open { opacity: 1; transform: none; }
.win.is-closing { opacity: 0; transform: translateY(10px) scale(.98); pointer-events: none; }
.win.on-ink { border-color: #4a4842; }
.win__bar { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--fg); cursor: grab; user-select: none; touch-action: none; background: var(--bg); color: var(--fg); transition: background .2s, color .2s; }
.win.on-ink .win__bar { border-bottom-color: #4a4842; }
.win.is-front .win__bar { background: var(--fg); color: var(--bg); }
.win__bar:active { cursor: grabbing; }
.win__code { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.win.is-front .win__code { color: var(--clay); }
.win__title { flex: 1; min-width: 0; font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.win__x { appearance: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font: 400 15px/1 var(--mono); }
.win__x:hover { background: var(--clay); color: var(--ink); }
.win__body { position: relative; overflow: auto; background: var(--bg); color: var(--fg); overscroll-behavior: contain; }
.win__body.is-loading::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 34%; background: var(--clay); animation: win-load .7s linear infinite; }
@keyframes win-load { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.win.is-dragging { transition: none; box-shadow: 0 34px 80px -14px rgba(15, 15, 13, .42); }

/* ---------- her ---------- */
.cl-her { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100svh; z-index: 60; pointer-events: none; display: block; transition: opacity .12s linear; }
/* another film's dancer in her place (js/os/looks.js) */
.cl-her.is-away { opacity: 0; transition: opacity .2s linear; }
.look { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .2s linear; will-change: transform; }
.look.is-on { opacity: 1; }
.cl-herhit { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 61; cursor: grab; touch-action: none; border-radius: 40% 40% 12px 12px; -webkit-tap-highlight-color: transparent; outline: none; }
.cl-herhit.is-turn { cursor: ew-resize; touch-action: pan-y; }
.cl-herhit:active { cursor: grabbing; }
.cl-herhit:focus-visible { outline: 2px solid var(--clay); outline-offset: 4px; }
.cl-bubble { position: fixed; left: 0; top: 0; z-index: 62; max-width: min(330px, calc(100vw - 32px)); padding: 12px 15px 13px; border: 1px solid var(--ink); border-radius: 16px 16px 16px 3px; background: var(--paper); color: var(--ink);
  box-shadow: 0 14px 36px -12px rgba(15, 15, 13, .35); opacity: 0; transform: translateY(8px) scale(.97); transform-origin: 0 100%; transition: opacity .2s var(--ease); pointer-events: none; }      /* its place is set every frame from her head: it must not glide there from where it last was */
.cl-bubble.is-right { border-radius: 16px 16px 3px 16px; transform-origin: 100% 100%; }
/* a narrow window: the space between the page's words and her head is narrow too, so what she says is set narrower */
@media (max-width: 1260px) and (min-width: 900px) { .cl-bubble { max-width: clamp(240px, 26vw, 330px); } }
.cl-bubble.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cl-bubble p { font: 400 19px/1.28 var(--serif); letter-spacing: 0; }
.cl-bubble p .caret { display: inline-block; width: 1px; height: .95em; margin-left: 2px; background: var(--clay); vertical-align: -2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* a ring where she is poked */
.cl-glass { position: fixed; inset: 0; z-index: 59; pointer-events: none; overflow: hidden; }
.ring { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 1.5px solid var(--clay); animation: ring 1s var(--ease) forwards; }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(46); opacity: 0; border-width: .05px; } }
.cl.is-booped .desk__words { animation: wobble .5s var(--ease); }
@keyframes wobble { 0% { transform: none; } 22% { transform: scale(1.006) translateY(-3px); } 55% { transform: scale(.998) translateY(1px); } 100% { transform: none; } }

/* share sheet */
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(15, 15, 13, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.sheet.is-on { opacity: 1; }
.sheet__in { width: min(560px, 100%); display: grid; gap: 14px; }
.sheet__card { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); background: var(--cream); }
.sheet__row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sheet .btn { --fg: var(--cream); --bg: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 1340px) {
  .cl-bar__status { display: none; }
  .cl-bar { grid-template-columns: 1fr auto; }
}
@media (max-width: 899px) {
  .cl-tool { height: 28px; padding: 0 9px; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }
  .cl-bar { padding: 0 12px; }
  .cl-bar__tools { gap: 5px; }
  .cl-tool--go { padding: 0 9px; gap: 6px; }
  .cl-tool__more { display: none; }             /* "Talk to us" is "Talk" where the bar is short */
  #t-songs { display: none; }                     /* the footer has it */
  .cl-bubble { max-width: min(250px, calc(100vw - 32px)); padding: 10px 12px 11px; }
  .cl-bubble p { font-size: 17px; }
  .win { left: 6px !important; right: 6px; top: auto !important; bottom: 10px; width: auto !important; height: min(74svh, 640px) !important; }
  /* stacked: the headline beside her, the floor, and under the floor the shelf */
  .desk__col { display: contents; }
  .desk__words { position: absolute; left: 16px; top: calc(var(--bar) + 14px); width: 54vw; transition: opacity .18s var(--ease); }
  .desk__line { font-size: clamp(32px, 11.4vw, 86px); }
  .desk__sub { display: none; }                     /* she says it herself */
  .deck { position: absolute; left: 12px; right: 12px; top: calc(var(--floor, 60%) + 14px); transition: opacity .18s var(--ease); }
  .desk__foot { left: 12px; right: 12px; top: auto; bottom: max(8px, env(safe-area-inset-bottom)); display: flex; gap: 5px; flex-direction: column; align-items: stretch; }
  .fn { gap: 5px; margin: 0; padding: 0; }
  .nl { gap: 5px; }
  .nl__lead { font-size: 10px; letter-spacing: .06em; margin-right: 2px; }
  .nl__email { flex: 1 1 auto; width: auto; min-width: 0; height: 32px; padding: 0 9px; font-size: 16px; letter-spacing: 0; }   /* 16px: a phone zooms the page in on a smaller field */
  .nl__email::placeholder { font-size: 10px; letter-spacing: .06em; }
  .nl__go, .nl__done { height: 32px; }
  .nl__done { flex: 1 1 auto; font-size: 10px; letter-spacing: .06em; }
  .nl__note { justify-self: auto; white-space: normal; font-size: 9px; }
  .desk__foot.has-note .fine { display: none; }
  .fn__key { height: 28px; padding: 0 9px; font-size: 10px; letter-spacing: .06em; flex: 0 0 auto; }
  .fn__gap { display: none; }
  .desk__foot .fine { font-size: 9px; }
  .desk__foot .fine__more { display: none; }
}
@media (max-width: 350px) { .cl-bar__tools { gap: 4px; } .cl-tool, .cl-tool--go { padding: 0 8px; } .cl-tool--go i { display: none; } }   /* the smallest phones: the bar's keys lose their arrows */
@media (max-width: 899px) and (max-height: 600px) { .desk__foot .fine { display: none; } }
/* a short phone screen: the headline takes two lines, what she says is set smaller, and the foot is its keys and the field */
@media (max-width: 899px) and (max-height: 780px) {
  .desk__words { width: 64vw; top: calc(var(--bar) + 10px); }
  .desk__line { font-size: clamp(27px, 8.4vw, 56px); max-width: 6.3em; }
  .desk__foot { gap: 4px; }
  .desk__foot .fine { display: none; }
  .fn__key { height: 26px; }
  .nl__email, .nl__go, .nl__done { height: 30px; }
  .cl-bubble { max-width: min(230px, calc(100vw - 32px)); padding: 8px 11px 9px; }
  .cl-bubble p { font-size: 15.5px; }
}

