/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── IKEA Design Tokens ─────────────────────────────────── */
:root {
  --n1: #FFFFFF;
  --n2: #E8E6E1;
  --n3: #D8D5CF;
  --n4: #CCCCCC;
  --n5: #929292;
  --n6: #484848;
  --n7: #111111;

  --text:  #111111;
  --text2: #484848;
  --text3: #767676;

  --blue:   #0058A3;
  --yellow: #FFDB00;

  --bg:      #EDEDEA;
  --surface: #FFFFFF;
  --border:  #E0DED9;

  --radius-s:   4px;
  --radius-m:   8px;
  --radius-cap: 64px;

  --shadow:       0px 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-hover: 0px 8px 24px rgba(0, 0, 0, 0.14);

  --gap:      16px;
  --header-h: 56px;

  --ease-spring: cubic-bezier(0.2, 0.8, 0.3, 1);
  --ease-enter:  cubic-bezier(0, 0, 0.2, 1);
}

/* ─── Base ───────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', 'Noto Sans', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

/* ─── Header ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 28px;
  width: auto;
  display: block;
  user-select: none;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 22px;
  border-radius: var(--radius-cap);
  transition: background 0.1s;
}
.icon-btn:hover { background: var(--n2); }

#profile-btn {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

#profile-btn.logged-in {
  background: var(--n7);
  color: var(--n1);
}
#profile-btn.logged-in:hover { background: var(--n6); }

/* ─── Header right group ─────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Credit pill ────────────────────────────────────────── */
.credit-wrap {
  position: relative;
}

.credit-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  background: var(--n2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-cap);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}
.credit-pill:hover { background: var(--n3); }
.credit-pill i { font-size: 13px; }

.credit-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 200px;
  background: #fdfcf8;
  border: 1.5px dashed #c4c2b8;
  border-radius: 2px;
  padding: 12px 14px;
  z-index: 210;
  box-shadow: var(--shadow);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
}

.buy-credits-link {
  display: block;
  margin-top: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--n7, #2a2a2a);
  border: 1.5px dashed currentColor;
  border-radius: 2px;
  padding: 6px 8px;
  transition: background 0.15s ease;
}
.buy-credits-link:hover { background: rgba(0,0,0,0.05); }

.promo-modal-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  margin: 4px 0 10px;
  background: #f0eee7;
}
.promo-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-promo .card-img-wrap { background: #f0eee7; }
.card-promo .card-img-wrap img[src=""],
.card-promo .card-img-wrap img:not([src]) { opacity: 0; }

/* ─── Main ───────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap);
}

/* ─── Gallery grid ───────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Card ───────────────────────────────────────────────── */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease-enter), transform 0.2s var(--ease-enter);
  animation: card-enter 0.4s var(--ease-spring) both;
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card:active { transform: translateY(0); }

/* ─── Card image ─────────────────────────────────────────── */
.card-img-wrap {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--n2);
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s var(--ease-spring);
}

.card:hover .card-img-wrap img { transform: scale(1.04); }

.card-placeholder {
  color: rgba(0, 0, 0, 0.18);
  font-size: 32px;
}

.card-vote-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: var(--radius-cap);
  padding: 3px 8px 3px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.card-vote-badge:hover  { background: rgba(255, 255, 255, 1); transform: scale(1.1); }
