/* Shared MadTimes Press Floor top nav
   Keep MADTIMES logo + tools on one rail everywhere (home, card, explore, etc).
   Matches the site content column: min(1120px, 100% - 40px). */
.mad-nav-root,
#mad-nav {
  --mad-nav-max: 1120px;
  --mad-nav-gutter: 20px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topnav .wordmark {
  display: inline-block;
  position: relative;
  isolation: isolate;
  flex: none;
  margin: 0;
  padding: 8px 14px;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ff4d00;
  background: var(--bg);
  border: 2px solid #ff4d00;
  border-radius: 4px;
  text-shadow: none;
  white-space: nowrap;
}
.topnav .wordmark::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  box-shadow:
    0 0 8px rgba(255, 77, 0, 0.75),
    0 0 18px rgba(255, 77, 0, 0.35);
}
[data-theme="dark"] .topnav .wordmark {
  color: #ff5a1f;
  border-color: #ff5a1f;
}
[data-theme="dark"] .topnav .wordmark::after {
  box-shadow:
    0 0 8px rgba(255, 90, 31, 0.95),
    0 0 22px rgba(255, 70, 0, 0.6);
}
.topnav h1,
h1.mad-nav-brand {
  margin: 0;
  font-size: inherit;
  line-height: 1;
  flex: none;
  min-width: 0;
}


.topnav nav.sections,
nav.sections {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: min(var(--mad-nav-max, 1120px), calc(100% - (var(--mad-nav-gutter, 20px) * 2)));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 12px 0;
}
.nav-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
  margin-left: auto;
  min-width: 0;
}
.nav-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-create:hover {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 50%, var(--line));
  transform: translateY(-1px);
}
.floor-open {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--orange) 45%, var(--line));
  border-radius: 14px;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--orange) 35%, transparent), transparent 55%),
    var(--raised);
  color: var(--orange);
  cursor: pointer;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--orange) 12%, transparent), 0 8px 18px rgba(0,0,0,0.16);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.floor-open:hover {
  transform: translateY(-2px) rotate(-2deg);
  border-color: var(--orange);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--orange) 35%, transparent), 0 14px 28px rgba(255, 77, 0, 0.28);
}
.floor-open:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.floor-open[aria-expanded="true"] {
  transform: rotate(8deg) scale(0.96);
  background: var(--orange);
  color: #1a0e08;
}
.floor-open .floor-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.floor-open .floor-bars {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  display: grid;
  gap: 3px;
  opacity: 0.85;
}
.floor-open .floor-bars i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.floor-open .floor-bars i:nth-child(1) { width: 100%; }
.floor-open .floor-bars i:nth-child(2) { width: 72%; margin-left: auto; }
.floor-open .floor-bars i:nth-child(3) { width: 88%; }
.floor-open[aria-expanded="true"] .floor-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.floor-open[aria-expanded="true"] .floor-bars i:nth-child(2) { opacity: 0; transform: scaleX(0); }
.floor-open[aria-expanded="true"] .floor-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); width: 100%; }

