/* ==========================================================================
   MyPastebin — design system
   Light, friendly, professional SaaS aesthetic. Light is the default.
   ========================================================================== */

:root {
  /* palette */
  --bg:            #f7f9fc;
  --bg-soft:       #eef3f9;
  --surface:       #ffffff;
  --surface-2:     #f9fbfd;
  --border:        #e3e9f2;
  --border-strong: #d3dbe7;

  --text:          #17202e;
  --text-soft:     #4a5768;
  --text-muted:    #7c8899;

  --accent:        #2f7ff0;
  --accent-hover:  #1f6ade;
  --accent-soft:   #e8f1fe;
  --accent-ring:   rgba(47, 127, 240, .35);
  --accent-ink:    #0f4ea8;

  --teal:          #12a594;
  --teal-soft:     #e2f6f3;
  --amber:         #c07a00;
  --amber-soft:    #fff3d9;
  --rose:          #d93d55;
  --rose-soft:     #fdeaee;
  --violet:        #7a5af5;
  --violet-soft:   #efeaff;

  --code-bg:       #f6f8fb;
  --code-border:   #e6ecf4;
  --code-text:     #1d2733;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-xs: 0 1px 2px rgba(16, 30, 54, .05);
  --shadow-sm: 0 1px 3px rgba(16, 30, 54, .07), 0 1px 2px rgba(16, 30, 54, .04);
  --shadow-md: 0 6px 18px -6px rgba(16, 30, 54, .14), 0 2px 6px rgba(16, 30, 54, .05);
  --shadow-lg: 0 22px 48px -18px rgba(16, 30, 54, .2), 0 8px 20px -12px rgba(16, 30, 54, .12);

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --maxw: 1140px;
  --header-h: 62px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

html[data-theme="dark"] {
  --bg:            #10151d;
  --bg-soft:       #161d27;
  --surface:       #182028;
  --surface-2:     #1d2632;
  --border:        #2a3442;
  --border-strong: #384557;
  --text:          #e8eef7;
  --text-soft:     #b3c0d1;
  --text-muted:    #8494a8;
  --accent:        #5a9cff;
  --accent-hover:  #78aeff;
  --accent-soft:   #16273f;
  --accent-ring:   rgba(90, 156, 255, .35);
  --accent-ink:    #a9cbff;
  --teal:          #2ec4b0; --teal-soft: #11302c;
  --amber:         #e0a83c; --amber-soft: #32280f;
  --rose:          #f2738a; --rose-soft: #38171f;
  --violet:        #a48cff; --violet-soft: #251f43;
  --code-bg:       #131a23;
  --code-border:   #26313f;
  --code-text:     #dbe5f1;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
  --shadow-md: 0 8px 22px -8px rgba(0,0,0,.6);
  --shadow-lg: 0 26px 52px -20px rgba(0,0,0,.7);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.018em; font-weight: 700; }
h1, .h1 { font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.3rem); }
h2, .h2 { font-size: clamp(1.28rem, 1.05rem + .8vw, 1.6rem); }
h3, .h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: var(--accent-soft); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(14px, 3vw, 26px); }
.wrap.narrow { max-width: 780px; }
.wrap.tiny  { max-width: 470px; }
.site-main { flex: 1 0 auto; padding: clamp(20px, 3.4vw, 40px) 0 clamp(36px, 6vw, 64px); }
.muted { color: var(--text-muted); }
.muted-sm { color: var(--text-muted); font-size: .84rem; }
.mt-24 { margin-top: 24px; }
.mt-8  { margin-top: 8px; }
.mb-0  { margin-bottom: 0; }
.center { text-align: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .site-header { background: rgba(24,32,40,.9); }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #57a4ff);
  color: #fff; box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 1.06rem; letter-spacing: -.02em; }
.brand-name span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link {
  color: var(--text-soft); font-size: .92rem; font-weight: 550;
  padding: 7px 11px; border-radius: 9px; text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg-soft); }
.nav-user-name { font-size: .88rem; font-weight: 600; color: var(--text-soft); max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700;
}
.inline-form { display: inline; margin: 0; }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.theme-toggle:hover { background: var(--bg-soft); border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle .ico-moon { display: none; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: block; }
html[data-theme="dark"] .theme-toggle .ico-sun  { display: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px clamp(14px,3vw,26px); flex-wrap: wrap; }
.footer-note { margin: 0; font-size: .88rem; color: var(--text-muted); }
.footer-note a { color: var(--text-soft); font-weight: 550; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 30px);
}
.card + .card { margin-top: 18px; }
.card--flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px clamp(16px,2.6vw,24px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: clamp(16px,2.6vw,24px); }
.center-card { text-align: center; padding: clamp(28px, 5vw, 46px); }

