/* Bismillah
   Atkinson Hyperlegible, drawn by the Braille Institute so I/l/1 and O/0
   cannot be mistaken for one another. Carried here rather than shared, so
   this folder is complete on its own. Licence in OFL.txt. */

@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ================= TOKENS ================= */
:root{
  --yd-font: 'YD Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --yd-r-sm: 10px;
  --yd-r-md: 14px;
  --yd-r-lg: 20px;
  --yd-r-pill: 999px;

  --yd-gap: 14px;
  --yd-pad: 20px;

  --yd-top: 58px;
  --yd-rail: 218px;
  --yd-panel: 292px;
  --yd-status: 30px;

  --yd-t: .16s cubic-bezier(.4,0,.2,1);
}

/* ---------- DARK (default) ---------- */
:root, :root[data-theme="dark"]{
  /* Tells the browser this page handles light and dark itself. Without it a
     browser set to darken pages automatically repaints the background behind
     our back, and the light theme comes out with a near black body while
     every token still says cream. It also makes scrollbars and form controls
     follow the theme instead of the system. */
  color-scheme: dark;

  --yd-bg:        #0E0E0F;
  --yd-surface:   #161618;
  --yd-surface-2: #1D1D20;
  --yd-border:    #2A2A2E;
  --yd-border-hi: #3A3A40;
  --yd-text:      #EDEBE8;
  --yd-text-dim:  #97938D;
  --yd-text-faint:#5E5B57;

  --yd-accent:    #D8B56B;
  --yd-accent-hi: #E8C983;
  --yd-accent-lo: #9C7C33;
  --yd-on-accent: #17140C;

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 12px 20px rgba(0,0,0,.50);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 10px rgba(0,0,0,.45);
  --yd-card:   0 1px 0 rgba(255,255,255,.03) inset;
  /* The line that marks a thing as hovered or focused. Gold sits well on
     near black, so here it is the accent. See the light theme. */
  --yd-edge:   var(--yd-accent);
  --yd-ring:   0 0 0 3px rgba(216,181,107,.28);
  --yd-dot:    rgba(255,255,255,.06);
}

/* ---------- LIGHT ---------- */
:root[data-theme="light"]{
  color-scheme: light;

  --yd-bg:        #F5F3EF;
  --yd-surface:   #FFFFFF;
  --yd-surface-2: #EFECE5;
  --yd-border:    #DFDAD1;
  --yd-border-hi: #C9C2B6;
  --yd-text:      #1A1917;
  --yd-text-dim:  #6C6862;
  --yd-text-faint:#9A958D;

  --yd-accent:    #CBA65A;
  --yd-accent-hi: #DEBB72;
  --yd-accent-lo: #8E6C26;
  --yd-on-accent: #1A1408;

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 10px 18px rgba(80,62,20,.22);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 8px rgba(80,62,20,.18);
  --yd-card:   0 1px 2px rgba(60,50,30,.05);
  /* Gold on cream is the worst of both: too pale to see at a hairline and
     too warm to pass as quiet. A plain dark line does the job. */
  --yd-edge:   var(--yd-text);
  --yd-ring:   0 0 0 3px rgba(26,25,23,.16);
  --yd-dot:    rgba(0,0,0,.07);
}

/* ================= SHELL ================= */
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  background:var(--yd-bg); color:var(--yd-text);
  font-family:var(--yd-font); font-weight:400; font-size:14px; line-height:1.55;
  -webkit-font-smoothing:antialiased; overflow:hidden;
  transition:background var(--yd-t), color var(--yd-t);
}
h1,h2,h3{ margin:0; font-weight:500; letter-spacing:-.01em; }
p{ margin:0; }
::-webkit-scrollbar{ width:9px; height:9px; }
::-webkit-scrollbar-thumb{ background:var(--yd-border-hi); border-radius:var(--yd-r-pill); }
::-webkit-scrollbar-track{ background:transparent; }

.yd-shell{ height:100%; display:flex; flex-direction:column; }
.yd-mid{ flex:1; display:flex; min-height:0; }
.yd-sp{ flex:1; }