.floor-veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(255, 77, 0, 0.28), transparent 55%),
    radial-gradient(700px 480px at 100% 10%, rgba(255, 140, 60, 0.12), transparent 50%),
    rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.floor-veil.is-open {
  opacity: 1;
  pointer-events: auto;
}
.floor-veil[hidden] { display: none; }
.floor-panel {
  width: min(1080px, 100%);
  max-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line));
  border-radius: 24px;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--raised) 88%, #2a140c), var(--raised) 40%, var(--bg));
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 77, 0, 0.08);
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.floor-veil.is-open .floor-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.floor-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.floor-head .kicker {
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.floor-head h2 {
  margin: 2px 0 0;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.floor-head .floor-copy { flex: 1; min-width: 0; }
.floor-head .floor-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 28rem;
}
.floor-close {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.floor-close:hover { border-color: var(--orange); color: var(--orange); }
.floor-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.floor-col {
  min-width: 0;
  padding: 4px;
}
.floor-col h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.floor-links {
  display: grid;
  gap: 8px;
}
.floor-link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.floor-veil.is-open .floor-link {
  transform: translateY(0);
  opacity: 1;
}
.floor-veil.is-open .floor-col:nth-child(1) .floor-link:nth-child(1) { transition-delay: 0.04s; }
.floor-veil.is-open .floor-col:nth-child(1) .floor-link:nth-child(2) { transition-delay: 0.08s; }
.floor-veil.is-open .floor-col:nth-child(1) .floor-link:nth-child(3) { transition-delay: 0.12s; }
.floor-veil.is-open .floor-col:nth-child(1) .floor-link:nth-child(4) { transition-delay: 0.16s; }
.floor-veil.is-open .floor-col:nth-child(1) .floor-link:nth-child(5) { transition-delay: 0.2s; }
.floor-veil.is-open .floor-col:nth-child(2) .floor-link:nth-child(1) { transition-delay: 0.1s; }
.floor-veil.is-open .floor-col:nth-child(2) .floor-link:nth-child(2) { transition-delay: 0.14s; }
.floor-veil.is-open .floor-col:nth-child(2) .floor-link:nth-child(3) { transition-delay: 0.18s; }
.floor-veil.is-open .floor-col:nth-child(2) .floor-link:nth-child(4) { transition-delay: 0.22s; }
.floor-veil.is-open .floor-col:nth-child(3) .floor-link:nth-child(1) { transition-delay: 0.16s; }
.floor-veil.is-open .floor-col:nth-child(3) .floor-link:nth-child(2) { transition-delay: 0.2s; }
.floor-veil.is-open .floor-col:nth-child(3) .floor-link:nth-child(3) { transition-delay: 0.24s; }
.floor-veil.is-open .floor-col:nth-child(3) .floor-link:nth-child(4) { transition-delay: 0.28s; }
.floor-link:hover,
.floor-link:focus-visible {
  border-color: color-mix(in srgb, var(--orange) 55%, var(--line));
  background: color-mix(in srgb, var(--orange) 10%, var(--bg));
  box-shadow: 0 10px 24px rgba(255, 77, 0, 0.12);
  outline: none;
}
.floor-link .idx {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
}
.floor-link strong {
  display: block;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.floor-link span.dek {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.floor-link .go {
  font-size: 14px;
  color: var(--orange);
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.floor-link:hover .go { transform: translateX(3px); opacity: 1; }
.floor-link[hidden] { display: none; }
.floor-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.floor-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.floor-heat {
  position: absolute;
  inset: auto -20% -30% -20%;
  height: 45%;
  pointer-events: none;
  background: radial-gradient(50% 60% at 50% 100%, rgba(255, 77, 0, 0.22), transparent 70%);
  animation: floor-heat 4.5s ease-in-out infinite;
}
@keyframes floor-heat {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-8px); }
}
@media (max-width: 900px) {
  .floor-body { grid-template-columns: 1fr 1fr; }
  .nav-create { display: none; }
}
@media (max-width: 860px) {
  .topnav nav.sections,
  nav.sections {
    width: 100%;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
}
@media (max-width: 640px) {
  .floor-body { grid-template-columns: 1fr; gap: 14px; padding: 14px 14px 18px; }
  .floor-head { padding: 16px 14px 12px; }
  .floor-head h2 { font-size: 30px; }
  .floor-foot { padding: 12px 14px 16px; }
  .floor-panel { border-radius: 18px; }
  .topnav .wordmark {
    font-size: 15px;
    padding: 7px 10px;
    letter-spacing: 0.1em;
  }
  .nav-tools { gap: 8px; }
  .topup-btn {
    padding: 6px 9px 6px 8px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }
  .topup-btn .topup-crown { width: 1rem; height: 1rem; }
  .topup-btn .topup-label { max-width: 9.5ch; overflow: hidden; text-overflow: ellipsis; }
  .topup-btn .bal { padding-left: 0.35rem; }
  .avatar { width: 36px; height: 36px; }
  .floor-open { width: 42px; height: 42px; border-radius: 12px; }
  .floor-open .floor-bars { left: 11px; right: 11px; }
}
@media (max-width: 380px) {
  .topup-btn .topup-label { display: none; }
  .topup-btn .bal {
    padding-left: 0;
    border-left: 0;
  }
  .topup-btn { padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .floor-veil, .floor-panel, .floor-link, .floor-heat, .floor-open { transition: none !important; animation: none !important; }
  .floor-veil.is-open .floor-link { opacity: 1; transform: none; }
}


.topup-btn {
  --topup-ink: #ff4d00;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  overflow: visible;
  margin: 0;
  padding: 7px 12px 7px 10px;
  border: 2px solid #ff4d00;
  border-radius: 4px;
  background: var(--bg);
  color: #ff4d00;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transform: translateZ(0);
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.topup-btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  box-shadow:
    0 0 8px rgba(255, 77, 0, 0.75),
    0 0 18px rgba(255, 77, 0, 0.35);
  animation: topup-breathe 3.4s ease-in-out infinite;
}
.topup-btn .topup-crown {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  display: block;
  color: currentColor;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(255, 77, 0, 0.45));
  animation: topup-crown 2.8s ease-in-out infinite;
}
.topup-btn .topup-crown .gem {
  fill: var(--bg);
  stroke: currentColor;
  stroke-width: 1.2;
}
.topup-btn .topup-copy {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}
.topup-btn .topup-label {
  position: relative;
}
.topup-btn .bal {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 0 0 0.45rem;
  border: 0;
  border-left: 1.5px solid color-mix(in srgb, currentColor 55%, transparent);
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  box-shadow: none;
}
.topup-btn .topup-sheen { display: none; }
.topup-btn:hover {
  color: #ff4d00;
  border-color: #ff4d00;
  background: color-mix(in srgb, var(--bg) 88%, #ff4d00);
  filter: none;
  transform: translateY(-1px);
  animation: none;
}
.topup-btn:hover::after {
  animation: none;
  box-shadow:
    0 0 10px rgba(255, 77, 0, 0.9),
    0 0 24px rgba(255, 77, 0, 0.45);
}
.topup-btn:active {
  transform: translateY(0);
}
.topup-btn:focus-visible {
  outline: 2px solid #ff4d00;
  outline-offset: 3px;
}
.topup-btn.is-guest {
  background: var(--bg);
  color: #ff4d00;
  border-color: #ff4d00;
  box-shadow: none;
}
.topup-btn.is-guest .topup-crown {
  color: currentColor;
  filter: drop-shadow(0 0 5px rgba(255, 77, 0, 0.4));
}
.topup-btn.is-guest .bal { display: none; }
.topup-btn.is-low {
  animation: none;
}
.topup-btn.is-low::after {
  animation: topup-urgent 1.15s ease-in-out infinite;
}
[data-theme="dark"] .topup-btn,
[data-theme="dark"] .topup-btn:hover,
[data-theme="dark"] .topup-btn.is-guest {
  color: #ff5a1f;
  border-color: #ff5a1f;
}
[data-theme="dark"] .topup-btn::after,
[data-theme="dark"] .topup-btn:hover::after {
  box-shadow:
    0 0 8px rgba(255, 90, 31, 0.95),
    0 0 22px rgba(255, 70, 0, 0.55);
}
[data-theme="dark"] .topup-btn .topup-crown .gem {
  fill: var(--bg);
}
@keyframes topup-breathe {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(255, 77, 0, 0.55),
      0 0 16px rgba(255, 77, 0, 0.28);
  }
  50% {
    box-shadow:
      0 0 10px rgba(255, 77, 0, 0.9),
      0 0 24px rgba(255, 77, 0, 0.45);
  }
}
@keyframes topup-crown {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-0.5px) scale(1.04); }
}
@keyframes topup-urgent {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(255, 77, 0, 0.7),
      0 0 18px rgba(255, 77, 0, 0.35);
  }
  50% {
    box-shadow:
      0 0 14px rgba(255, 77, 0, 1),
      0 0 30px rgba(255, 90, 31, 0.65);
  }
}
@media (prefers-reduced-motion: reduce) {
  .topup-btn::after,
  .topup-btn .topup-crown,
  .topup-btn.is-low::after { animation: none !important; }
  .topup-btn:hover { transform: none; }
}
.topnav nav.sections a.wordmark,
.topnav nav.sections a.wordmark:hover {
  color: #ff4d00;
  padding: 8px 14px;
}
[data-theme="dark"] .topnav nav.sections a.wordmark,
[data-theme="dark"] .topnav nav.sections a.wordmark:hover { color: #ff5a1f; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  letter-spacing: 0.12em;
}
.theme-btn:hover { border-color: var(--orange); }
.theme-btn:focus-visible,
nav.sections a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.account {
  position: relative;
  flex: none;
}
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff4d00;
  color: #1a0e08;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 77, 0, 0.4);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-letters { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.avatar.has-photo { overflow: hidden; }
.avatar.has-photo svg,
.avatar.has-photo .avatar-letters,
.avatar.has-name svg { display: none; }
.avatar:hover { filter: brightness(1.06); }
.avatar:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #ff4d00; }
.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.account-menu[hidden] { display: none; }
.account-menu .theme-btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: 8px;
}
.who {
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.who[hidden] { display: none; }
.menu-link {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.menu-link:hover { background: var(--bg); color: var(--orange); }
.menu-link:disabled { color: var(--muted); cursor: default; background: transparent; }
.menu-link[hidden] { display: none; }
.account-menu a.menu-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
}
.account-menu a.menu-link:hover { background: var(--bg); color: var(--orange); }
.account-menu a.menu-link[hidden] { display: none; }
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) 0 50%, var(--orange) 0 100%);
  border: 1px solid var(--line);
}