/* ---------- hero ---------- */
.hero { text-align: center; max-width: 660px; margin: 0 auto clamp(20px, 4vw, 34px); }
.hero h1 { margin-bottom: .3em; }
.hero p { color: var(--text-soft); font-size: 1.04rem; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: .93rem; font-weight: 620; line-height: 1;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; box-shadow: var(--shadow-sm); }
.btn--ghost { background: var(--surface); color: var(--text-soft); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.btn--soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn--soft:hover { background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; filter: brightness(.97); }
.btn--danger { background: var(--surface); color: var(--rose); border-color: var(--border-strong); }
.btn--danger:hover { background: var(--rose-soft); border-color: var(--rose); text-decoration: none; }
.btn--sm { padding: 8px 13px; font-size: .86rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--lg { padding: 13px 24px; font-size: 1rem; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .label {
  display: block; font-size: .875rem; font-weight: 640; color: var(--text-soft); margin-bottom: 6px;
}
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.label-row .label { margin-bottom: 0; }
.hint { font-size: .8rem; color: var(--text-muted); margin: 6px 0 0; }

.input, .textarea, .select {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 11px 13px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.textarea { min-height: 220px; line-height: 1.55; font-family: var(--mono); font-size: .9rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-ring);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--rose); box-shadow: 0 0 0 3.5px rgba(217,61,85,.22);
}
.select { appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8899' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field-error { display: none; font-size: .82rem; color: var(--rose); margin-top: 6px; font-weight: 550; }
.field-error.is-shown { display: block; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; }
.checkbox-row input[type="checkbox"] {
  width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); flex: none; cursor: pointer;
}
.checkbox-row label { font-size: .88rem; color: var(--text-soft); cursor: pointer; margin: 0; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* strength meter */
.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter span { height: 4px; flex: 1; border-radius: 999px; background: var(--border); transition: background .2s var(--ease); }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--rose); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--teal); }
.pw-meter[data-score="4"] span { background: var(--teal); }

