:root {
  color-scheme: dark;
  --bg: #090c14;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #f7f9ff;
  --ink: #131722;
  --muted: #667085;
  --line: rgba(149, 164, 196, 0.26);
  --glass-line: rgba(255, 255, 255, 0.18);
  --accent: #6d5cff;
  --accent-strong: #3d2cff;
  --accent-soft: rgba(109, 92, 255, 0.14);
  --cyan: #23d3ee;
  --warning: #e4475b;
  --chip: rgba(109, 92, 255, 0.1);
  --gold: #f0c96b;
  --sidebar-width: 224px;
  --shadow: 0 22px 55px rgba(1, 6, 18, 0.24);
  --shadow-hover: 0 30px 70px rgba(1, 6, 18, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(109, 92, 255, 0.24), transparent 36rem),
    linear-gradient(140deg, #070914 0%, #10172b 46%, #12192a 100%),
    var(--bg);
  color: #edf2ff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.auth-locked {
  overflow: auto;
}

body.auth-locked .app-header,
body.auth-locked main {
  display: none;
}

button {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 22px 28px 18px;
  margin-left: var(--sidebar-width);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 20, 0.68);
  backdrop-filter: blur(22px);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  padding: 18px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 92, 255, 0.28), transparent 34rem),
    linear-gradient(145deg, rgba(8, 10, 20, 0.96), rgba(17, 23, 43, 0.98)),
    var(--bg);
}

.auth-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 460px);
  padding: 22px;
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
  color: #f7f9ff;
  backdrop-filter: blur(28px);
}

.auth-panel .field {
  color: #edf2ff;
}

.auth-heading {
  display: grid;
  gap: 5px;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  color: #ffffff;
}

.auth-heading p:last-child {
  margin: 0;
  color: #c7d2ef;
  font-size: 0.94rem;
  line-height: 1.4;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(5, 8, 17, 0.35);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #b8c3e6;
  cursor: pointer;
  font-weight: 850;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(109, 92, 255, 0.96), rgba(35, 211, 238, 0.88));
  color: white;
  box-shadow: 0 12px 30px rgba(66, 86, 255, 0.34);
}

.auth-submit {
  width: 100%;
}

.auth-panel .dialog-note {
  color: #c7d2ef;
}

.auth-profile-fields,
.auth-reset-fields,
.submission-profile-fields {
  display: grid;
  gap: 14px;
}

.lead-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce5f8;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.lead-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.auth-link-button {
  justify-self: end;
  margin-top: -6px;
  border: 0;
  background: transparent;
  color: #b9c5ff;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 820;
}

.auth-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-assurance span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce5f8;
  font-size: 0.74rem;
  font-weight: 820;
}

.captcha-box {
  min-height: 78px;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 6px 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #edf2ff;
  font-size: 0.78rem;
  font-weight: 820;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.user-pill span {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 850;
}

.app-header::after {
  display: none;
}

.eyebrow {
  margin: 0 0 5px;
  color: #9aa7ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0;
  color: #ffffff;
}

.header-status {
  flex: 0 0 auto;
  max-width: 42%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dce5f8;
  font-size: 0.9rem;
  font-weight: 760;
  text-align: right;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

main {
  max-width: none;
  margin: 0 0 0 var(--sidebar-width);
  padding: 22px 28px 48px;
}

.toolbar {
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 6;
  display: grid;
  align-content: start;
  width: calc(var(--sidebar-width) - 36px);
  gap: 10px;
  padding: 84px 12px 14px;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 26px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(28px);
}

.toolbar::before {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(109, 92, 255, 0.9), rgba(35, 211, 238, 0.74));
  color: white;
  content: "Cashback";
  font-size: 0.98rem;
  font-weight: 950;
  box-shadow: 0 16px 32px rgba(66, 86, 255, 0.28);
}

.toolbar::after {
  display: block;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #aeb9d8;
  content: "100% Cashback";
  font-size: 0.78rem;
  font-weight: 820;
}

.filter-pill,
.action-button,
.deal-link,
.auto-submit-button {
  border: 1px solid rgba(149, 164, 196, 0.26);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.filter-pill {
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 13px;
  border-color: transparent;
  border-radius: 15px;
  background: transparent;
  color: #c7d2ef;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.filter-pill.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.list-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px);
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #edf2ff;
  font-weight: 900;
}

.summary-head strong {
  color: white;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-tile {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.summary-tile span {
  color: #c7d2ef;
  font-size: 0.76rem;
  font-weight: 820;
}

.summary-tile strong {
  color: white;
  font-size: 1.55rem;
  line-height: 1;
}

.summary-tile.open {
  border-color: rgba(199, 210, 239, 0.18);
}

.summary-tile.submitted {
  border-color: rgba(240, 201, 107, 0.52);
  background: linear-gradient(180deg, rgba(240, 201, 107, 0.28), rgba(240, 201, 107, 0.12));
}

.summary-tile.refunded {
  border-color: rgba(37, 211, 102, 0.46);
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.25), rgba(37, 211, 102, 0.1));
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.deal-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
  animation: cardIn 420ms ease both;
  animation-delay: calc(var(--card-index, 0) * 38ms);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  will-change: transform;
}

.deal-card::before {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109, 92, 255, 0.38), transparent);
  content: "";
}