.yd-top{
  height:var(--yd-top); flex:none; display:flex; align-items:center; gap:14px;
  padding:0 18px; background:var(--yd-surface); border-bottom:1px solid var(--yd-border);
}
.yd-brand{ display:flex; align-items:baseline; gap:9px; min-width:0; }
.yd-brand .mark{ align-self:center; flex:none; }
.yd-brand .name{ font-weight:500; font-size:15px; letter-spacing:.01em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.yd-brand .by{ font-size:11.5px; font-weight:300; color:var(--yd-text-faint);
  white-space:nowrap; letter-spacing:.02em; }
.yd-brand .by b{ font-weight:500; color:var(--yd-text-dim); }
.yd-menu{ display:flex; gap:2px; margin-left:10px; }
.yd-menu button{ font:400 13px/1 var(--yd-font); padding:8px 12px; border:0;
  border-radius:var(--yd-r-sm); background:transparent; color:var(--yd-text-dim);
  cursor:pointer; transition:var(--yd-t); }
.yd-menu button:hover{ background:var(--yd-surface-2); color:var(--yd-text); }

.yd-rail{ width:var(--yd-rail); flex:none; padding:14px 12px; overflow:auto;
  background:var(--yd-bg); border-right:1px solid var(--yd-border);
  display:flex; flex-direction:column; gap:3px; }
.yd-rail .grp{ font-size:10px; font-weight:500; letter-spacing:.16em; text-transform:uppercase;
  color:var(--yd-text-faint); padding:14px 10px 7px; }
.yd-nav{ display:flex; align-items:center; gap:11px; width:100%;
  font:400 13.5px/1 var(--yd-font); text-align:left; padding:11px 12px; border:0;
  border-radius:var(--yd-r-sm); background:transparent; color:var(--yd-text-dim);
  cursor:pointer; transition:var(--yd-t); }
.yd-nav svg{ flex:none; opacity:.85; }
.yd-nav:hover{ background:var(--yd-surface); color:var(--yd-text); }
.yd-nav[aria-current="true"]{ background:var(--yd-surface); color:var(--yd-accent); font-weight:500; }
.yd-nav[aria-current="true"] svg{ opacity:1; }

.yd-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.yd-bar{ flex:none; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:12px 18px; border-bottom:1px solid var(--yd-border); background:var(--yd-bg); }
.yd-stage{ flex:1; min-height:0; overflow:auto; padding:clamp(18px,3vw,34px);
  display:grid; place-items:center;
  background:
    radial-gradient(circle at 1px 1px, var(--yd-dot) 1px, transparent 0) 0 0/22px 22px,
    var(--yd-bg); }

.yd-panel{ width:var(--yd-panel); flex:none; overflow:auto; padding:var(--yd-pad);
  background:var(--yd-surface); border-left:1px solid var(--yd-border);
  display:flex; flex-direction:column; gap:20px; }
.yd-sec-h{ display:flex; align-items:center; gap:10px;
  font-size:10px; font-weight:500; letter-spacing:.16em; text-transform:uppercase;
  color:var(--yd-text-faint); margin-bottom:12px; }
.yd-sec-h::after{ content:""; flex:1; height:1px; background:var(--yd-border); }

.yd-status{ height:var(--yd-status); flex:none; display:flex; align-items:center; gap:12px;
  padding:0 18px; font-size:11.5px; color:var(--yd-text-faint);
  background:var(--yd-surface); border-top:1px solid var(--yd-border); }
.yd-status .dot{ width:6px; height:6px; border-radius:50%; background:var(--yd-accent); flex:none; }

/* ================= COMPONENTS ================= */
.yd-btn{
  font-family:inherit; font-size:14px; font-weight:500; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 22px; border:0; border-radius:var(--yd-r-md);
  color:var(--yd-on-accent);
  background:linear-gradient(180deg, var(--yd-accent-hi), var(--yd-accent));
  box-shadow:var(--yd-lift); cursor:pointer; min-height:44px;
  transition:transform var(--yd-t), box-shadow var(--yd-t), filter var(--yd-t);
}
.yd-btn:hover{ filter:brightness(1.05); }
.yd-btn:active{ transform:translateY(4px); box-shadow:var(--yd-lift-a); }
.yd-btn:focus-visible{ outline:0; box-shadow:var(--yd-lift), var(--yd-ring); }
.yd-btn[disabled]{ opacity:.38; pointer-events:none; }
.yd-btn.wide{ width:100%; }
.yd-btn.sm{ padding:10px 16px; font-size:13px; min-height:38px;
  box-shadow:0 4px 0 var(--yd-accent-lo), 0 8px 14px rgba(0,0,0,.4); }
.yd-btn.icon{ padding:0; width:44px; border-radius:var(--yd-r-pill); }

.yd-btn2{
  font-family:inherit; font-size:14px; font-weight:400; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 20px; border-radius:var(--yd-r-md); min-height:44px;
  color:var(--yd-text); background:var(--yd-bg);
  border:1px solid var(--yd-border-hi); cursor:pointer; transition:var(--yd-t);
}
.yd-btn2:hover{ background:var(--yd-surface-2); border-color:var(--yd-edge); color:var(--yd-edge); }
.yd-btn2:active{ transform:translateY(1px); }
.yd-btn2.sm{ padding:10px 14px; font-size:13px; min-height:38px; }
/* square, so the pair reads as one control rather than two words missing */
.yd-btn2.icon{ padding:0; width:44px; flex:none; }
.yd-btn2[disabled]{ opacity:.38; pointer-events:none; }

.yd-btn3{ font-family:inherit; font-size:13.5px; font-weight:400; min-height:44px;
  padding:13px 10px; border:0; background:transparent;
  color:var(--yd-text-dim); cursor:pointer; transition:var(--yd-t); }
.yd-btn3:hover{ color:var(--yd-accent); }

.yd-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.yd-lab{ font-size:11.5px; font-weight:400; color:var(--yd-text-dim); letter-spacing:.02em;
  display:flex; justify-content:space-between; gap:8px; }
.yd-lab b{ font-weight:500; color:var(--yd-accent); }
.yd-in, .yd-sel{
  font-family:inherit; font-size:14px; color:var(--yd-text);
  padding:12px 14px; border-radius:var(--yd-r-sm); min-height:44px;
  background:var(--yd-bg); border:1px solid var(--yd-border);
  transition:var(--yd-t); width:100%;
}
.yd-sel{ appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.yd-in::placeholder{ color:var(--yd-text-faint); }
.yd-in:focus, .yd-sel:focus{ outline:0; border-color:var(--yd-edge); box-shadow:var(--yd-ring); }

.yd-range{ -webkit-appearance:none; appearance:none; width:100%; height:4px; margin:11px 0;
  border-radius:var(--yd-r-pill);
  background:var(--yd-surface-2); border:1px solid var(--yd-border); cursor:pointer; }
.yd-range::-webkit-slider-thumb{ -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background:var(--yd-accent); border:0; box-shadow:0 3px 0 var(--yd-accent-lo), 0 5px 10px rgba(0,0,0,.4); }
.yd-range::-moz-range-thumb{ width:20px; height:20px; border:0; border-radius:50%;
  background:var(--yd-accent); box-shadow:0 3px 0 var(--yd-accent-lo); }
.yd-range:focus-visible{ outline:0; box-shadow:var(--yd-ring); }

.yd-tog{ display:flex; align-items:center; gap:11px; cursor:pointer; font-size:13.5px;
  color:var(--yd-text-dim); min-height:40px; }
.yd-tog input{ position:absolute; opacity:0; pointer-events:none; }
.yd-tog i{ width:44px; height:25px; border-radius:var(--yd-r-pill); background:var(--yd-surface-2);
  border:1px solid var(--yd-border); position:relative; transition:var(--yd-t); flex:none; }
.yd-tog i::after{ content:""; position:absolute; top:3px; left:3px; width:17px; height:17px;
  border-radius:50%; background:var(--yd-text-faint); transition:var(--yd-t); }
.yd-tog input:checked + i{ background:var(--yd-accent); border-color:var(--yd-accent-lo); }
.yd-tog input:checked + i::after{ left:22px; background:var(--yd-on-accent); }

.yd-seg{ display:inline-flex; padding:4px; gap:3px; border-radius:var(--yd-r-md); max-width:100%;
  background:var(--yd-surface-2); border:1px solid var(--yd-border); }
.yd-seg button{ font-family:inherit; font-size:13px; font-weight:400; padding:9px 16px; border:0;
  flex:1 1 auto; white-space:nowrap; border-radius:var(--yd-r-sm);
  background:transparent; color:var(--yd-text-dim); cursor:pointer; transition:var(--yd-t); }
.yd-seg button:hover{ color:var(--yd-text); }
.yd-seg button[aria-pressed="true"]{ background:var(--yd-accent); color:var(--yd-on-accent); font-weight:500; }

/* Same recipe as the tag on the site's front page: dim text, a plain surface
   behind it, an ordinary border. A chip is a label, and a label does not need
   to shout in the brand colour to be read. */
.yd-chip{ display:inline-block; font-size:10px; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  padding:5px 10px; border-radius:var(--yd-r-pill);
  color:var(--yd-text-dim);
  background:var(--yd-surface-2);
  border:1px solid var(--yd-border); }

.yd-card{ padding:var(--yd-pad); border-radius:var(--yd-r-lg);
  background:var(--yd-surface); border:1px solid var(--yd-border);
  box-shadow:var(--yd-card); transition:var(--yd-t); }
.yd-card:hover{ border-color:var(--yd-border-hi); }

.yd-switch{ display:inline-flex; align-items:center; gap:2px; flex:none;
  padding:3px; border-radius:var(--yd-r-pill);
  background:var(--yd-surface-2); border:1px solid var(--yd-border); }
.yd-switch button{ display:grid; place-items:center; width:34px; height:28px; padding:0;
  border:0; border-radius:var(--yd-r-pill); background:transparent;
  color:var(--yd-text-faint); cursor:pointer; transition:var(--yd-t); }
.yd-switch button:hover{ color:var(--yd-text-dim); }
.yd-switch button[aria-pressed="true"]{ background:var(--yd-accent); color:var(--yd-on-accent); }

/* The way back to the site. A pill of its own rather than a third button
   inside the theme switch, because it is not a third theme — pressing it
   leaves the page. 36px, not 34: the switch beside it is a 28px button in 3px
   of padding inside a 1px border, and the two line up at the shoulders. */
.yd-back{ display:grid; place-items:center; width:36px; height:36px; flex:none;
  border-radius:var(--yd-r-pill); text-decoration:none; cursor:pointer;
  background:var(--yd-surface-2); border:1px solid var(--yd-border);
  color:var(--yd-text-faint); transition:var(--yd-t); }
.yd-back:hover{ color:var(--yd-text); border-color:var(--yd-border-hi); }
.yd-back:focus-visible{ outline:0; box-shadow:var(--yd-ring); }


/* ================= APP PIECES (same tokens only) ================= */
.hint{ font-size:11px; font-weight:300; line-height:1.45; color:var(--yd-text-faint); }

.yd-menuwrap{ position:relative; }
.yd-pop{ position:absolute; top:calc(100% + 8px); left:0; z-index:60; min-width:236px;
  padding:6px; border-radius:var(--yd-r-md); background:var(--yd-surface);
  border:1px solid var(--yd-border-hi); display:none; flex-direction:column; gap:2px; }
.yd-pop.on{ display:flex; }
.yd-pop button{ font:400 13.5px/1 var(--yd-font); text-align:left; padding:11px 12px; border:0;
  border-radius:var(--yd-r-sm); background:transparent; color:var(--yd-text-dim);
  cursor:pointer; transition:var(--yd-t); min-height:40px; }
.yd-pop button:hover{ background:var(--yd-surface-2); color:var(--yd-text); }
.yd-pop button[disabled]{ opacity:.38; pointer-events:none; }

/* help */
.scrim{ position:fixed; inset:0; z-index:90; background:rgba(0,0,0,.55);
  display:none; place-items:center; padding:20px; }
.scrim.on{ display:grid; }
.helpbox{ width:min(560px,100%); max-height:82vh; overflow:auto; }
.helpbox h2{ font-size:16px; margin-bottom:6px; }
.helpbox p{ font-size:13px; font-weight:300; color:var(--yd-text-dim); line-height:1.6; }
.helpbox dl{ margin:14px 0 0; display:grid; grid-template-columns:auto 1fr; gap:8px 14px;
  font-size:13px; color:var(--yd-text-dim); }
.helpbox dt{ color:var(--yd-text); font-weight:400; white-space:nowrap; }
.helpbox dd{ margin:0; font-weight:300; }

/* ================= COLLAGE MAKER ================= */
[hidden]{ display:none !important; }
:root{ --yd-panel:330px; }
:root, :root[data-theme="dark"]{ --co-chk1:#26262A; --co-chk2:#1E1E22; }
:root[data-theme="light"]{ --co-chk1:#E8E4DC; --co-chk2:#F6F4F0; }

.co-stage{ position:relative; padding:0; display:block; overflow:hidden; }
#coCanvas{ position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; }
.co-badge{ position:absolute; left:14px; top:14px; z-index:2; pointer-events:none; font-size:12px; font-variant-numeric:tabular-nums;
  padding:6px 10px; border-radius:var(--yd-r-pill); background:color-mix(in srgb, var(--yd-surface) 90%, transparent); border:1px solid var(--yd-border-hi); color:var(--yd-text-dim); }
.co-busy{ position:absolute; inset:0; display:none; place-items:center; z-index:3; pointer-events:none; }
.co-busy span{ font-size:13px; padding:10px 16px; border-radius:var(--yd-r-pill); background:var(--yd-surface); border:1px solid var(--yd-border-hi); }
.co-stage.is-busy .co-busy{ display:grid; }
/* Before anything is opened the empty stage shows a sample photo, only as a backdrop.
   It is never loaded as a picture, and it goes the moment someone opens their own. */
.co-stage.is-empty{ --co-h:calc(100vh - 265px);
  background:linear-gradient(90deg, transparent calc(var(--co-h) * 0.95), var(--yd-bg) calc(var(--co-h) * 1.4)), url("yd-assets/sample.webp") calc(var(--co-h) * -0.1) 50%/auto 100% no-repeat, var(--yd-bg); }
.co-stage.is-empty #coCanvas, .co-stage.is-empty .co-badge{ display:none; }
.co-drop{ position:absolute; inset:0; display:grid; place-items:center; justify-items:end; padding:24px clamp(24px,5vw,64px); z-index:2; }
.co-dropcard{ width:min(420px,100%); text-align:center; display:flex; flex-direction:column; align-items:center; gap:12px; padding:30px 26px;
  border-radius:var(--yd-r-lg); background:var(--yd-surface); border:1px solid var(--yd-border); box-shadow:0 18px 50px rgba(0,0,0,.35); }
.co-dropcard svg{ color:var(--yd-text-dim); }
.co-dropcard h2{ font-size:18px; text-wrap:balance; }
.co-dropcard p{ font-size:13px; font-weight:300; color:var(--yd-text-dim); line-height:1.6; text-wrap:balance; }
@media (max-width:860px){ .co-stage.is-empty{ background-size:cover; background-position:30% center; } .co-drop{ justify-items:center; } }
.co-over{ position:fixed; inset:14px; z-index:70; display:none; place-items:center;
  border-radius:var(--yd-r-lg); border:2px dashed var(--yd-text-dim);
  background:color-mix(in srgb, var(--yd-bg) 72%, transparent); pointer-events:none; }
body.is-over .co-over{ display:grid; }
.co-over span{ font-size:14px; font-weight:500; padding:10px 18px; border-radius:var(--yd-r-pill);
  background:var(--yd-surface); border:1px solid var(--yd-border-hi); }

/* the strip of photos under the collage */
.co-tray{ flex:none; display:flex; gap:8px; align-items:center; padding:10px 14px; overflow-x:auto;
  border-top:1px solid var(--yd-border); background:var(--yd-surface); min-height:84px; }
.co-tray .hint{ white-space:nowrap; }
.co-ph{ position:relative; flex:none; width:64px; height:64px; border-radius:var(--yd-r-sm); overflow:hidden; cursor:grab;
  border:2px solid transparent; background:var(--yd-bg); }
.co-ph img{ width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
.co-ph.is-used{ border-color:var(--yd-border-hi); }
.co-ph.is-used::after{ content:""; position:absolute; right:4px; bottom:4px; width:12px; height:12px; border-radius:50%;
  background:var(--yd-accent); border:2px solid var(--yd-surface); }
.co-ph button{ position:absolute; top:2px; right:2px; width:20px; height:20px; padding:0; border:0; border-radius:50%; display:none; place-items:center;
  background:rgba(0,0,0,.65); color:#fff; cursor:pointer; }
.co-ph:hover button{ display:grid; }
.co-add{ flex:none; width:64px; height:64px; border-radius:var(--yd-r-sm); display:grid; place-items:center; cursor:pointer;
  border:1px dashed var(--yd-border-hi); background:transparent; color:var(--yd-text-dim); }
.co-add:hover{ color:var(--yd-text); border-color:var(--yd-edge); }

/* panel */
.co-panel{ gap:0; padding:0; }
.co-tabs{ position:sticky; top:0; z-index:4; display:grid; grid-template-columns:repeat(4,1fr);
  background:var(--yd-surface); border-bottom:1px solid var(--yd-border); }
.co-tabs button{ font:400 13px/1 var(--yd-font); padding:15px 4px 13px; border:0; background:transparent;
  color:var(--yd-text-dim); cursor:pointer; border-bottom:2px solid transparent; transition:var(--yd-t); }
.co-tabs button:hover{ color:var(--yd-text); }
.co-tabs button[aria-selected="true"]{ color:var(--yd-text); font-weight:500; border-bottom-color:var(--yd-accent); }
.co-pane{ padding:var(--yd-pad); display:flex; flex-direction:column; gap:22px; }
.co-chips{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.co-chips button, .co-nums button{ font:400 12.5px/1.2 var(--yd-font); padding:10px 4px; border-radius:var(--yd-r-sm); cursor:pointer;
  background:var(--yd-bg); border:1px solid var(--yd-border); color:var(--yd-text-dim); transition:var(--yd-t); font-variant-numeric:tabular-nums; }
.co-chips button:hover, .co-nums button:hover{ color:var(--yd-text); border-color:var(--yd-border-hi); }
.co-chips button[aria-pressed="true"], .co-nums button[aria-pressed="true"]{ background:var(--yd-accent); border-color:var(--yd-accent); color:var(--yd-on-accent); font-weight:500; }
.co-nums{ display:grid; grid-template-columns:repeat(9,1fr); gap:4px; }
.co-nums button{ padding:9px 0; }
.co-layouts{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.co-layouts button{ padding:6px; border-radius:var(--yd-r-sm); cursor:pointer; background:var(--yd-bg); border:1px solid var(--yd-border); display:grid; place-items:center; }
.co-layouts button[aria-pressed="true"]{ border-color:var(--yd-accent); box-shadow:inset 0 0 0 1px var(--yd-accent); }
.co-layouts canvas{ display:block; width:100%; }
.co-row{ display:flex; gap:8px; }
.co-row > *{ flex:1 1 0; min-width:0; }
.co-in{ min-height:40px !important; padding:9px 10px !important; font-variant-numeric:tabular-nums; }
.co-mini{ font-size:11px; color:var(--yd-text-faint); display:block; margin-bottom:5px; }
.co-info{ font-size:12.5px; color:var(--yd-text-dim); font-variant-numeric:tabular-nums; margin-top:10px; }
.co-slider .yd-lab b{ font-variant-numeric:tabular-nums; color:var(--yd-text); font-weight:500; }
.co-slider .yd-range{ margin:8px 0 4px; }
.co-swatches{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.co-swatches button{ width:32px; height:32px; border-radius:50%; cursor:pointer; padding:0; border:1px solid var(--yd-border-hi); box-shadow:inset 0 0 0 3px var(--yd-surface); }
.co-swatches button[aria-pressed="true"]{ border:2px solid var(--yd-edge); }
.co-fmt{ display:grid; width:100%; }
.co-dpi{ display:grid; grid-template-columns:repeat(5,1fr); width:100%; }
.co-dpi button, .co-fmt button{ padding:9px 0; font-variant-numeric:tabular-nums; }
.co-sel[hidden]{ display:none; }
/* from Image Studio, for the text tool */
.im-swatches{ display:flex; flex-wrap:wrap; gap:8px; }
.im-swatches button{ width:34px; height:34px; border-radius:50%; cursor:pointer; padding:0;
  border:1px solid var(--yd-border-hi); box-shadow:inset 0 0 0 3px var(--yd-surface); transition:var(--yd-t); }
.im-swatches button[aria-pressed="true"]{ border:2px solid var(--yd-edge); }
.im-fonts{ display:grid; grid-template-columns:1fr 1fr; gap:6px; max-height:300px; overflow:auto; padding-right:2px; }
.im-fonts button{ text-align:left; padding:9px 10px; border-radius:var(--yd-r-sm); cursor:pointer; font-size:15px; line-height:1.2;
  background:var(--yd-bg); border:1px solid var(--yd-border); color:var(--yd-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.im-fonts .grp{ grid-column:1 / -1; display:flex; align-items:center; gap:10px; margin:6px 0 2px;
  font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--yd-text-faint); }
.im-fonts .grp::after{ content:""; flex:1; height:1px; background:var(--yd-border-hi); }
.im-fonts .grp:first-child{ margin-top:0; }
.im-fonts button:hover{ border-color:var(--yd-border-hi); }
.im-fonts button[aria-pressed="true"]{ border-color:var(--yd-accent); box-shadow:inset 0 0 0 1px var(--yd-accent); }
.im-layers{ display:flex; flex-wrap:wrap; gap:6px; }
.im-layers button{ max-width:100%; font:400 12.5px/1 var(--yd-font); padding:8px 11px; border-radius:var(--yd-r-pill); cursor:pointer;
  background:var(--yd-bg); border:1px solid var(--yd-border); color:var(--yd-text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.im-layers button[aria-pressed="true"]{ background:var(--yd-accent); border-color:var(--yd-accent); color:var(--yd-on-accent); font-weight:500; }
.im-sub{ padding:12px; border-radius:var(--yd-r-md); background:var(--yd-bg); border:1px solid var(--yd-border); margin-top:10px; }
.im-sub[hidden]{ display:none; }
.im-sub .im-slider:last-child{ margin-bottom:0; }
.im-row{ display:flex; gap:8px; }
.im-row > *{ flex:1 1 0; min-width:0; padding-left:6px; padding-right:6px; }
.im-slider{ margin-bottom:6px; }
.im-slider .yd-lab{ cursor:default; }
.im-slider .yd-lab b{ min-width:42px; text-align:right; font-variant-numeric:tabular-nums; color:var(--yd-text); font-weight:500; }
.im-slider .yd-lab b.on{ color:var(--yd-accent); }
.im-slider .yd-range{ margin:8px 0 6px; }

@media (max-width:1000px){ .yd-menu{ display:none; } :root{ --yd-panel:300px; } }
@media (max-width:860px){
  html,body{ height:auto; overflow:visible; }
  .yd-shell{ height:auto; min-height:100%; }
  .yd-mid{ flex-direction:column; }
  :root{ --yd-panel:auto; }
  .yd-main{ overflow:visible; }
  .co-stage{ flex:none; height:60vh; min-height:340px; }
  .yd-panel{ width:100%; border-left:0; border-top:1px solid var(--yd-border); overflow:visible; }
}
@media (max-width:460px){
  .yd-top{ padding:0 12px; gap:8px; }
  .yd-brand{ flex-direction:column; gap:0; align-items:flex-start; }
  .yd-brand .mark{ display:none; }
  .yd-bar{ padding:10px 12px; }
  .yd-status{ height:auto; padding:8px 12px; flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; } }
