:root {
  --primary: #d74d6b;
  --bg: #ffffff;
  --text: #1f1f1f;
  --muted: #f8eef1;
  --card: #ffffffcc;
  --border: #ecd9df;
  --shadow: 0 16px 40px rgba(215, 77, 107, 0.14);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(215, 77, 107, 0.18);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at 10% 10%, #fff6f8 0%, var(--bg) 50%), var(--bg);
  color: var(--text);
  padding: 1.25rem;
  overflow-x: hidden;
  accent-color: var(--primary);
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(215, 77, 107, 0.28);
  color: #1f1f1f;
}

::-moz-selection {
  background: rgba(215, 77, 107, 0.28);
  color: #1f1f1f;
}

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.33;
}

.orb-a {
  width: 280px;
  height: 280px;
  background: var(--primary);
  top: -40px;
  right: -80px;
}

.orb-b {
  width: 250px;
  height: 250px;
  background: #ffc8d6;
  left: -70px;
  bottom: 120px;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.instagram-link {
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary);
  color: #fff;
}

.instagram-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

main {
  max-width: 1320px;
  margin: 0 auto;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.gate-panel {
  max-width: 640px;
  margin: 4rem auto;
}

.gate-instagram-link {
  margin-top: 0.35rem;
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.1;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.8rem, 3.3vw, 2.8rem);
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

input[type='text'],
input[type='search'],
select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.98rem;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  color: var(--text);
}

select option {
  color: var(--text);
}

input[type='text']:focus,
input[type='search']:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 77, 107, 0.2);
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  padding: 0.72rem 1.1rem;
  cursor: pointer;
}

.btn-primary {
  margin-top: 1rem;
}

.btn-secondary {
  background: linear-gradient(90deg, #d74d6b, #f06b89);
  margin-top: 0.6rem;
}

.hero {
  position: relative;
  margin-bottom: 1rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(215, 77, 107, 0.28), rgba(215, 77, 107, 0.12)),
    radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    url('assets/hero/hero-main.webp'),
    url('assets/asana/webp/027-Garudasana.webp');
  background-size: cover;
  background-position: center center;
}

.hero-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 760px;
  padding-top: 0.2rem;
  margin-bottom: 0.85rem;
}

.hero-brand {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 0.25rem 0.45rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.hero-topbar .header-actions {
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.08), rgba(16, 16, 16, 0.26));
  pointer-events: none;
}

.hero-glass {
  position: relative;
  z-index: 1;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem 1.1rem;
}

.hero-glass h2,
.hero-glass p {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.hero-credit {
  position: absolute;
  bottom: 0.65rem;
  right: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 180ms ease;
}

.hero-credit:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.hero-credit-heart {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.hero-credit-logo {
  height: 14px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.9;
}

.eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.controls {
  margin-bottom: 1rem;
}

.recent-panel {
  margin-bottom: 1rem;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.recent-head h3 {
  margin: 0;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.recent-list button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
}

.control-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkline.compact {
  margin-top: 0.7rem;
  margin-bottom: 0.1rem;
}

.alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.alphabet button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 9px;
  min-width: 34px;
  height: 34px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.alphabet button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.alphabet button.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.results-count {
  margin: 0.75rem 0 0;
  color: #4b4b4b;
  font-size: 0.9rem;
}

.workspace {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.workspace.builder-hidden {
  grid-template-columns: 1fr;
}

.workspace.builder-hidden .builder {
  display: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.explorer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.explorer-head h3 {
  margin: 0;
}

.explorer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-builder-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #242424;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.view-toggle button {
  border: 0;
  background: #fff;
  color: #292929;
  padding: 0.42rem 0.86rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.view-toggle button.active {
  background: var(--primary);
  color: #fff;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease;
  content-visibility: auto;
  contain-intrinsic-size: 350px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(21, 21, 21, 0.09);
}

.card-grid.list-mode {
  grid-template-columns: 1fr;
}

.card-grid.list-mode .card {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.card-grid.list-mode .card img {
  aspect-ratio: 3 / 4;
  height: 100%;
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  padding: 0.35rem;
}

.card-body {
  padding: 0.8rem;
}

.card h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  overflow-wrap: anywhere;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
}

.card-head h3 {
  flex: 1 1 auto;
  min-width: 0;
}

.fav-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #6a6a6a;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  flex: 0 0 auto;
}

.fav-btn.active {
  color: var(--primary);
  border-color: #efb7c4;
}

.meta {
  margin: 0;
  color: #5d5d5d;
  font-size: 0.87rem;
  overflow-wrap: anywhere;
}

.mini-btn {
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-weight: 600;
  color: #2d2d2d;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
}

.builder {
  position: sticky;
  top: 0.8rem;
}

.builder-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
}

.builder-toolbar {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.8rem;
}

.builder-toolbar button,
.builder-toolbar select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.58rem 0.6rem;
  cursor: pointer;
  font: inherit;
  text-align: center;
  color: #252525;
}

.sequence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  max-height: 64vh;
  overflow: auto;
}

.sequence-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  background: #fff;
  cursor: grab;
}