.card-vote-badge:active { transform: scale(1); }
.card-vote-badge.voted       { background: rgba(255,255,255,0.92); color: #C84530; }
.card-vote-badge.voted:hover { background: rgba(255,255,255,1);    color: #C84530; }

.card-vote-badge i { font-size: 11px; }

/* ─── Card body ──────────────────────────────────────────── */
.card-body { padding: 12px 12px 14px; }

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.card-creator {
  font-size: 12px;
  font-weight: 400;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Skeleton ───────────────────────────────────────────── */
.skeleton {
  background: var(--surface);
  border-radius: var(--radius-m);
  overflow: hidden;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-img {
  aspect-ratio: 1;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body { padding: 12px 12px 14px; }

.skeleton-line {
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 6px;
}

.skeleton-line.short { width: 55%; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 100px 24px;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state i { font-size: 40px; }
.empty-state p { font-size: 14px; line-height: 1.6; }

/* ─── Modal overlay ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlay-in 0.2s var(--ease-enter) both;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes overlay-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes panel-down {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to   { transform: translateY(40px) scale(0.98); opacity: 0; }
}

@keyframes panel-out {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(0.95); opacity: 0; }
}

.modal-overlay.closing {
  animation: overlay-out 0.22s var(--ease-enter) both;
}

.modal-overlay.closing .modal-panel {
  animation: panel-down 0.22s var(--ease-enter) both;
}

@media (min-width: 700px) {
  .modal-overlay.closing .modal-panel {
    animation: panel-out 0.22s var(--ease-enter) both;
  }
}

@media (min-width: 700px) {
  .modal-overlay { align-items: center; padding: 24px; }
}

/* ─── Modal panel ────────────────────────────────────────── */
@keyframes panel-up {
  0%   { transform: translateY(40px) scale(0.98); opacity: 0; }
  65%  { transform: translateY(-4px) scale(1.005); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes panel-in {
  0%   { transform: scale(0.95); opacity: 0; }
  65%  { transform: scale(1.01); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-panel {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  overflow: auto;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: panel-up 0.45s var(--ease-spring) both;
}

@media (min-width: 700px) {
  .modal-panel {
    flex-direction: row;
    max-width: 840px;
    max-height: 76dvh;
    border-radius: var(--radius-m);
    overflow: hidden;
    animation: panel-in 0.4s var(--ease-spring) both;
  }
}

/* ─── Modal close ────────────────────────────────────────── */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-cap);
  font-size: 15px;
  color: var(--text);
  transition: background 0.1s, transform 0.15s;
}
.modal-close:hover { background: var(--n1); transform: scale(1.08); }

/* ─── Modal image ────────────────────────────────────────── */
.modal-image-wrap {
  aspect-ratio: 1;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--n2);
}

@media (min-width: 700px) {
  .modal-image-wrap {
    width: 44%;
    aspect-ratio: unset;
    align-self: stretch;
  }
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: img-float 0.45s 0.1s var(--ease-spring) both;
}

@keyframes img-float {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-image-placeholder {
  color: rgba(0, 0, 0, 0.18);
  font-size: 56px;
}

/* ─── Modal right column ─────────────────────────────────── */
.modal-right {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

@media (min-width: 700px) { .modal-right { overflow: hidden; } }

/* ─── Modal body ─────────────────────────────────────────── */
.modal-body {
  padding: 20px;
  overflow: visible;
  flex: 1;
}

@media (min-width: 700px) {
  .modal-body {
    overflow-y: auto;
    padding-top: 52px;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─── Modal footer ───────────────────────────────────────── */
.modal-footer {
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Share button ───────────────────────────────────────── */
.share-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-cap);
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
  transition: background 0.1s, border-color 0.1s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover  { background: var(--n2); border-color: var(--n4); transform: translateY(-1px); }
.share-btn:active { transform: translateY(0); }
.share-btn.loading { opacity: 0.5; pointer-events: none; }

@media (min-width: 700px) { .modal-footer { position: static; } }

/* ─── Vote button ────────────────────────────────────────── */
.vote-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--n7);
  border: none;
  border-radius: var(--radius-cap);
  padding: 14px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--n1);
  font-family: inherit;
  transition: background 0.1s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.vote-btn i { font-size: 18px; }
.vote-btn:hover  { background: var(--n6); transform: translateY(-1px); }
.vote-btn:active { transform: translateY(0); }

.vote-btn.voted {
  background: var(--yellow);
  color: var(--text);
}
.vote-btn.voted:hover { background: #e6c500; }

.vote-label { font-size: 14px; font-weight: 700; }

/* ─── Floating action buttons ───────────────────────────── */
@keyframes fab-enter {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.fab-group {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  z-index: 150;
  animation: fab-enter 0.5s 0.25s var(--ease-spring) both;
}

@media (min-width: 700px) {
  .fab-group {
    left: unset;
    right: 16px;
    justify-content: flex-end;
  }
}

.fab {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-cap);
  padding: 13px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.2s, transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.fab:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.22); }
.fab:active { transform: translateY(0); }
.fab i { font-size: 16px; }

.fab-primary   { background: var(--n7); color: var(--n1); }
.fab-primary:hover  { background: var(--n6); }

#fab-create {
  animation: fab-enter 0.5s 0.25s var(--ease-spring) both, fab-bounce 2.4s 1.6s ease-in-out infinite;
}
#fab-create:hover { animation: fab-enter 0.5s 0.25s var(--ease-spring) both; }

@keyframes fab-bounce {
  0%, 60%, 100% { transform: translateY(0);    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }
  70%           { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); }
  80%           { transform: translateY(0);    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }
  88%           { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20); }
}

@media (prefers-reduced-motion: reduce) {
  #fab-create { animation: fab-enter 0.5s 0.25s var(--ease-spring) both; }
}

.fab-secondary { background: var(--n1); color: var(--n7); }
.fab-secondary:hover { background: var(--n2); }

#fab-info {
  background: var(--yellow);
  color: var(--n7);
  animation: fab-enter 0.5s 0.25s var(--ease-spring) both, fab-attention 0.65s 2.2s ease 4;
}
#fab-info:hover { background: #e6c500; }

@keyframes fab-attention {
  0%, 100% { transform: translateY(0);    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }
  40%       { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(255, 219, 0, 0.55); }
}

/* ─── How it works modal (slideshow) ─────────────────────── */
#how-overlay {
  align-items: center;
  padding: 16px;
  z-index: 210;
}

#how-overlay.closing .hiw-panel {
  animation: panel-out 0.22s var(--ease-enter) both;
}

.hiw-panel {
  position: relative;
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
  animation: panel-in 0.4s var(--ease-spring) both;
}

.hiw-skip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-cap);
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: var(--text3);
  text-transform: uppercase;
  transition: background 0.1s, color 0.1s;
}
.hiw-skip:hover { background: var(--n1); color: var(--text); }
.hiw-skip i { font-size: 10px; }

.hiw-slides-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hiw-slide {
  display: none;
  padding: 48px 20px 16px;
}
.hiw-slide.active {
  display: block;
  animation: pane-enter 0.3s var(--ease-spring) both;
}

.hiw-step-num {
  font-family: 'Courier New', Courier, monospace;
  font-size: 40px;
  font-weight: bold;
  color: var(--n3);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.hiw-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface);
}

