@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('../fonts/inter.woff2') format('woff2'); }

/* A calm, neutral studio: colour belongs to the drawing, not the chrome. */
:root {
  --chrome: #121214;
  --panel: #1c1c1f;
  --panel-2: #28282d;
  --text: #f3f3f4;
  --muted: #9d9da6;
  --accent: #f3f3f4;
  --accent-ink: #121214;
  --pro: #d8c38f;
  --pro-ink: #1d1708;
  --hairline: rgba(255, 255, 255, 0.07);
  --stage-bg: #fbf8f1;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--chrome);
  color: var(--text);
  font: 15px/1.35 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.005em;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  overflow: hidden;
}

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "top top" "tools stage" "tools timeline" "bottom bottom";
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Top bar */
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-width: 0; height: 44px; padding: 0 10px 0 4px; border: 0; border-radius: 12px; background: transparent; }
.brand:active { background: var(--panel); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.brand-grid { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2; }
.logo { width: 30px; height: 30px; border-radius: 8px; }
.actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn:active:not(:disabled) { background: var(--panel-2); }
.icon-btn.on { color: var(--accent); }
.badge { position: absolute; right: 3px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; }
.badge[hidden] { display: none; }
#playBtn .when-paused { display: none; }
#playBtn.paused .when-playing { display: none; }
#playBtn.paused .when-paused { display: block; fill: currentColor; }

.primary, .ghost {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:disabled { opacity: 0.5; }
.ghost { background: var(--panel-2); color: var(--text); font-weight: 600; }

/* Brush column */
.tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 10px 0 12px;
  overflow-y: auto;
  scrollbar-width: none;
}
.tools::-webkit-scrollbar { display: none; }
.brush {
  flex: 0 0 auto;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0 3px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--panel);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.brush canvas, .brush .tool-icon { width: 52px; height: 28px; border-radius: 7px; background: var(--stage-bg); display: block; }
.brush .tool-icon { display: grid; place-items: center; color: #6b6574; }
.brush .tool-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brush.active { border-color: var(--accent); color: var(--text); }
.brush.tool { padding: 5px 0 3px; }
.brush.tool .tool-icon { height: 24px; background: transparent; color: inherit; }
.brush.tool.on { color: var(--accent); }
.tools hr { flex: 0 0 auto; width: 100%; margin: 3px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* Canvas */
.stage {
  grid-area: stage;
  position: relative;
  margin: 0 12px 0 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--stage-bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
#canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; touch-action: none; }
.empty-hint {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.28);
  font-size: 22px;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 0.3s;
}
.empty-hint.dark { color: rgba(255, 255, 255, 0.3); }
.empty-hint.hidden { opacity: 0; }

.float-bar {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 6px 6px 6px 14px;
  border-radius: 14px;
  background: rgba(23, 21, 28, 0.9);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
}
.float-bar[hidden] { display: none; }
#selBar { padding-left: 6px; }
.float-bar .primary, .float-bar .ghost { height: 36px; padding: 0 12px; }
.stage.moving #canvas { cursor: move; }
.stage.tool-select #canvas, .stage.tool-pick #canvas, .stage.tool-fill #canvas { cursor: crosshair; }
.zoom-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(23, 21, 28, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.zoom-pill[hidden] { display: none; }
#traceBtn.on { color: var(--accent); }
.slider-row input[type="range"] { flex: 1; max-width: 220px; accent-color: var(--accent); }
.wrap-row { flex-wrap: wrap; justify-content: flex-start; }
.ghost.danger { color: #ff8a8a; }

/* Timeline */
.timeline {
  grid-area: timeline;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px 0 0;
  min-width: 0;
}
.timeline[hidden] { display: none; }
.tl-controls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.tl-controls .icon-btn { width: 38px; height: 38px; }
.tl-controls .icon-btn svg { width: 19px; height: 19px; }
#animPlay .when-running { display: none; }
#animPlay.running .when-stopped { display: none; }
#animPlay.running .when-running { display: block; fill: currentColor; }
#animPlay .when-stopped { fill: currentColor; }
#onionBtn[aria-pressed="true"] { color: var(--accent); }
.tl-fps select { height: 38px; border-radius: 10px; border: 0; padding: 0 6px; background: var(--panel); font-weight: 700; font-size: 13px; }
.frame-strip { flex: 1; display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; min-width: 0; }
.frame-thumb {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
}
.frame-thumb canvas { display: block; width: 60px; height: 42px; }
.frame-thumb span { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 700; color: rgba(0, 0, 0, 0.45); }
.frame-thumb.active { border-color: var(--accent); }

/* Bottom bar */
.bottombar {
  grid-area: bottom;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 10px 12px;
}
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.12s;
}
.swatch.active { border-color: var(--accent); transform: scale(1.1); }
.swatches.small .swatch { width: 30px; height: 30px; }
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.swatch-custom input { position: absolute; top: -8px; left: -8px; opacity: 0; width: 60px; height: 60px; cursor: pointer; }

.slider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.slider input[type="range"] { width: 120px; accent-color: var(--accent); }
.size-dot { width: 34px; height: 34px; display: grid; place-items: center; }
.size-dot::after { content: ""; width: var(--d, 6px); height: var(--d, 6px); max-width: 34px; max-height: 34px; border-radius: 50%; background: var(--dot, #fff); }

/* Dialogs */
dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 20px;
  padding: 20px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
dialog::backdrop { background: rgba(8, 6, 12, 0.6); }
dialog h2 { margin: 0 0 14px; font-size: 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; font-weight: 600; }
.row.check { justify-content: flex-start; font-weight: 500; }
.row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.row select { height: 40px; border-radius: 10px; border: 0; padding: 0 10px; background: var(--panel-2); }
.hint { color: var(--muted); font-size: 13px; min-height: 1em; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--chrome); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px 0; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--panel-2); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.preview { margin: 8px 0; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#3a3542 0 25%, #2c2833 0 50%) 0 0 / 16px 16px; text-align: center; }
.preview img, .preview video { display: block; max-width: 100%; max-height: 240px; margin: 0 auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.seg.seg-5 { grid-template-columns: repeat(5, 1fr); }
.seg.seg-5 span { font-size: 13px; }
dialog.wide { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }

/* Layers */
.layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.layer-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 6px 8px; padding: 6px; border-radius: 12px; background: var(--panel-2); border: 2px solid transparent; }
.layer-row.active { border-color: var(--accent); }
.layer-row .mini { width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--chrome); display: grid; place-items: center; color: var(--text); padding: 0; }
.layer-row .mini svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.layer-row .mini.off { color: var(--muted); opacity: 0.6; }
.layer-name { text-align: left; border: 0; background: transparent; font-weight: 700; padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-tools { display: flex; gap: 4px; }
.layer-opacity { grid-column: 2 / 4; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.layer-opacity input { flex: 1; accent-color: var(--accent); }

/* Gallery */
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.gallery-head h2 { margin: 0; }
.gallery-actions { display: flex; gap: 8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; max-height: calc(100vh - 220px); overflow-y: auto; padding: 2px; }
.card { display: flex; flex-direction: column; border-radius: 14px; background: var(--panel-2); overflow: hidden; border: 2px solid transparent; }
.card.current { border-color: var(--accent); }
.card-open { padding: 0; border: 0; background: transparent; text-align: left; }
.card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--stage-bg); }
.card-meta { padding: 8px 10px 2px; }
.card-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-date { font-size: 12px; color: var(--muted); }
.card-tools { display: flex; gap: 4px; padding: 6px 8px 8px; }
.card-tools button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: var(--chrome); font-size: 12px; font-weight: 600; }
.card-tools .danger { color: #ff8a8a; }

.swatch-save { display: grid; place-items: center; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 18px; line-height: 1; }
.swatches .divider { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.12); margin: 0 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 0.92; transform: translate(-50%, 0); }

/* Phones and narrow windows: brushes become a scrolling row under the canvas */
@media (max-width: 960px) {
  .brand-name { max-width: 110px; }
}
@media (max-width: 860px) {
  .brand-name { display: none; }
}

@media (max-width: 700px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto auto;
    grid-template-areas: "top" "stage" "timeline" "tools" "bottom";
  }
  .tools { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 10px 12px 0; }
  .stage { margin: 0 12px; }
  .brand-name { display: none; }
  .topbar { padding: 8px; gap: 6px; min-width: 0; }
  .actions { overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .actions::-webkit-scrollbar { display: none; }
  #exportBtn { position: sticky; right: 0; flex: 0 0 auto; box-shadow: -10px 0 12px var(--chrome); }
  .brand { padding: 0 4px; }
  .timeline { margin: 8px 12px 0; flex-wrap: wrap; }
  .frame-strip { order: 3; flex-basis: 100%; }
  .tools hr { width: 1px; height: auto; margin: 0 3px; border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.08); }
  .actions { gap: 3px; }
  .icon-btn { width: 36px; height: 40px; border-radius: 10px; }
  .icon-btn svg { width: 20px; height: 20px; }
  #exportBtn { height: 40px; padding: 0 12px; }
  .slider input[type="range"] { width: 110px; }
}

/* Wobble Ink Pro */
.pro-tag { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; vertical-align: 2px; line-height: 1.4; }
.pro-tag.corner { position: absolute; right: 1px; top: 1px; margin: 0; font-size: 8px; padding: 0 4px; }
.brush .pro-tag { position: absolute; right: 3px; top: 3px; margin: 0; font-size: 8px; padding: 0 4px; }
.brush { position: relative; }
.is-pro .pro-tag { display: none; }
.pro-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 6px; border-radius: 14px; background: var(--panel-2); }
.pro-row .primary { height: 40px; padding: 0 14px; flex: 0 0 auto; }
.pro-title span { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.pro-reason { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 210, 63, 0.12); font-weight: 600; }
.pro-list { margin: 6px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.pro-list li::marker { color: var(--accent); }
.pro-owned { font-weight: 700; color: var(--accent); }
.store-link { display: inline-grid; place-items: center; text-decoration: none; }
.store-link[hidden] { display: none; }

/* Sound and camera */
.icon-btn .dot { position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.icon-btn .dot[hidden] { display: none; }
.sound-now { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 10px; border-radius: 12px; background: var(--panel-2); }
.sound-now strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
#soundPreview .when-running { display: none; }
#soundPreview.running .when-stopped { display: none; }
#soundPreview.running .when-running { display: block; fill: currentColor; }
#soundPreview .when-stopped { fill: currentColor; }
.rec-dot { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: #ff453a; vertical-align: -1px; }
#soundRecord.recording { background: #ff453a; color: #fff; }
#soundRecord.recording .rec-dot { background: #fff; animation: rec-blink 1s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { #soundRecord.recording .rec-dot { animation: none; } }
.shots { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0 12px; }
.shot { display: grid; gap: 2px; padding: 12px; border: 2px dashed var(--panel-2); border-radius: 12px; background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.shot span { color: var(--muted); font-size: 13px; }
.shot.set { border-style: solid; border-color: var(--accent); }
.shot-arrow { color: var(--muted); font-size: 20px; }
.cam-frame { position: absolute; inset: 10px; border: 3px solid var(--accent); border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.12); }
.cam-frame[hidden] { display: none; }
.stage.framing #canvas { cursor: grab; }

/* Anything marked hidden stays hidden, whatever its display rule. */
[hidden] { display: none !important; }

/* Side bar: brush size (top) and opacity (bottom), Procreate-style */
.side-bar {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-radius: 16px;
  background: rgba(23, 21, 28, 0.82);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.side-slider {
  --t: 0.5;
  position: relative;
  width: 26px;
  height: min(150px, 22vh);
  border-radius: 13px;
  background: #2e2a36;
  cursor: ns-resize;
  touch-action: none;
}
.side-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-fill { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--t) * 100%); border-radius: 13px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.side-thumb {
  position: absolute;
  left: 50%;
  bottom: calc(var(--t) * (100% - 22px));
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--accent);
}
.side-dot-wrap { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--stage-bg); }
.side-dot { --d: 10px; width: var(--d); height: var(--d); border-radius: 50%; background: #1d1d1f; }
.side-bubble {
  position: absolute;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(23, 21, 28, 0.92);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}
.stage.framing .side-bar, .stage.moving .side-bar { display: none; }
@media (max-width: 640px), (max-height: 600px) {
  .side-bar { left: 6px; gap: 6px; padding: 6px 4px; border-radius: 12px; }
  .side-slider { width: 22px; height: min(96px, 14vh); }
  .side-thumb { width: 18px; height: 18px; margin-left: -9px; bottom: calc(var(--t) * (100% - 18px)); }
  .side-dot-wrap { width: 26px; height: 26px; }
}

/* Premium polish: lighter weights, hairlines, champagne PRO marks. */
.brand { font-weight: 650; letter-spacing: -0.02em; }
.pro-tag, .pro-title span { background: var(--pro); color: var(--pro-ink); font-weight: 700; }
.pro-list li::marker, .pro-owned { color: var(--pro); }
.icon-btn { background: var(--panel); box-shadow: inset 0 0 0 1px var(--hairline); }
.brush { box-shadow: inset 0 0 0 1px var(--hairline); }
.primary { font-weight: 650; letter-spacing: -0.01em; }
.badge { font-weight: 700; }
.swatch.active { transform: none; box-shadow: 0 0 0 2px var(--chrome), 0 0 0 4px var(--accent); }
dialog { box-shadow: 0 0 0 1px var(--hairline), 0 30px 80px rgba(0, 0, 0, 0.55); }
dialog h2 { font-weight: 650; letter-spacing: -0.02em; }
.side-bar { background: rgba(18, 18, 20, 0.86); box-shadow: 0 0 0 1px var(--hairline), 0 8px 24px rgba(0, 0, 0, 0.28); }
.side-fill { background: rgba(255, 255, 255, 0.16); }
.side-thumb { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }

/* Upgrade sheet: the buy button gets its own full-width row, so the price always fits. */
#proDialog .dialog-actions { flex-wrap: wrap; }
#proDialog #proBuy { order: -1; flex: 1 1 100%; min-height: 48px; font-size: 16px; }
#proDialog .dialog-actions .ghost { flex: 1 1 0; }
