/* =========================================================
   bio — customize.css
   ========================================================= */
:root {
  --bg: #08080d;
  --bg-soft: #0b0b12;
  --panel: #0f0f16;
  --panel-2: #14141d;
  --border: #22222e;
  --border-strong: #32323f;
  --text: #e9e9f2;
  --muted: #8c8ca0;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --danger: #ff6b6b;
  --ok: #35e0a1;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(124, 92, 255, 0.12), transparent 70%),
    radial-gradient(700px 420px at -10% 110%, rgba(110, 231, 255, 0.07), transparent 70%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 22px;
  background: rgba(8, 8, 13, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.branddot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6ee7ff, var(--accent));
  box-shadow: 0 0 18px -2px var(--accent);
}

.topbar__status {
  margin-inline-start: auto;
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}

.topbar__status.is-dirty {
  color: #ffc76b;
  border-color: rgba(255, 199, 107, 0.25);
  background: rgba(255, 199, 107, 0.08);
}

.topbar__status.is-ok {
  color: var(--ok);
  border-color: rgba(53, 224, 161, 0.25);
  background: rgba(53, 224, 161, 0.08);
}

.topbar__status.is-err {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.25);
  background: rgba(255, 107, 107, 0.08);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: var(--border-strong); background: #1a1a25; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px -12px var(--accent);
}

.btn--primary:hover { background: #8b6fff; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost { background: transparent; }

.btn--danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.06);
}

.btn--danger:hover {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.5);
}

.btn--sm { padding: 7px 12px; font-size: 12.5px; }

.btn--dashed {
  width: 100%;
  padding: 10px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.btn--dashed:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 45%);
  gap: 22px;
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding: 22px;
  align-items: start;
}