.hiw-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.hiw-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--n3);
  transition: background 0.2s, transform 0.2s;
}
.hiw-dot.active {
  background: var(--n7);
  transform: scale(1.3);
}

.hiw-next-btn {
  width: 100%;
  margin: 0;
}

.t-note {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  line-height: 1.5;
}

/* ─── Ticket ─────────────────────────────────────────────── */
.ticket {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  background: #fdfcf8;
  border: 1.5px dashed #c4c2b8;
  border-radius: 2px;
  padding: 18px 16px;
  line-height: 1.4;
}

.t-title {
  font-family: 'Young Serif', serif;
  font-weight: 400;
  text-align: center;
  font-size: 26px;
  letter-spacing: 0;
  margin-bottom: 10px;
  line-height: 1.2;
}

.t-div { border-top: 1px dashed #c4c2b8; margin: 10px 0; }

.t-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 11px;
}

.t-row span:first-child { color: #888; flex-shrink: 0; }
.t-row span:last-child  { font-weight: bold; text-align: right; text-transform: uppercase; }

.t-col-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 6px;
}

.t-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.t-item-name { flex: 1; font-weight: bold; text-transform: uppercase; letter-spacing: 0.02em; }
.t-item-cat  { font-size: 10px; color: #888; text-align: right; flex-shrink: 0; }

.t-thanks {
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ─── Share card (off-screen, rendered to image) ─────────── */
#share-card {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 400px;
  height: 711px; /* 9:16 */
  background: #fdfcf8;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sc-image-wrap {
  width: 100%;
  height: 320px;
  flex-shrink: 0;
  overflow: hidden;
}

#sc-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#sc-ticket {
  flex: 1;
  overflow: hidden;
  padding: 0 20px;
}

#sc-ticket .ticket {
  border: none;
  background: transparent;
  padding: 14px 0 0;
}

.sc-brand {
  flex-shrink: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  text-align: center;
  padding: 10px 20px 18px;
  color: #aaa;
  border-top: 1px dashed #c4c2b8;
  margin: 0 20px;
}

/* ─── Utility ────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ─── Filter bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: var(--gap);
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-cap);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.filter-btn i { font-size: 12px; }

.filter-btn:hover { background: var(--n2); border-color: var(--n5); color: var(--text); }
.filter-btn.active { background: var(--n1); border-color: var(--n7); border-width: 2px; color: var(--n7); }

/* ─── Simple panel (login + profile modals) ──────────────── */
.simple-panel {
  background: var(--surface);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 92dvh;
  position: relative;
  padding: 52px 20px 32px;
  animation: panel-up 0.45s var(--ease-spring) both;
}

@media (min-width: 700px) {
  .simple-panel {
    border-radius: var(--radius-m);
    max-height: 82dvh;
    animation: panel-in 0.4s var(--ease-spring) both;
  }
}