/* SKETCH quick press — shared floating assistant */
/* Quick press — floating mascot + mini studio */
.buddy-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 45;
  width: 92px;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.42));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}
.buddy-fab:hover { transform: translateY(-4px) rotate(-2deg); filter: drop-shadow(0 22px 32px rgba(255, 77, 0, 0.35)); }
.buddy-fab:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.buddy-fab[aria-expanded="true"] { transform: translateY(-2px) scale(0.92); opacity: 0.35; pointer-events: none; }
.buddy-fab-card {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #ff4d00;
  padding: 4px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 55%, transparent);
}
.buddy-fab-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: #141210;
}
.buddy-fab-tag {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 55%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.buddy-fab { isolation: isolate; }
.buddy-dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 46;
  width: min(380px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 55%),
    var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform-origin: 100% 100%;
  animation: buddy-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.buddy-dock[hidden] { display: none; }
@keyframes buddy-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.buddy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid var(--line);
}
.buddy-head img {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid var(--orange);
  background: #141210;
}
.buddy-head .who { flex: 1; min-width: 0; }
.buddy-head .who strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.buddy-head .who span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.buddy-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px;
}
.buddy-x:hover { color: var(--orange); }
.buddy-rail {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.buddy-rail:empty { display: none; }
.buddy-thumb {
  flex: none;
  width: 44px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #171410;
  cursor: pointer;
  position: relative;
}
.buddy-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buddy-thumb[aria-pressed="true"] { outline: 2px solid var(--orange); outline-offset: 1px; }
.buddy-thumb .wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 15, 13, 0.55);
  color: #fffaf4;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.buddy-stage {
  padding: 12px 14px 0;
  display: grid;
  justify-items: center;
}
.buddy-face {
  width: min(220px, 68%);
}
.buddy-face .face { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); }
.buddy-face-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.buddy-face-link img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.buddy-empty {
  width: min(220px, 68%);
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.buddy-chat {
  flex: 1;
  min-height: 72px;
  max-height: 140px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buddy-msg {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.buddy-msg.mad {
  align-self: flex-start;
  background: color-mix(in srgb, var(--orange) 14%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--line));
}
.buddy-msg.you {
  align-self: flex-end;
  background: var(--bg);
  border: 1px solid var(--line);
}
.buddy-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--raised) 88%, var(--bg));
}
.buddy-compose input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
}
.buddy-compose button {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--orange);
  color: var(--orange-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.buddy-compose button:disabled { opacity: 0.55; cursor: default; }
.buddy-open-link {
  display: block;
  margin: 8px auto 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.buddy-open-link:hover { color: var(--orange); }
.buddy-open-link[hidden] { display: none; }
.buddy-chat { max-height: 220px; }
.buddy-msg.rich { max-width: 100%; padding: 10px 12px; }
.buddy-msg .buddy-title {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}
.buddy-gauges {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
}
.buddy-gauge {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.buddy-gauge span { color: var(--muted); letter-spacing: 0.04em; }
.buddy-gauge b { text-align: right; font-variant-numeric: tabular-nums; }
.buddy-gauge .track {
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}
.buddy-gauge .fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--orange) 70%, #ffd7a1), var(--orange));
}
.buddy-gauge.risk .fill {
  background: linear-gradient(90deg, #8a6a4a, #5c4a3a);
}
.buddy-verdict {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.buddy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.buddy-actions button,
.buddy-actions a {
  border: 1px solid color-mix(in srgb, var(--orange) 45%, var(--line));
  background: var(--orange);
  color: var(--orange-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.buddy-actions button.ghost,
.buddy-actions a.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.buddy-actions button:disabled { opacity: 0.55; cursor: default; }
@media (max-width: 520px) {
  .buddy-dock {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-height: calc(100dvh - 16px);
  }
  .buddy-fab { width: 78px; }
}

/* Press offline assistant — UPLO mini studio */
.press-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 48;
  width: 92px;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.42));
  isolation: isolate;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}
.press-fab[hidden] { display: none; }
.press-fab:hover {
  transform: translateY(-4px) rotate(2deg);
  filter: drop-shadow(0 22px 32px rgba(255, 77, 0, 0.35));
}
.press-fab[aria-expanded="true"] { opacity: 0.35; pointer-events: none; }
.press-fab-card {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #ff4d00;
  padding: 4px;
  box-shadow: 0 0 0 2px color-mix(in srgb, #ff6a2a 60%, transparent);
}
.press-fab-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: #171410;
}
.press-fab-tag {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 55%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ff4d00;
  color: #1a0e08;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.press-dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 49;
  width: min(400px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(255, 77, 0, 0.18), transparent 55%),
    var(--raised, #1b1916);
  color: var(--ink, #f4efe8);
  border: 1px solid color-mix(in srgb, #ff4d00 35%, var(--line, #322d28));
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.press-dock[hidden] { display: none; }
.press-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid var(--line, #322d28);
}
.press-head .press-avatar {
  width: 42px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px color-mix(in srgb, #ff4d00 50%, transparent);
}
.press-head .who { flex: 1; min-width: 0; }
.press-head .who strong { display: block; font-size: 14px; letter-spacing: -0.02em; }
.press-head .who span {
  display: block;
  margin-top: 2px;
  color: var(--muted, #b4a89c);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.press-x {
  border: 0;
  background: transparent;
  color: var(--muted, #b4a89c);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px;
}
.press-body {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.press-lead, .press-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink, #f4efe8); }
.press-note { color: var(--muted, #b4a89c); }
.press-hint { margin: 0; font-size: 11px; line-height: 1.4; color: var(--muted, #b4a89c); }
.press-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.press-tabs button {
  appearance: none;
  border: 1px solid rgba(244, 239, 232, 0.18);
  background: transparent;
  color: var(--ink, #f4efe8);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.press-tabs button[aria-selected="true"] {
  background: #ff4d00;
  border-color: #ff4d00;
  color: #1a0e08;
}
.press-panel { display: grid; gap: 10px; }
.press-studio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.press-drop {
  min-height: 168px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, #ff4d00 55%, var(--line, #322d28));
  background: color-mix(in srgb, #171410 80%, transparent);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.press-drop.is-hot {
  border-color: #ff6a2a;
  background: color-mix(in srgb, #ff4d00 16%, #171410);
}
.press-drop-empty { text-align: center; padding: 1rem; color: var(--muted, #b4a89c); }
.press-drop-empty strong {
  display: block;
  color: var(--ink, #f4efe8);
  font-size: 14px;
  margin-bottom: 4px;
}
.press-drop-empty span { font-size: 12px; }
.press-preview {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}
.press-stamp { justify-self: start; }
.press-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #b4a89c);
}
.press-panel textarea,
.press-panel input[type="password"],
.press-panel input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(244, 239, 232, 0.18);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink, #f4efe8);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.press-panel textarea:focus,
.press-panel input:focus {
  outline: 2px solid rgba(255, 77, 0, 0.45);
  outline-offset: 1px;
}
.press-panel .primary,
.press-studio-actions .primary,
.press-actions a.primary,
.press-actions button.primary {
  justify-self: start;
  background: #ff4d00;
  border-color: #ff4d00;
  color: #1a0e08;
}
.press-studio-actions button,
.press-panel button {
  border: 1px solid var(--line, #322d28);
  background: var(--bg, #100f0d);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.press-studio-actions button.ghost,
.press-actions button.ghost { background: transparent; }
.press-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.press-metrics .cell {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line, #322d28);
  background: color-mix(in srgb, var(--bg, #100f0d) 70%, transparent);
}
.press-metrics b { display: block; font-size: 16px; letter-spacing: -0.02em; }
.press-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted, #b4a89c);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.press-days { display: flex; gap: 6px; flex-wrap: wrap; }
.press-days button, .press-actions button, .press-actions a {
  border: 1px solid var(--line, #322d28);
  background: var(--bg, #100f0d);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.press-days button[aria-pressed="true"], .press-actions a.primary, .press-actions button.primary {
  background: #ff4d00;
  border-color: #ff4d00;
  color: #1a0e08;
}
.press-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.press-daylist h3, .press-ledger h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #b4a89c);
}
.press-daylist ul, .press-ledger ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.press-daylist li, .press-ledger li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #322d28) 70%, transparent);
}
.press-ledger li span:last-child { color: var(--muted, #b4a89c); text-align: right; }
html.press-offline .buddy-fab,
html.press-offline .desk-fab { display: none !important; }
@media (max-width: 520px) {
  .press-dock { right: 8px; left: 8px; bottom: 8px; width: auto; }
  .press-fab { width: 78px; }
}
