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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-y: scroll;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #EFF3EC;
  color: #1a2e1a;
  min-height: 100vh;
  line-height: 1.5
}

img {
  max-width: 100%;
  display: block
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none
}

a {
  text-decoration: none;
  color: inherit
}

input,
textarea,
select {
  font-family: inherit
}

ul,
ol {
  list-style: none
}

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  --green-900: #0d2618;
  --green-800: #1B4332;
  --green-700: #2D6A4F;
  --green-600: #40916C;
  --green-400: #74C69D;
  --green-200: #B7E4C7;
  --green-100: #D8F3DC;
  --green-50: #EFF3EC;

  --red-600: #C0392B;
  --red-500: #E53E3E;
  --red-100: #FEE2E2;

  --amber-500: #F59E0B;
  --amber-100: #FEF3C7;

  --blue-500: #3B82F6;
  --blue-100: #DBEAFE;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;

  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(27, 67, 50, 0.08), 0 1px 2px rgba(27, 67, 50, 0.06);
  --shadow-md: 0 4px 6px rgba(27, 67, 50, 0.07), 0 2px 4px rgba(27, 67, 50, 0.06);
  --shadow-lg: 0 10px 15px rgba(27, 67, 50, 0.07), 0 4px 6px rgba(27, 67, 50, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --deal-card-height: 158px;
  --deal-thumb-width: 118px;
}

/* ── Layout ─────────────────────────────────────────────── */
.site-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px 0
}

@media(min-width:900px) {
  .page-grid {
    grid-template-columns: 200px 1fr
  }
}

@media(min-width:1100px) {
  .page-grid {
    grid-template-columns: 200px 1fr
  }
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--green-800);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(13, 38, 24, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 1440px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--green-400);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--green-900);
  letter-spacing: -0.5px;
}

.logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  letter-spacing: -0.3px;
}

.logo-text span {
  color: var(--green-400);
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 9px 14px 9px 38px;
  font-size: 14px;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5)
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--green-400);
}

.header-search .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto
}

.btn-post-deal {
  background: var(--green-400);
  color: var(--green-900);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-post-deal:hover {
  background: #5FD98E;
  transform: translateY(-1px)
}

.btn-post-deal:active {
  transform: translateY(0)
}

.header-user-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  transition: background 0.15s;
}

.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.22)
}

/* ── Category Bar ──────────────────────────────────────── */
.cat-bar {
  background: var(--green-900);
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-bar::-webkit-scrollbar {
  display: none
}

.cat-bar-inner {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.cat-pill {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cat-pill:hover {
  color: rgba(255, 255, 255, 0.9)
}

.cat-pill.active {
  color: var(--green-400);
  border-bottom-color: var(--green-400);
}

/* ── Sort Tabs ──────────────────────────────────────────── */
.sort-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}

.sort-tab {
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  transition: all 0.15s;
}

.sort-tab:hover {
  background: var(--gray-100);
  color: var(--gray-700)
}

.sort-tab.active {
  background: var(--green-800);
  color: var(--white);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  display: none
}

@media(min-width:900px) {
  .sidebar {
    display: block
  }
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: none;
  overflow: hidden;
  margin-bottom: 16px;
}

.sidebar-header {
  padding: 14px 16px 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-cat-list {
  padding: 8px 0
}

.sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 0;
}

.sidebar-cat-item:hover {
  background: var(--gray-100);
}

.sidebar-cat-item.active {
  background: var(--gray-100);
}

.sidebar-cat-item.active .scat-name {
  color: var(--green-800);
  font-weight: 600
}

.scat-left {
  display: flex;
  align-items: center;
  gap: 8px
}

.scat-icon {
  font-size: 16px;
  line-height: 1
}

.scat-name {
  font-size: 14px;
  color: var(--gray-700)
}

.scat-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 2px 7px;
  border-radius: 20px;
}

.newsletter-form {
  padding: 16px
}

.newsletter-form p {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.5
}

.nl-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.nl-input:focus {
  border-color: var(--green-600)
}

.btn-nl {
  width: 100%;
  background: var(--green-800);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-nl:hover {
  background: var(--green-700)
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--gray-100);
}

.stat-cell {
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid var(--gray-100);
}

.stat-cell:last-child {
  border-right: none
}

.stat-num {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--green-800);
  display: block;
}

.stat-lbl {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px
}