.modal-overlay.closing .simple-panel {
  animation: panel-down 0.22s var(--ease-enter) both;
}

@media (min-width: 700px) {
  .modal-overlay.closing .simple-panel {
    animation: panel-out 0.22s var(--ease-enter) both;
  }
}

/* ─── Auth form ──────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.auth-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 10px 12px;
  border: 1.5px solid #c4c2b8;
  border-radius: var(--radius-s);
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--text);
}
.auth-input:focus { border-color: var(--n7); }

.policy-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #888;
  cursor: pointer;
  line-height: 1.5;
}
.policy-check input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; cursor: pointer; }

.auth-submit {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--n7);
  color: var(--n1);
  border: none;
  border-radius: var(--radius-cap);
  padding: 13px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.1s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.auth-submit:hover  { background: var(--n6); transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.5; pointer-events: none; }

.auth-msg {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
}
.auth-msg.success { color: #3A8C6C; }
.auth-msg.error   { color: #C84530; }

/* ─── Create tupper modal ────────────────────────────────── */
.shape-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0 4px;
}
.shape-picker button {
  aspect-ratio: 1;
  border: 1.5px solid #c4c2b8;
  border-radius: var(--radius-s);
  background: #fff;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, transform 0.1s;
}
.shape-picker button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shape-picker button.selected {
  border-color: var(--n7);
  border-width: 2px;
}
.shape-picker button:hover { transform: translateY(-1px); }

.ingredient-list {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 24px;
  padding: 6px 0;
}
.ingredient-list .ing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: #f4f2ea;
  border-radius: var(--radius-s);
}
.ingredient-list .ing-item .ing-pos { color: #888; min-width: 18px; }
.ingredient-list .ing-item .ing-name { flex: 1; }
.ingredient-list .ing-item .ing-cat { font-size: 10px; color: #888; text-transform: uppercase; }
.ingredient-list .ing-item button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}
.ingredient-list .ing-empty { color: #aaa; text-align: center; padding: 4px; }

.ing-add {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 6px;
  margin: 4px 0;
}

.ing-add > * { min-width: 0; }

.ing-search-wrap {
  position: relative;
}

.ing-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--n7);
  border-top: none;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  z-index: 20;
  max-height: 180px;
  overflow-y: auto;
}

.ing-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  background: none;
  border: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
}

.ing-dropdown button:hover { background: #f4f2ea; }

.ing-no-results {
  display: block;
  padding: 7px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #aaa;
}
.ing-add-btn {
  padding: 0 14px !important;
  min-width: 44px;
}

.cooking-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}
.cooking-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e4e2da;
  border-top-color: var(--n7);
  border-radius: 50%;
  animation: cooking-spin 0.8s linear infinite;
}
@keyframes cooking-spin { to { transform: rotate(360deg); } }
.cooking-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #666;
}

.cooking-status {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-top: 2px;
}

.cooked-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}
.cooked-state img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-s);
}
.cooked-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #3A8C6C;
}

/* ─── Profile components ─────────────────────────────────── */
.profile-alias-wrap { margin: 8px 0; }

.profile-alias-wrap > label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  color: #888;
  letter-spacing: 0.06em;
  font-weight: bold;
}

.profile-alias-input {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 8px 10px;
  border: 1.5px solid #c4c2b8;
  border-radius: var(--radius-s);
  background: transparent;
  outline: none;
  min-width: 0;
  color: var(--text);
}
.profile-alias-input:focus { border-color: var(--n7); }

.alias-save-btn {
  flex-shrink: 0;
  background: var(--n7);
  color: var(--n1);
  border: none;
  border-radius: var(--radius-cap);
  padding: 8px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.1s;
}
.alias-save-btn:hover    { background: var(--n6); }
.alias-save-btn:disabled { opacity: 0.5; pointer-events: none; }

.profile-tupper-list { margin-top: 4px; }

.profile-tupper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #c4c2b8;
}
.profile-tupper-item:last-child { border-bottom: none; }

.profile-tupper-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--n2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ccc;
}
.profile-tupper-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-tupper-info { flex: 1; min-width: 0; }