.deal-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.image-shell {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(228, 234, 255, 0.86)),
    #e8edff;
}

.deal-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.deal-card:hover .deal-image {
  transform: scale(1.035);
}

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(66, 86, 255, 0.26);
  text-transform: uppercase;
}

.status-badge.closed {
  background: linear-gradient(135deg, #e4475b, #ff8a67);
}

.promo-sticker {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  padding: 10px;
  border: 2px solid #fff1b6;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, #fff7c7 0 16%, transparent 17%),
    linear-gradient(145deg, #f8d86a 0%, #d4a824 48%, #a97908 100%);
  box-shadow:
    0 10px 22px rgba(74, 52, 2, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    inset 0 -3px 7px rgba(93, 60, 0, 0.22);
  color: #3e2a00;
  font-size: 0.67rem;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-9deg);
  animation: stickerSettle 560ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.promo-sticker::before {
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(94, 62, 0, 0.38);
  border-radius: 50%;
  content: "";
}

.deal-content {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.deal-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.meta-list {
  display: grid;
  gap: 8px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-row strong {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.shops {
  display: grid;
  gap: 7px;
}

.shops-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.shop-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.shop-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(109, 92, 255, 0.1);
  color: #4b3cff;
  font-size: 0.82rem;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(109, 92, 255, 0.08);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
}

.action-button,
.deal-link,
.auto-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 14px;
  font-weight: 820;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.deal-link {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: white;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(66, 86, 255, 0.22);
}

.deal-link:hover {
  background: linear-gradient(135deg, var(--accent-strong), #15b9d2);
  transform: translateY(-1px);
}

.auto-submit-button {
  width: 100%;
  border-color: rgba(215, 169, 35, 0.72);
  background: linear-gradient(180deg, #fff8ca 0%, #ffd84b 100%);
  color: #4b3500;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 22px rgba(215, 169, 35, 0.22);
}

.auto-submit-button.active {
  border-color: rgba(37, 211, 102, 0.42);
  background: linear-gradient(180deg, #effff6 0%, #c8f9d9 100%);
  color: #005f38;
}

.action-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: white;
  box-shadow: 0 12px 24px rgba(66, 86, 255, 0.2);
}

.action-button:active,
.deal-link:active,
.filter-pill:active,
.tracker-option:active,
.auto-submit-button:active {
  transform: scale(0.98);
}

.shopping-tracker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tracker-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef2ff;
  color: #29324a;
  font-size: 0.82rem;
  font-weight: 820;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.tracker-option span {
  display: grid;
  align-content: center;
  gap: 2px;
  line-height: 1.1;
  text-align: center;
}

.shopping-tracker small {
  min-height: 0.72rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
}

.shopping-tracker input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.submitted-option input {
  accent-color: #ffc400;
}

.refunded-option input {
  accent-color: #00c853;
}

.submitted-option:has(input:checked) {
  border-color: rgba(255, 196, 0, 0.78);
  background: linear-gradient(180deg, #fff9c7 0%, #ffe15c 100%);
  color: #6b4a00;
  box-shadow:
    0 0 0 2px rgba(255, 196, 0, 0.18),
    0 10px 24px rgba(255, 196, 0, 0.3);
}

.submitted-option:has(input:checked) small {
  color: #7a5500;
}

.refunded-option:has(input:checked) {
  border-color: rgba(0, 200, 83, 0.7);
  background: linear-gradient(180deg, #eafff0 0%, #b9ffd0 100%);
  color: #006b2f;
  box-shadow:
    0 0 0 2px rgba(0, 200, 83, 0.16),
    0 10px 24px rgba(0, 200, 83, 0.28);
}

.refunded-option:has(input:checked) small {
  color: #007a35;
}

.empty-state {
  padding: 52px 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: #c7d2ef;
}

.submission-dialog {
  width: min(92vw, 520px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(247, 249, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.44);
}

.submission-dialog::backdrop {
  background: rgba(4, 7, 15, 0.56);
  backdrop-filter: blur(10px);
}

.submission-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.submission-create-fields {
  display: grid;
  gap: 14px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.field input,
.dialog-close,
.submission-dialog {
  color-scheme: light;
}

.dialog-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
}

.field input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.secret-input {
  position: relative;
  display: grid;
}

.secret-input input {
  padding-right: 48px;
}

.secret-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.secret-toggle.active {
  border-color: rgba(109, 92, 255, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.field input:not([type="file"]) {
  padding: 0 11px;
}

.field .secret-input input {
  padding-right: 48px;
}

.field input[type="file"] {
  padding: 10px;
}

.field input:focus,
.consent:focus-within {
  border-color: var(--accent);
  outline: 2px solid rgba(109, 92, 255, 0.18);
  outline-offset: 2px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f9ff;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.dialog-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--warning);
  font-size: 0.88rem;
  font-weight: 760;
}

.submission-review {
  display: grid;
  gap: 12px;
}

.review-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(109, 92, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f9ff 0%, #e9edff 100%);
}

.review-kicker {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.review-card strong {
  font-size: 0.98rem;
}

.limit-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 196, 0, 0.74);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9d4 0%, #ffe679 100%);
  color: #5d4100;
  font-size: 0.88rem;
}

.profile-ready {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(109, 92, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f9ff 0%, #e9edff 100%);
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.profile-ready span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 950;
}

.limit-notice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #5d4100;
  color: white;
  font-weight: 950;
}

.review-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.hidden {
  display: none;
}

.submission-create-fields.hidden,
.auth-profile-fields.hidden,
.auth-reset-fields.hidden,
.auth-link-button.hidden,
.submission-profile-fields.hidden,
.profile-ready.hidden,
.submission-review.hidden,
.deal-link.hidden,
.action-button.hidden {
  display: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes stickerSettle {
  from {
    opacity: 0;
    transform: rotate(-16deg) scale(0.78);
  }

  to {
    opacity: 1;
    transform: rotate(-9deg) scale(1);
  }
}

@media (max-width: 640px) {
  .app-header {
    position: relative;
    top: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: calc(18px + env(safe-area-inset-top)) 12px 10px;
    margin-left: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .header-status {
    max-width: none;
    text-align: left;
  }

  .header-side {
    justify-items: start;
    width: 100%;
  }

  .user-pill {
    max-width: 100%;
  }

  main {
    margin-left: 0;
    padding: 0 8px calc(86px + env(safe-area-inset-bottom));
  }

  .toolbar {
    position: fixed;
    right: 8px;
    bottom: 8px;
    left: 8px;
    top: auto;
    width: auto;
    align-content: initial;
    display: flex;
    gap: 6px;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(10, 14, 27, 0.8);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
    overflow-x: auto;
  }

  .toolbar::before {
    display: none;
  }

  .toolbar::after {
    display: none;
  }

  .filter-pill {
    flex: 1 0 auto;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.82rem;
    justify-content: center;
    white-space: nowrap;
  }

  .list-summary {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 18px;
  }

  .summary-grid {
    gap: 6px;
  }

  .summary-tile {
    min-height: 58px;
    padding: 8px;
  }

  .summary-tile span {
    font-size: 0.66rem;
  }

  .summary-tile strong {
    font-size: 1.25rem;
  }

  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .deal-card {
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  }

  .image-shell {
    aspect-ratio: 1 / 0.82;
  }

  .status-badge {
    top: 8px;
    left: 8px;
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .promo-sticker {
    right: 6px;
    bottom: 6px;
    width: 62px;
    height: 62px;
    padding: 7px;
    border-width: 1px;
    font-size: 0.47rem;
  }

  .promo-sticker::before {
    inset: 4px;
  }

  .deal-content {
    gap: 8px;
    padding: 10px;
  }

  .deal-title {
    display: -webkit-box;
    min-height: 2.4em;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .meta-list {
    gap: 5px;
  }

  .meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
    font-size: 0.74rem;
  }

  .meta-row strong {
    text-align: left;
  }

  .shops {
    gap: 5px;
  }

  .shops-label {
    font-size: 0.72rem;
  }

  .shop-list {
    gap: 4px;
  }

  .shop-chip {
    min-height: 23px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .card-actions {
    gap: 5px;
  }

  .action-button,
  .deal-link,
  .auto-submit-button {
    gap: 3px;
    min-height: 34px;
    padding: 0 3px;
    font-size: 0.68rem;
  }

  .auto-submit-button {
    min-height: 36px;
  }

  .shopping-tracker {
    gap: 5px;
  }

  .tracker-option {
    gap: 4px;
    min-height: 42px;
    padding: 6px 4px;
    font-size: 0.64rem;
  }

  .shopping-tracker input {
    width: 13px;
    height: 13px;
  }

  .submission-dialog {
    width: calc(100vw - 18px);
  }

  .submission-form {
    gap: 12px;
    padding: 14px;
  }

  .submission-create-fields {
    gap: 12px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }
}

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

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