/* ---------- editor ---------- */
.editor {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel__title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field:last-child { margin-bottom: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

output {
  font-family: "Inter", monospace;
  font-size: 11.5px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  min-width: 32px;
  text-align: center;
  direction: ltr;
}

input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

input::placeholder { color: #5c5c70; }

input[type="text"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #0d0d15;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(0% + 14px) calc(50% + 1px), calc(0% + 19px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-start: 34px;
}

.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-prefix span {
  padding-inline: 12px 4px;
  color: var(--muted);
  font-size: 14px;
}

.input-prefix input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-inline-start: 4px;
}

.input-prefix input:focus { box-shadow: none; }

.hint {
  margin: 0 0 8px;
  font-size: 11.5px;
  color: #6c6c80;
  line-height: 1.5;
}

.hint a {
  color: #a99bff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hint a:hover { color: #c4baff; }

/* ---------- music / discord helpers ---------- */
.file-state {
  display: block;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-state.is-set {
  color: #bfe9d5;
  border-color: rgba(53, 224, 161, 0.28);
  background: rgba(53, 224, 161, 0.08);
}

.row-with-btn {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row-with-btn input { min-width: 0; }
.row-with-btn .btn { flex: none; }

.discord-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--muted);
}

.discord-state[hidden] { display: none; }

.discord-state .dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #80848e;
}

.discord-state.is-ok {
  color: #d7f7e9;
  border-color: rgba(53, 224, 161, 0.28);
  background: rgba(53, 224, 161, 0.08);
}

.discord-state.is-ok .dot { background: #23a55a; box-shadow: 0 0 8px rgba(35, 165, 90, 0.8); }

.discord-state.is-idle .dot { background: #f0b232; box-shadow: 0 0 8px rgba(240, 178, 50, 0.8); }
.discord-state.is-dnd .dot { background: #f23f43; box-shadow: 0 0 8px rgba(242, 63, 67, 0.8); }
.discord-state.is-offline .dot { background: #80848e; }

.discord-state.is-err {
  color: #ffb3b3;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
}

.discord-state.is-err .dot { background: #f23f43; }

.field + .hint { margin-top: -8px; }

/* color inputs */
.color-input {
  width: 100%;
  height: 40px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
}

.color-input--lg { width: 52px; height: 42px; flex: none; }

.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-input::-moz-color-swatch { border: 0; border-radius: 6px; }

.accent-row { display: flex; align-items: center; gap: 12px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }

.swatches button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.swatches button:hover { transform: scale(1.12); }

.swatches button.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c);
}

/* segmented */
.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.segmented label { flex: 1; margin: 0; }

.segmented input { position: absolute; opacity: 0; pointer-events: none; }

.segmented span {
  display: block;
  text-align: center;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.segmented input:checked + span {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.4);
}

/* range */
input[type="range"] {
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: linear-gradient(to left, var(--accent) var(--fill, 50%), #20202b var(--fill, 50%));
  cursor: pointer;
}

html[dir="rtl"] input[type="range"] {
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), #20202b var(--fill, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}

/* file row */
.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  gap: 7px;
  align-items: center;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px dashed var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin: 0;
}

.file-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

.icon-mini {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.icon-mini:hover { color: var(--danger); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }

/* switches */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text);
  font-weight: 400;
}

.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch__track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  transition: background-color 0.2s, border-color 0.2s;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #6f6f85;
  transition: transform 0.25s var(--ease), background-color 0.2s;
}

.switch input:checked + .switch__track {
  background: var(--accent);
  border-color: transparent;
}

.switch input:checked + .switch__track::after {
  background: #fff;
  transform: translateX(16px);
}

html[dir="rtl"] .switch input:checked + .switch__track::after {
  transform: translateX(-16px);
}

.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* link rows */
.links { display: grid; gap: 8px; margin-bottom: 10px; }

.link-row {
  display: grid;
  grid-template-columns: 22px 118px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.link-row__icon { display: grid; place-items: center; color: var(--muted); }
.link-row__icon svg { width: 16px; height: 16px; fill: currentColor; }

.link-row select {
  padding-block: 7px;
  padding-inline-start: 28px;
  font-size: 12.5px;
  background-position: calc(0% + 11px) calc(50% + 1px), calc(0% + 16px) calc(50% + 1px);
}

.link-row input {
  padding-block: 7px;
  font-size: 12.5px;
}

.link-row__del {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s, background-color 0.2s;
}

.link-row__del:hover { color: var(--danger); background: rgba(255, 107, 107, 0.1); }

/* ---------- preview ---------- */
.preview {
  position: sticky;
  top: 86px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #05050a;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.preview__dots { display: flex; gap: 5px; }
.preview__dots i { width: 8px; height: 8px; border-radius: 50%; background: #2c2c3a; }
.preview__dots i:first-child { background: #ff5f57; opacity: 0.7; }
.preview__dots i:nth-child(2) { background: #febc2e; opacity: 0.7; }
.preview__dots i:nth-child(3) { background: #28c840; opacity: 0.7; }

.preview__label { font-size: 12px; color: var(--muted); }

.preview__devices {
  margin-inline-start: auto;
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.preview__devices button {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}

.preview__devices button.is-active { background: var(--panel-2); color: var(--text); }

.preview__stage {
  position: relative;
  height: calc(100vh - 178px);
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 92, 255, 0.07), transparent 70%),
    #05050a;
}

.preview__stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0b13;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), border-radius 0.35s var(--ease);
}

.preview__stage.is-mobile {
  padding: 20px;
}

.preview__stage.is-mobile iframe {
  width: 375px;
  max-width: 100%;
  height: 100%;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- avatar editor ---------- */
.avatar-edit {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border-radius: 13px;
  border: 1px dashed var(--border-strong);
  background: var(--bg-soft);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.avatar-edit.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.avatar-edit__preview {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent), rgba(255, 255, 255, 0.24));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 14px 28px -18px var(--accent);
}

.avatar-edit__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit__preview span {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: rgba(9, 9, 16, 0.85);
  text-transform: lowercase;
}

.avatar-edit__body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.avatar-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.avatar-edit__body .hint {
  margin: 0;
  font-size: 11px;
}

.avatar-edit__body input {
  padding-block: 8px;
  font-size: 12.5px;
}

label.btn { cursor: pointer; }

/* ---------- crop dialog ---------- */
.crop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 8, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.crop[hidden] { display: none; }

.crop__dialog {
  width: min(352px, 100%);
  max-height: calc(100svh - 32px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  box-shadow: 0 40px 90px -40px #000;
  animation: cropIn 0.28s var(--ease);
}

@keyframes cropIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.crop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crop__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.crop__stage {
  position: relative;
  width: min(100%, 320px);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #05050a;
  box-shadow: inset 0 0 0 1px var(--border);
  touch-action: none;
}

.crop__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.crop__stage canvas:active { cursor: grabbing; }

.crop__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 9999px rgba(5, 5, 10, 0.58);
  pointer-events: none;
}

.crop__controls { display: grid; gap: 8px; }

.crop__controls label { margin: 0; }
.crop__controls .hint { margin: 0; }

.crop__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.is-locked { overflow: hidden; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(20, 20, 29, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast.is-error { border-color: rgba(255, 107, 107, 0.4); color: #ffb3b3; }

.editor__foot {
  margin: 2px 4px 20px;
  font-size: 12px;
  color: #616175;
  text-align: center;
}

/* ---------- scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: #2a2a38 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #262633; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #3a3a4b; background-clip: content-box; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }

  .preview {
    position: relative;
    top: 0;
    order: -1;
  }

  .preview__stage {
    height: 440px;
    min-height: 0;
  }

  .preview__stage.is-mobile { height: 500px; }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar__status { display: none; }

  .topbar__actions {
    width: 100%;
    margin-inline-start: 0;
  }

  .topbar__actions .btn { flex: 1; }

  .layout { padding: 14px; gap: 14px; }

  .panel { padding: 16px; }

  .grid-2 { grid-template-columns: 1fr; gap: 0; }

  .preview__stage { height: 380px; }
  .preview__stage.is-mobile { height: 460px; padding: 12px; }
  .preview__devices { display: none; }

  .link-row { grid-template-columns: 20px 104px minmax(0, 1fr) 28px; gap: 6px; }
}

@media (max-width: 420px) {
  .link-row {
    grid-template-columns: 1fr 28px;
    grid-template-areas:
      "platform del"
      "url url";
  }
  .link-row__icon { display: none; }
  .link-row__platform { grid-area: platform; }
  .link-row__url { grid-area: url; }
  .link-row__del { grid-area: del; justify-self: end; }
}

@media (max-height: 520px) {
  .crop__dialog { gap: 10px; padding: 14px; }
  .crop__stage { width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