/* ── Deal Card ──────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deal-card {
  height: var(--deal-card-height);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: none;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative;
}

.deal-card:hover {
  box-shadow: 0 2px 8px rgba(13, 38, 24, 0.08);
  transform: translateY(-1px);
}

.deal-card.expired {
  opacity: 0.6;
}

.deal-card.expired::after {
  content: 'EXPIRED';
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gray-400);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 4px;
}

.vote-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  background: #fafafa;
  border-right: 1px solid var(--gray-100);
}

.vote-btn {
  width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  font-size: 16px;
  transition: background 0.1s, color 0.1s, transform 0.1s;
}

.vote-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.vote-btn:active {
  transform: scale(0.9);
}

.vote-btn.voted-up {
  color: var(--green-600);
  background: var(--green-100);
}

.vote-btn.voted-down {
  color: var(--red-500);
  background: var(--red-100);
}

.vote-score {
  color: var(--gray-500);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  transition: color 0.3s;
}

.score-pos {
  color: var(--green-700);
}

.score-neg {
  color: var(--red-500);
}

.score-neu {
  color: var(--gray-500);
}

.deal-body {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.deal-body.has-image {
  grid-template-columns: var(--deal-thumb-width) minmax(0, 1fr);
}

.deal-content {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 10px 14px;
  overflow: hidden;
}

.deal-body.has-image .deal-thumb {
  grid-column: 1;
  grid-row: 1;
}

.deal-body.has-image .deal-content {
  grid-column: 2;
  grid-row: 1;
}

.deal-meta-top {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 5px;
  overflow: hidden;
}

.badge {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-cat {
  background: var(--green-100);
  color: var(--green-800);
}

.badge-new {
  background: var(--blue-100);
  color: var(--blue-500);
}

.badge-hot {
  background: var(--red-100);
  color: var(--red-600);
}

.badge-free {
  background: var(--amber-100);
  color: #92400E;
}

.badge-verified {
  background: var(--green-200);
  color: var(--green-800);
}

.badge-coupon {
  background: #EDE9FE;
  color: #5B21B6;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-title {
  min-width: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.deal-title:hover {
  color: var(--green-800);
}

.deal-desc {
  min-width: 0;
  min-height: 0;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.45;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

.deal-desc:empty {
  display: block;
}

.deal-footer {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  padding-top: 6px;
}

.deal-bottom-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.deal-footer .deal-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-block {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.price-now {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--green-800);
}

.price-free {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--amber-500);
}

.price-was {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.price-save {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  background: var(--green-100);
  color: var(--green-800);
  padding: 2px 7px;
  border-radius: 3px;
}

.deal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deal-action-link {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s;
}

.deal-action-link:hover {
  color: var(--green-700);
}

.btn-get-deal {
  background: var(--green-800);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-get-deal:hover {
  background: var(--green-700);
}

.deal-poster {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--gray-400);
}

.deal-poster a {
  color: var(--green-600);
}

.deal-poster a:hover {
  text-decoration: underline;
}

.deal-thumb {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafafa;
  border-right: 1px solid var(--gray-100);
}

.deal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Deal Detail ─────────────────────────────────────────── */
.detail-wrap {
  padding: 18px 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
  transition: color 0.15s;
}

.back-btn:hover {
  color: var(--green-800);
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: none;
  overflow: hidden;
}

.detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
  padding: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.detail-hero.no-image {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.detail-media {
  min-width: 0;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.detail-info {
  min-width: 0;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.detail-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.25;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--gray-400);
  font-size: 12px;
  margin-bottom: 14px;
}

.detail-meta-line strong {
  color: var(--green-700);
}

.detail-meta-line span:not(:last-child)::after {
  content: '·';
  color: var(--gray-300);
  margin-left: 10px;
}

.detail-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  white-space: pre-line;
  max-width: 68ch;
}

.detail-action-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: sticky;
  top: 118px;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-price {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  color: var(--green-800);
}

.detail-price-muted {
  color: var(--gray-700);
  font-family: 'Sora', sans-serif;
  font-size: 22px;
}

.detail-was {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.detail-save {
  font-size: 13px;
  font-weight: 700;
  background: var(--green-100);
  color: var(--green-800);
  padding: 3px 8px;
  border-radius: 4px;
}

.btn-get-deal-lg {
  width: 100%;
  background: var(--green-800);
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-get-deal-lg:hover {
  background: var(--green-700);
  transform: translateY(-1px);
}

.detail-store-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-200);
}

.detail-store-label {
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 600;
}

.detail-store-name {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.detail-coupon-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F5F3FF;
  border: 1px dashed #7C3AED;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  margin-bottom: 12px;
}

.coupon-label {
  font-size: 12px;
  font-weight: 600;
  color: #5B21B6;
}

.coupon-code {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: #5B21B6;
  letter-spacing: 0.06em;
}