.profile-tupper-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-tupper-meta {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.status-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
}
.status-published  { background: #d4edda; color: #155724; }
.status-pending    { background: #fff3cd; color: #856404; }
.status-generating { background: #cce5ff; color: #004085; }
.status-failed     { background: #f8d7da; color: #721c24; }

.signout-btn {
  width: 100%;
  background: none;
  border: 1.5px dashed #c4c2b8;
  border-radius: var(--radius-s);
  padding: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: #888;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s;
}
.signout-btn:hover { border-color: #C84530; color: #C84530; }

/* ─── Create tupper — two-column panel ──────────────────── */
.create-panel {
  position: relative;
  background: var(--surface);
  width: min(860px, 96vw);
  height: 72dvh;
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  animation: panel-in 0.4s var(--ease-spring) both;
}

.modal-overlay.closing .create-panel {
  animation: panel-out 0.22s var(--ease-enter) both;
}

/* Mobile: stacked, right panel only */
@media (max-width: 699px) {
  .create-panel {
    width: 100%;
    max-width: 100%;
    height: 92dvh;
    border-radius: var(--radius-m) var(--radius-m) 0 0;
    flex-direction: column;
    animation: panel-up 0.45s var(--ease-spring) both;
  }
  .modal-overlay.closing .create-panel {
    animation: panel-down 0.22s var(--ease-enter) both;
  }
  .create-left { display: none; }
}

/* Left: ticket */
.create-left {
  width: 250px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 52px 18px 24px;
  background: #fdfcf8;
  border-right: 1.5px dashed #c4c2b8;
  display: flex;
  flex-direction: column;
}

.create-ticket {
  border: none;
  background: transparent;
  padding: 0;
  flex: 1;
}

.create-title-input {
  font-family: 'Young Serif', serif;
  font-size: 17px;
  font-weight: 400;
  border: none;
  border-bottom: 1.5px dashed #c4c2b8;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 2px 0 6px;
  color: var(--text);
  text-align: center;
}
.create-title-input::placeholder { color: #ccc; font-style: italic; }

/* Right: tabs + content */
.create-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.create-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  padding: 48px 12px 0;
}
.create-tabs::-webkit-scrollbar { display: none; }

@media (max-width: 699px) {
  .create-tabs { padding: 8px 12px 0; }
}

.create-tab {
  flex-shrink: 0;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.1s, border-color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.create-tab:hover { color: var(--text); }
.create-tab.active { color: var(--text); border-bottom-color: var(--n7); }

.create-tab-pane {
  flex: 1;
  min-height: 0; /* allows flex child to shrink below content height */
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* Shape picker in tab pane */
#pane-forma .shape-picker {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  max-width: 400px;
}
#pane-forma .shape-picker button {
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  animation: chip-in 0.2s var(--ease-spring) both;
}
#pane-forma .shape-picker button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 699px) {
  #pane-forma .shape-picker {
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Category filter search */
.cat-pane-search {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  background: transparent;
  outline: none;
  width: 100%;
  margin-bottom: 12px;
  color: var(--text);
}
.cat-pane-search:focus { border-color: var(--n7); }

/* Tab pane entrance animation */
@keyframes pane-enter {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.create-tab-pane:not([hidden]) {
  animation: pane-enter 0.22s var(--ease-spring) both;
}

/* Chip entrance animation */
@keyframes chip-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.chip-in {
  animation: chip-in 0.18s var(--ease-spring) both;
}

/* Ingredient chips */
.cat-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-chip {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1.5px solid var(--heat-border, #c4c2b8);
  border-radius: var(--radius-cap);
  background: var(--heat-bg, transparent);
  cursor: pointer;
  color: var(--heat-color, var(--text));
  transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.cat-chip:hover { border-color: var(--n6); background: var(--heat-bg, var(--n2)); opacity: 0.82; }
.cat-chip.selected { background: var(--n7); border-color: var(--n7); color: var(--n1); opacity: 1; }
.cat-chip.selected:hover { background: var(--n6); border-color: var(--n6); }


/* ─── Ingredient heat legend ──────────────────────────────── */
.ing-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fffbea;
  border: 1.5px solid #ffe066;
  border-radius: var(--radius-s);
  margin-bottom: 12px;
}

.ing-legend-bar {
  width: 80px;
  flex-shrink: 0;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(to right, #f0ede4, #FFE95A);
  border: 1.5px solid #e6c500;
}

.ing-legend-end {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Desktop counter + randomizer row */
.create-desktop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.desktop-ing-counter {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #888;
  letter-spacing: 0.04em;
}

.desktop-ing-counter.at-max { color: #7A4F9A; font-weight: bold; }

.desktop-rand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px dashed #c4c2b8;
  border-radius: var(--radius-cap);
  padding: 5px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s;
}
.desktop-rand-btn:hover { border-color: var(--n6); color: var(--text); }

/* Create ticket title — Courier New instead of Young Serif */
.create-ticket .t-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.06em;
}

/* Ticket ingredient item with remove button */
.preview-ing-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 12px;
}
.preview-ing-item .t-item-name { flex: 1; font-weight: bold; text-transform: uppercase; letter-spacing: 0.02em; }
.preview-ing-item .t-item-cat  { font-size: 10px; color: #888; flex-shrink: 0; }
.preview-ing-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  color: #ccc;
  padding: 0 0 0 4px;
  line-height: 1;
  transition: color 0.1s;
}
.preview-ing-remove:hover { color: #C84530; }

/* Cooking overlay */
.cooking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(253, 252, 248, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
}

.cooking-egg {
  font-size: 36px;
  display: block;
  line-height: 1;
  text-align: center;
  animation: egg-spin 3s linear infinite;
  user-select: none;
  color: var(--text);
}

@keyframes egg-spin {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(90deg) scale(1.06); }
  50%  { transform: rotate(180deg) scale(1); }
  75%  { transform: rotate(270deg) scale(1.06); }
  100% { transform: rotate(360deg) scale(1); }
}

.cooking-phrase {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 0.04em;
  text-align: center;
  transition: opacity 0.35s ease;
}

.cooking-progress-wrap {
  width: 180px;
  height: 3px;
  background: var(--n3);
  border-radius: 2px;
  overflow: hidden;
}

.cooking-progress-bar {
  height: 100%;
  background: var(--n7);
  border-radius: 2px;
  width: 0%;
}

.cooking-status {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #aaa;
  text-transform: uppercase;
}

/* ─── Top card badge ─────────────────────────────────────── */
.top-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  background: var(--yellow);
  border-radius: var(--radius-cap);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

/* ─── Mobile create: step header ─────────────────────────── */
.create-step-header {
  display: none;
}

@media (max-width: 699px) {
  .create-step-header {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 52px 16px 0;
    gap: 8px;
  }
}

.create-mobile-name-input {
  font-family: 'Young Serif', serif;
  font-size: 18px;
  font-weight: 400;
  border: none;
  border-bottom: 1.5px dashed #c4c2b8;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 4px 0 10px;
  color: var(--text);
  text-align: center;
}
.create-mobile-name-input::placeholder { color: #ccc; font-style: italic; }

.create-step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

#create-step-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: var(--text);
}

.create-step-counter {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 0.06em;
  background: var(--n2);
  border: 2px solid var(--n4);
  border-radius: var(--radius-cap);
  padding: 4px 12px;
}
.create-step-counter.at-max { color: #fff; border-color: #7A4F9A; background: #7A4F9A; }

/* ─── Mobile create: step navigation ────────────────────── */
.create-step-nav {
  display: none;
}

@media (max-width: 699px) {
  .create-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
  }
}

.step-prev-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-cap);
  padding: 11px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--text3);
  transition: background 0.1s, color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.step-prev-btn:hover { background: var(--n2); color: var(--text); }
.step-prev-btn i { font-size: 12px; }

.step-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-rand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 14px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-cap);
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: var(--text3);
  transition: background 0.1s, color 0.1s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  white-space: nowrap;
}
.step-rand-btn i { font-size: 16px; }
.step-rand-btn:hover { background: var(--n2); color: var(--text); }

.step-next-btn { white-space: nowrap; }

/* Chip cap state */
.cat-chip:disabled,
.cat-chip.maxed {
  opacity: 0.35;
  pointer-events: none;
}

/* ─── Fix: create-left hidden on mobile (overrides cascade) ─ */
@media (max-width: 699px) {
  .create-left { display: none; }
}

/* ─── Shake animation (empty name validation) ─────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }

/* ─── Welcome modal ───────────────────────────────────────── */
.welcome-skip {
  display: block;
  margin: 6px auto 0;
  background: none;
  border: none;
  color: var(--text3);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  letter-spacing: 0.04em;
}
.welcome-skip:hover { color: var(--text); }

/* ─── Ticket logo ─────────────────────────────────────────── */
.ticket-logo {
  display: block;
  width: 58%;
  height: auto;
  margin: 0 auto 2px;
}

.sc-logo {
  display: block;
  width: 58%;
  height: auto;
  margin: 0 auto 12px;
}

/* ─── Toast notification ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--n7);
  color: var(--n1);
  padding: 9px 20px;
  border-radius: var(--radius-cap);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.04em;
  z-index: 500;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s;
  max-width: calc(100vw - 32px);
  text-align: center;
  white-space: normal;
}
.toast.visible { opacity: 1; }