.sequence-item img {
  width: 64px;
  height: 64px;
  border-radius: 9px;
  object-fit: cover;
}

.sequence-item.dragging {
  opacity: 0.7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
}

.sequence-item.drop-target {
  outline: 2px dashed #e09ab0;
}

.sequence-item-copy strong {
  display: block;
  font-size: 0.93rem;
}

.sequence-item-copy small {
  color: #666;
}

.sequence-item-actions {
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 0.35rem;
}

.sequence-item-actions button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.builder-hint {
  color: #676767;
  font-size: 0.9rem;
  margin-bottom: 0;
}

#startSequenceBtn {
  margin-top: 0.7rem;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.hidden {
  display: none;
}

.mobile-nav {
  display: none;
}

.detail-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  border: 0;
  border-radius: 18px;
  width: min(980px, 92vw);
  padding: 0;
  max-height: 92vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-dialog::backdrop {
  background: rgba(14, 14, 14, 0.55);
}

.close-dialog {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #1f1f1f;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.detail-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  touch-action: pan-y;
}

.detail-media-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.8rem;
}

.detail-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  min-height: 420px;
}

.detail-media img {
  width: 100%;
  height: 100%;
  max-height: 76vh;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
}

.detail-media.is-landscape img {
  max-height: 62vh;
}

.detail-media.is-portrait img {
  max-height: 76vh;
}

.detail-copy {
  padding: 1rem;
  max-height: 80vh;
  overflow: auto;
  touch-action: pan-y;
}

.tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.tag {
  background: var(--muted);
  color: #73263a;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.linked-asana,
.muted-chip {
  display: inline-block;
  border-radius: 999px;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
}

.linked-asana {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
}

.muted-chip,
.muted {
  color: #767676;
}

.detail-add {
  margin-top: 0.5rem;
  width: fit-content;
}

.detail-media-panel .detail-add {
  margin-top: 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.detail-fav-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #4a4a4a;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-fav-btn.active {
  color: var(--primary);
  border-color: #efb7c4;
}

.variants-box {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  background: #fff;
}

.variants-box p {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.sequence-dialog {
  border: 0;
  border-radius: 18px;
  width: min(860px, 92vw);
  padding: 1rem;
}

.sequence-dialog::backdrop {
  background: rgba(14, 14, 14, 0.55);
}

.sequence-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  touch-action: pan-y;
}

.sequence-step img {
  width: 100%;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  max-height: 58vh;
}

.sequence-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.sequence-controls button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

#sequenceFinishActions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

#sequenceFinishActions.hidden {
  display: none;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .toggle-builder-btn {
    display: none;
  }

  .builder {
    position: static;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.85rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top));
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .bg-orb {
    filter: blur(18px);
    opacity: 0.22;
  }

  .alphabet button {
    min-width: 40px;
    height: 40px;
  }

  .brand img {
    width: 88px;
    height: 88px;
  }

  .header-actions {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.32rem;
    margin-left: auto;
  }

  .instagram-link {
    width: auto;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0.44rem 0.62rem;
    font-size: 0.74rem;
    white-space: nowrap;
    line-height: 1.1;
    text-align: center;
  }

  .hero-topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 0.5rem;
    max-width: 100%;
    margin-bottom: 0.95rem;
  }

  .hero-glass {
    max-width: 100%;
    margin-top: 0.15rem;
  }

  .hero-credit {
    position: static;
    align-self: center;
    margin-top: 0.5rem;
    font-size: 0.62rem;
    padding: 0.25rem 0.55rem;
  }

  .hero-credit-heart {
    width: 10px;
    height: 10px;
  }

  .hero-credit-logo {
    height: 12px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
  }

  .explorer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .card-grid.list-mode .card {
    grid-template-columns: 1fr;
  }

  .card-grid.list-mode .card img {
    padding: 0.38rem;
  }

  .card-grid.list-mode .card-body {
    padding: 0.78rem 0.78rem 0.82rem;
  }

  .card-grid.list-mode .card-head {
    margin-bottom: 0.22rem;
  }

  .card-grid.list-mode .mini-btn {
    margin-top: 0.55rem;
  }

  .card img {
    aspect-ratio: 3 / 4;
    padding: 0.22rem;
  }

  .card-body {
    padding: 0.56rem;
  }

  .card h3 {
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .meta {
    font-size: 0.79rem;
    line-height: 1.2;
  }

  .mini-btn {
    margin-top: 0.45rem;
    padding: 0.32rem 0.55rem;
    font-size: 0.82rem;
  }

  .fav-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .sequence-item-actions {
    grid-template-columns: repeat(2, 44px);
  }

  .sequence-item-actions button {
    width: 44px;
    height: 44px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .detail-dialog {
    left: 0.5rem;
    right: 0.5rem;
    top: calc(0.5rem + env(safe-area-inset-top));
    transform: none;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
    border-radius: 14px;
  }

  .detail-copy {
    max-height: none;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
  }

  .detail-media {
    min-height: 260px;
  }

  .builder-toolbar {
    grid-template-columns: 1fr;
  }

  .sequence-step {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(0.6rem + env(safe-area-inset-bottom));
    width: min(96vw, 520px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(215, 77, 107, 0.18);
    z-index: 40;
  }

  .mobile-nav-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: #2f2f2f;
    border-radius: 10px;
    padding: 0.46rem 0.3rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.05;
    cursor: pointer;
    min-height: 44px;
  }

  .mobile-nav-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  .detail-add,
  .detail-fav-btn {
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    line-height: 1.1;
  }

  .detail-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .detail-add,
  .detail-fav-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #1f1f1f;
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  animation: toast-in 300ms ease forwards;
  max-width: min(420px, 90vw);
  text-align: center;
}

.toast.toast-out {
  animation: toast-out 250ms ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* Sequence item animations */
.sequence-item {
  animation: seq-slide-in 250ms ease forwards;
}

@keyframes seq-slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Empty state reset button */
.reset-filters-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  margin-top: 0.6rem;
}

/* Detail navigation arrows – only visible when dialog is open */
.detail-dialog:not([open]) .detail-nav-btn { display: none; }

.detail-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #333;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.detail-nav-btn:hover {
  background: #d74d6b;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.detail-nav-btn.nav-prev { left: 0.6rem; }
.detail-nav-btn.nav-next { right: 0.6rem; }

@media (max-width: 760px) {
  .detail-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .detail-nav-btn.nav-prev { left: 0.3rem; }
  .detail-nav-btn.nav-next { right: 0.3rem; }
  .toast-container { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .instagram-link {
    padding: 0.42rem 0.54rem;
    font-size: 0.7rem;
  }

  .instagram-link svg {
    width: 16px;
    height: 16px;
  }

  .card h3 {
    font-size: 0.84rem;
  }

  .meta {
    font-size: 0.76rem;
  }

  .mobile-nav {
    width: 97vw;
    gap: 0.28rem;
    padding: 0.32rem;
  }

  .mobile-nav-btn {
    font-size: 0.72rem;
    padding: 0.42rem 0.18rem;
    min-height: 44px;
  }

  .card-grid.list-mode .card-body {
    padding: 0.72rem 0.72rem 0.76rem;
  }
}