.btn-copy-coupon {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #7C3AED;
  padding: 3px 8px;
  border: 1px solid #7C3AED;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-copy-coupon:hover {
  background: #7C3AED;
  color: #fff;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--gray-100);
}

.detail-stat {
  padding: 13px 12px;
  text-align: center;
  border-right: 1px solid var(--gray-100);
}

.detail-stat:last-child {
  border-right: none;
}

.ds-num {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 17px;
  display: block;
  margin-bottom: 2px;
}

.ds-lbl {
  font-size: 11px;
  color: var(--gray-400);
}

.detail-vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.vote-btn-lg {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  transition: all 0.15s;
}

.vote-btn-lg:hover {
  border-color: var(--green-400);
  color: var(--green-700);
  background: var(--green-50);
}

.vote-btn-lg.voted-up {
  background: var(--green-100);
  border-color: var(--green-400);
  color: var(--green-700);
}

.vote-btn-lg.voted-down {
  background: var(--red-100);
  border-color: var(--red-500);
  color: var(--red-600);
}

.btn-report {
  margin-left: auto;
  font-size: 12px;
  color: var(--gray-400);
  transition: color 0.15s;
}

.btn-report:hover {
  color: var(--red-500);
}

@media(max-width:1100px) {
  .detail-hero {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .detail-hero.no-image {
    grid-template-columns: 1fr;
  }

  .detail-action-panel {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .detail-action-panel .detail-price-row,
  .detail-action-panel .detail-coupon-box,
  .detail-action-panel .btn-get-deal-lg {
    margin-bottom: 0;
  }

  .detail-store-box {
    display: none;
  }
}

@media(max-width:700px) {
  .detail-wrap {
    padding: 12px 0;
  }

  .back-btn {
    margin-bottom: 10px;
  }

  .detail-hero,
  .detail-hero.no-image {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .detail-media {
    height: 180px;
  }

  .detail-title {
    font-size: 20px;
  }

  .detail-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  .detail-action-panel {
    display: block;
    padding: 14px;
  }

  .detail-action-panel .detail-price-row,
  .detail-action-panel .detail-coupon-box,
  .detail-action-panel .btn-get-deal-lg {
    margin-bottom: 12px;
  }

  .detail-store-box {
    display: flex;
  }

  .detail-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-stat:nth-child(2) {
    border-right: none;
  }

  .detail-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--gray-100);
  }

  .detail-vote-row {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .btn-report {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}

/* ── Comments ─────────────────────────────────────────────── */
.comments-section {
  padding: 24px 32px
}

.comments-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.comment-form {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}

.comment-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--gray-700);
  resize: none;
  outline: none;
  min-height: 72px;
  line-height: 1.5;
}

.comment-textarea::placeholder {
  color: var(--gray-400)
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-200);
}

.comment-as {
  font-size: 12px;
  color: var(--gray-400)
}

.comment-as strong {
  color: var(--green-700)
}

.btn-post-comment {
  background: var(--green-800);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-post-comment:hover {
  background: var(--green-700)
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0
}

.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.comment-item:last-child {
  border-bottom: none
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-800);
  flex-shrink: 0;
}

.comment-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700)
}

.comment-time {
  font-size: 12px;
  color: var(--gray-400)
}

.comment-body {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.55;
  padding-left: 36px
}

.no-comments {
  text-align: center;
  padding: 32px;
  color: var(--gray-400);
  font-size: 14px;
}

/* ── Submit Form ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13, 38, 24, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 40px;
  overflow-y: auto;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  margin: auto;
}

.modal-head {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--gray-900);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 20px;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700)
}

.modal-body {
  padding: 24px 28px
}

.form-group {
  margin-bottom: 18px
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label .req {
  color: var(--red-500)
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--green-700);
  cursor: pointer
}

.form-checkbox-row label {
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer
}

.modal-foot {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--gray-100);
}

.btn-cancel {
  padding: 10px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: border-color 0.15s;
}

.btn-cancel:hover {
  border-color: var(--gray-400)
}

.btn-submit-deal {
  background: var(--green-800);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-submit-deal:hover {
  background: var(--green-700)
}

.btn-submit-deal:disabled {
  opacity: 0.6;
  cursor: not-allowed
}

/* ── Username Setup Modal ─────────────────────────────────── */
.setup-modal-body {
  text-align: center;
  padding: 32px 28px;
}

.setup-modal-body h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}

.setup-modal-body p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  line-height: 1.6;
}

.username-input-wrap {
  position: relative;
  margin-bottom: 8px
}

.username-at {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
}

.username-input {
  width: 100%;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 28px;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
  text-align: left;
}

.username-input:focus {
  border-color: var(--green-600)
}