/* ---------- flash ---------- */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius); margin-bottom: 18px;
  font-size: .92rem; font-weight: 550; border: 1px solid transparent;
  animation: flashIn .3s var(--ease);
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.flash-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.flash--success { background: var(--teal-soft); color: #0b6b5f; border-color: rgba(18,165,148,.28); }
.flash--success .flash-dot { background: var(--teal); }
.flash--error { background: var(--rose-soft); color: #a52138; border-color: rgba(217,61,85,.28); }
.flash--error .flash-dot { background: var(--rose); }
.flash--info { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(47,127,240,.26); }
.flash--info .flash-dot { background: var(--accent); }
.flash--warn { background: var(--amber-soft); color: #875200; border-color: rgba(192,122,0,.28); }
.flash--warn .flash-dot { background: var(--amber); }
html[data-theme="dark"] .flash--success { color: #7fe3d5; }
html[data-theme="dark"] .flash--error { color: #ffa8b8; }
html[data-theme="dark"] .flash--info { color: #a9cbff; }
html[data-theme="dark"] .flash--warn { color: #ffd88a; }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 650; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge--teal   { background: var(--teal-soft); color: #0b6b5f; border-color: transparent; }
.badge--amber  { background: var(--amber-soft); color: #875200; border-color: transparent; }
.badge--rose   { background: var(--rose-soft); color: #a52138; border-color: transparent; }
.badge--violet { background: var(--violet-soft); color: #5433d6; border-color: transparent; }
html[data-theme="dark"] .badge--teal { color: #7fe3d5; }
html[data-theme="dark"] .badge--amber { color: #ffd88a; }
html[data-theme="dark"] .badge--rose { color: #ffa8b8; }
html[data-theme="dark"] .badge--violet { color: #c3b2ff; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- code viewer (THE long-line fix) ---------- */
.paste-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.paste-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.paste-bar-left { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.paste-bar-right { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.paste-scroll {
  overflow-x: auto;                 /* long unbroken lines scroll, never break layout */
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.paste-code-outer { display: flex; align-items: flex-start; min-width: min-content; }
.gutter {
  flex: none; user-select: none; text-align: right;
  padding: 16px 10px 16px 14px;
  font-family: var(--mono); font-size: .82rem; line-height: 1.65;
  color: var(--text-muted); background: var(--surface-2);
  border-right: 1px solid var(--code-border);
  position: sticky; left: 0; z-index: 2;
}
.gutter span { display: block; }
pre.code {
  margin: 0; padding: 16px 18px;
  font-family: var(--mono); font-size: .84rem; line-height: 1.65;
  color: var(--code-text);
  white-space: pre;                 /* preserve exact formatting */
  tab-size: 4; -moz-tab-size: 4;
  min-width: 0;
}
pre.code.wrap-mode { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.paste-code-outer.is-wrapped .gutter { display: none; }

/* token colors */
.tok-kw  { color: #a626a4; font-weight: 600; }
.tok-str { color: #0a7d3c; }
.tok-num { color: #b1560f; }
.tok-com { color: #8a94a6; font-style: italic; }
.tok-fn  { color: #2f6fd0; }
.tok-var { color: #c1372f; }
.tok-op  { color: #55606f; }
.tok-tag { color: #c1372f; }
.tok-attr{ color: #8a5800; }
html[data-theme="dark"] .tok-kw  { color: #d9a9ff; }
html[data-theme="dark"] .tok-str { color: #86e2a8; }
html[data-theme="dark"] .tok-num { color: #ffbe7a; }
html[data-theme="dark"] .tok-com { color: #7d8b9e; }
html[data-theme="dark"] .tok-fn  { color: #82b6ff; }
html[data-theme="dark"] .tok-var { color: #ff9c92; }
html[data-theme="dark"] .tok-op  { color: #a4b1c2; }
html[data-theme="dark"] .tok-tag { color: #ff9c92; }
html[data-theme="dark"] .tok-attr{ color: #ffd08a; }

.copy-btn.is-done { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }

/* ---------- meta strip ---------- */
.meta-strip {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  padding: 14px clamp(16px,2.6vw,24px);
  background: var(--surface-2); border-top: 1px solid var(--border);
  font-size: .84rem; color: var(--text-muted);
}
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item strong { color: var(--text-soft); font-weight: 600; }

/* ---------- dashboard list ---------- */
.paste-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.paste-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 16px 18px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
}
.paste-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.paste-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.paste-item-title { font-weight: 680; font-size: 1rem; color: var(--text); }
.paste-item-title:hover { color: var(--accent); }
.paste-preview {
  font-family: var(--mono); font-size: .8rem; line-height: 1.55;
  color: var(--text-muted); background: var(--code-bg);
  border: 1px solid var(--code-border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin: 0 0 12px;
  white-space: pre; overflow: hidden; text-overflow: ellipsis;
  max-height: 3.2em;
}
.paste-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.paste-item-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: clamp(34px, 6vw, 62px) 20px; }
.empty-icon {
  display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px;
  border-radius: 18px; background: var(--accent-soft); color: var(--accent);
}
.empty h3 { margin-bottom: .3em; }
.empty p { color: var(--text-muted); max-width: 40ch; margin: 0 auto 20px; }

.state-icon {
  display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%; font-size: 1.6rem; font-weight: 800;
}
.state-icon--warn { background: var(--amber-soft); color: var(--amber); }
.state-icon--lock { background: var(--accent-soft); color: var(--accent); }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 15px 17px;
}
.stat-label { font-size: .78rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 5px; }
.stat-value { font-size: 1.5rem; font-weight: 720; letter-spacing: -.02em; margin: 0; }

/* ---------- feature list (landing) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 8px; }
.feature {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 18px; transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 12px;
}
.feature h3 { font-size: .98rem; margin-bottom: .3em; }
.feature p { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---------- editor ---------- */
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.editor-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.editor-wrap { position: relative; }
#content { min-height: 340px; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.counter { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.is-warn { color: var(--amber); font-weight: 600; }
.counter.is-over { color: var(--rose); font-weight: 650; }

/* ---------- spinner / loading ---------- */
.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.4px solid rgba(255,255,255,.42); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn-label { opacity: .82; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--surface-2) 37%, var(--bg-soft) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .header-inner { height: auto; min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
  .site-nav { gap: 4px; }
  .nav-user-name { display: none; }
  .nav-link { padding: 6px 9px; font-size: .88rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  pre.code { font-size: .78rem; padding: 13px 14px; }
  .gutter { font-size: .76rem; padding: 13px 8px 13px 11px; }
  .card { border-radius: var(--radius); }
  .paste-bar { padding: 9px 11px; }
  .btn { padding: 10px 15px; }
}
@media (max-width: 460px) {
  .brand-name { font-size: .98rem; }
  .paste-item-foot { flex-direction: column; align-items: stretch; }
  .paste-item-foot .btn { width: 100%; }
}
@media print {
  .site-header, .site-footer, .paste-bar-right, .meta-strip { display: none !important; }
  .paste-shell { border: none; box-shadow: none; }
}
