/* v4.5 credits meter + quality picker (black / one amber) */
.cr{margin:0 0 12px;display:grid;grid-template-columns:minmax(0,1fr);gap:7px;min-width:0}
.cr-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#B9B0A4}
.cr-k{letter-spacing:.02em}
.cr-acct{all:unset;box-sizing:border-box;cursor:pointer;font-size:12.5px;color:#B9B0A4;padding:3px 6px;margin:-3px -6px;border-radius:6px;font-variant-numeric:tabular-nums}
.cr-acct b{color:#F4EFEA;font-weight:600}.cr-acct i{font-style:normal;font-size:10px;opacity:.7}
.cr-acct:hover{background:#1A1A1A}.cr-acct:focus-visible,.cr-q button:focus-visible,.cr-mock select:focus-visible{outline:2px solid #F4BE72;outline-offset:1px}
.cr-bar{height:4px;border-radius:2px;background:#2A2A2A;overflow:hidden}.cr-bar i{display:block;height:100%;background:#F4BE72;border-radius:2px;transition:width .25s}
.cr-bar.empty i{width:0!important}.cr-bar.low i{background:#F4BE72;opacity:.6}
.cr{position:relative}
.cr-pop{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:20;box-shadow:0 12px 32px rgba(0,0,0,.6);background:#121212;border:1px solid #2A2A2A;border-radius:10px;padding:10px 12px;display:grid;gap:6px;font-size:12.5px}
.cr-pop[hidden]{display:none}
.cr-row{display:flex;justify-content:space-between;gap:12px;color:#B9B0A4}.cr-row b{color:#F4EFEA;font-weight:600;font-variant-numeric:tabular-nums}
.cr-fine{margin:2px 0 0;color:#8F877F;font-size:11.5px;line-height:1.4}
.cr-h{font-size:12px;color:#B9B0A4;margin-top:2px}
.cr-q{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;border-radius:10px;background:#0E0E0E;border:1px solid #2E2B27}
.cr-q button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:5px;height:30px;border-radius:7px;font-size:12px;font-weight:600;color:#B9B0A4;cursor:pointer;white-space:nowrap}
.cr-q button small{font-size:10.5px;font-weight:500;opacity:.7;font-variant-numeric:tabular-nums}
.cr-q button[aria-checked=true]{background:#2C2C2C;color:#F4EFEA}
.cr-q button[aria-disabled=true]{opacity:.42;cursor:default}
.cr-q button[aria-disabled=true] span:after{content:" 🔒";font-size:9px;filter:grayscale(1)}
.cr-cost{font-size:12px;color:#B9B0A4;min-height:16px;font-variant-numeric:tabular-nums}.cr-cost b{color:#F4EFEA}
.cr-note{font-size:11.5px;color:#B9B0A4;line-height:1.4}.cr-note:empty{display:none}
.cr-blocked .cr-cost{color:#F4BE72}
.cr-mock{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#8F877F;border-top:1px dashed #2A2A2A;padding-top:7px}
.cr-mock select{font:inherit;font-size:11.5px;color:#F4EFEA;background:#141414;border:1px solid #2A2A2A;border-radius:6px;padding:4px 22px 4px 6px;max-width:62%;-webkit-appearance:none;appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#B9B0A4 50%),linear-gradient(135deg,#B9B0A4 50%,transparent 50%);background-position:calc(100% - 11px) 50%,calc(100% - 7px) 50%;background-size:4px 4px;background-repeat:no-repeat}
/* phone card */
.cr-ph{margin:14px 0;padding:14px;border:1px solid #2A2A2A;border-radius:14px;background:#0E0E0E;gap:10px}
.cr-ph .cr-top,.cr-ph .cr-acct{font-size:14px}.cr-ph .cr-acct{min-height:44px;display:inline-block;line-height:44px;white-space:nowrap;padding:0 8px;margin:-8px -8px}
.cr-ph .cr-q button{height:44px;font-size:14px}.cr-ph .cr-q button small{font-size:12px}
.cr-ph .cr-cost{font-size:13.5px}.cr-ph .cr-note{font-size:13px}.cr-ph .cr-pop{font-size:14px}
.cr-ph .cr-mock{font-size:12.5px;min-height:44px}.cr-ph .cr-mock select{font-size:16px;min-height:44px;padding:6px 26px 6px 8px}
@media (prefers-reduced-motion:reduce){.cr-bar i{transition:none}}
.cr-ph .cr-q button{gap:4px;padding:0 4px}.cr-ph .cr-mock span{flex:0 1 auto;min-width:0}
.cr-ph .cr-pop{position:static;box-shadow:none}
.cr-ph .cr-q button[aria-disabled=true] small{display:none}
/* v4.5.1: four plain-label tiers (Saver / Standard / Enhanced / Max) on one row; multiplier sits under the label */
.cr-q{grid-template-columns:repeat(4,minmax(0,1fr))}
.cr-q button{flex-direction:column;gap:1px;height:40px;padding:0 2px;line-height:1.1}
.cr-q button small{font-size:10px}
.cr-ph .cr-q button{height:52px;font-size:14px;gap:2px}
.cr-ph .cr-q button small{font-size:11.5px}
.cr-q button[aria-disabled=true] span:after{content:""}
.cr-q button[aria-disabled=true] small{display:block}
.cr-q button[aria-disabled=true] small:before{content:"🔒 ";filter:grayscale(1);font-size:9px}

/* v4.5.4: phone card sits under the section heading (first screen). Sticky chip just above the tab bar. */
.phone-view .pvt > .cr-ph{margin:10px 0 14px}
.cr-chip{display:none}
@media (max-width:720px){
  html{--crchip:48px;scroll-padding-bottom:calc(80px + var(--crchip) + var(--sab,0px))}
  html.cr-hide-chrome{--crchip:0px}
  html.cr-hide-chrome{scroll-padding-bottom:calc(16px + var(--sab,0px))}
  body.studio{padding-bottom:calc(var(--tabh,65px) + var(--crchip) + 16px + var(--sab,0px))}
  html.cr-hide-chrome body.studio{padding-bottom:calc(16px + var(--sab,0px))}
  .phone-view .pvt input,.phone-view .pvt select,.phone-view .pvt textarea,.phone-view .pvt button{scroll-margin-bottom:calc(12px + var(--crchip))}
  .cr-chip{display:block;position:fixed;left:0;right:0;bottom:calc(var(--tabh,65px) + var(--sab,0px));z-index:59;
    box-sizing:border-box;height:var(--crchip);background:#0A0A0A;border-top:1px solid #2A2A2A}
  html.cr-hide-chip .cr-chip,html.cr-hide-chrome .cr-chip{display:none!important}
  html.cr-hide-chrome .st-tabs{display:none!important}
  .cr-chip-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;min-height:44px;
    font:600 14px/1 "Instrument Sans",system-ui,sans-serif;color:#F4EFEA;cursor:pointer;font-variant-numeric:tabular-nums}
  .cr-chip-btn .cr-k{font-weight:500;font-size:12px;color:#B9B0A4}
  .cr-chip-btn b{color:#F4EFEA}
  .cr-chip-btn i{font-style:normal;color:#B9B0A4;font-size:11px}
  .cr-chip-btn:focus-visible{outline:2px solid #F4BE72;outline-offset:-3px}
  .cr-chip-pop{position:absolute;left:8px;right:8px;bottom:calc(100% + 6px);z-index:61;box-shadow:0 12px 32px rgba(0,0,0,.6);
    background:#121212;border:1px solid #2A2A2A;border-radius:10px;padding:10px 12px;display:grid;gap:6px;font-size:14px}
  .cr-chip-pop[hidden]{display:none}
  .cr-blocked .cr-chip-btn b{color:#F4BE72}
}

/* v4.5.5: hide the chip on short / landscape viewports (SE landscape is 375 tall). Padding follows --crchip:0. */
@media (max-width:720px) and (max-height:480px){
  html{--crchip:0px}
  .cr-chip{display:none!important}
}
/* v4.5.5: 2×2 quality grid + a select that can shrink, at 320–375 px */
@media (max-width:720px) and (max-width:389px){
  .cr-ph .cr-q{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .cr-ph .cr-q button{height:44px;min-height:44px;overflow:hidden;width:auto;max-width:100%;padding:0 4px}
  .cr-ph .cr-q button span,.cr-ph .cr-q button small{max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .cr-ph .cr-top{gap:8px;min-width:0}
  .cr-ph .cr-acct{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cr-ph .cr-mock{flex-wrap:wrap;align-items:stretch}
  .cr-ph .cr-mock span{flex:1 1 100%}
  .cr-ph .cr-mock select{max-width:100%;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis}
}

/* v4.5.6: very short landscape (first-gen SE / iPhone 8, 568×320) — compact the card so Quality clears the tab bar */
@media (max-width:720px) and (max-height:360px){
  .phone-view .pvt > .cr-ph{margin:6px 0 8px;padding:8px 12px;gap:6px}
  .cr-ph .cr-q button{height:44px;min-height:44px}
  .cr-ph .cr-h{margin-top:0}
}