.username-avail {
  font-size: 12px;
  margin-bottom: 16px;
  height: 16px;
}

.avail-yes {
  color: var(--green-600)
}

.avail-no {
  color: var(--red-500)
}

.btn-set-username {
  width: 100%;
  background: var(--green-800);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.btn-set-username:hover {
  background: var(--green-700)
}

/* ── Toast ──────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--gray-900);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideIn 0.25s ease forwards;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.toast-ok {
  background: var(--green-800)
}

.toast.toast-err {
  background: var(--red-600)
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(24px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes fadeOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0;
    transform: translateX(24px)
  }
}

/* ── Search Results ──────────────────────────────────────── */
.search-heading {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.search-heading span {
  color: var(--green-700)
}

.no-results {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 48px 32px;
  text-align: center;
}

.no-results-icon {
  font-size: 40px;
  margin-bottom: 12px
}

.no-results h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--gray-700);
}

.no-results p {
  font-size: 14px;
  color: var(--gray-500)
}

/* ── Loading ──────────────────────────────────────────────── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--green-200);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.loading-text {
  font-size: 14px;
  color: var(--gray-500)
}

/* ── Setup Screen (no Supabase config) ────────────────────── */
.setup-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.setup-screen-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 580px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.setup-screen-logo {
  width: 52px;
  height: 52px;
  background: var(--green-800);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--green-400);
  margin-bottom: 24px;
}

.setup-screen-card h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 26px;
  margin-bottom: 10px;
}

.setup-screen-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 20px;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.step-item:last-child {
  border-bottom: none
}

.step-num {
  width: 26px;
  height: 26px;
  background: var(--green-800);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-content {
  flex: 1
}

.step-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--gray-900);
}

.step-content p {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.5
}

.step-content code {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--green-800);
  word-break: break-all;
}

.config-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.config-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.config-field input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s;
}

.config-field input:focus {
  border-color: var(--green-600)
}

.btn-connect {
  width: 100%;
  background: var(--green-800);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  transition: background 0.15s;
}

.btn-connect:hover {
  background: var(--green-700)
}

/* ── Profile ──────────────────────────────────────────────── */
.profile-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-400), var(--green-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--white);
  flex-shrink: 0;
}

.profile-info h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 13px;
  color: var(--gray-400)
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-stat {
  text-align: center
}

.profile-stat strong {
  display: block;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--green-800);
}

.profile-stat span {
  font-size: 12px;
  color: var(--gray-500)
}

/* ── Responsive ───────────────────────────────────────────── */
@media(max-width:600px) {
  .header-inner {
    gap: 8px
  }

  .logo-text {
    display: none
  }

  .header-search input {
    font-size: 16px
  }

  .detail-header {
    padding: 20px 16px 16px
  }

  .detail-title {
    font-size: 18px
  }

  .detail-price {
    font-size: 24px
  }

  .detail-was {
    font-size: 15px
  }

  .detail-body,
  .comments-section {
    padding: 16px
  }

  .detail-vote-row {
    padding: 12px 16px
  }

  .modal-head {
    padding: 18px 18px 14px
  }

  .modal-body {
    padding: 16px 18px
  }

  .modal-foot {
    padding: 12px 18px 18px
  }

  .form-row {
    grid-template-columns: 1fr
  }

  .deal-card {
    --deal-card-height: 164px;
    --deal-thumb-width: 86px;
  }

  .deal-content {
    padding: 9px 10px;
  }

  .deal-title {
    font-size: 14px;
  }

  .deal-desc {
    font-size: 12px;
    position: relative;
    max-height: 3.1em;
    overflow: hidden;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    display: block;
    mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
  }

  .price-now,
  .price-free {
    font-size: 15px;
  }

  .btn-get-deal {
    padding: 6px 10px;
    font-size: 11px;
  }

  .deal-action-link {
    display: none;
  }

  .vote-col {
    padding: 8px 0;
  }

  .vote-score {
    font-size: 13px;
  }
}

@media(max-width:400px) {
  .deal-card {
    grid-template-columns: 40px 1fr
  }

  .deal-card {
    --deal-card-height: 170px;
    --deal-thumb-width: 72px;
  }

  .deal-body.has-image {
    grid-template-columns: var(--deal-thumb-width) minmax(0, 1fr);
  }

  .deal-thumb {
    padding: 6px;
  }

  .vote-btn {
    width: 40px;
    height: 36px;
    font-size: 14px;
  }
}


/* ── Utilities ───────────────────────────────────────────── */
.hidden {
  display: none !important
}

.text-center {
  text-align: center
}

.mt-auto {
  margin-top: auto
}