:root {
  --header-h: calc(52px + env(safe-area-inset-top));
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-main: #09090b; /* zinc-950 */
  --surface: #18181b; /* zinc-900 */
  --surface-hover: #27272a; /* zinc-800 */
  --border-light: #27272a;
  --border-focus: #3f3f46;
  --text-primary: #f4f4f5; /* zinc-50 */
  --text-secondary: #a1a1aa; /* zinc-400 */
  --text-muted: #71717a; /* zinc-500 */
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --transition-fast: 0.15s ease;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Design-system shape/atmosphere tokens. --radius drives the global
     `button` reset and .btn/dropdown corners; --btn-shadow is an optional
     extra on primary-button hover; --bg-pattern is a decorative body
     background layer. */
  --radius: 6px;
  --btn-shadow: none;
  --bg-pattern: none;
  --bg-pattern-size: auto;
  --bg-pattern-repeat: no-repeat;

  --font-xs: 11px;
  --font-sm: 12px;
  --font-base: 13px;
  --font-lg: 14px;
  --font-xl: 16px;
}

@media (max-width: 480px) {
  :root {
    --font-xs: 12px;
    --font-sm: 13px;
    --font-base: 14px;
    --font-lg: 15px;
    --font-xl: 18px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Keyboard focus rings — show only for keyboard nav, never for mouse clicks */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  background-image: var(--bg-pattern);
  background-size: var(--bg-pattern-size);
  background-repeat: var(--bg-pattern-repeat);
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: var(--font-base);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
  font-family: var(--font-heading);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main); 
}
::-webkit-scrollbar-thumb {
  background: var(--surface-hover); 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-focus); 
}

/* Header */
header {
  height: var(--header-h);
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-main);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.header-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 50;
}

.header-logo {
  height: 36px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  vertical-align: middle;
  transform-origin: left center;
  filter: contrast(1.1);
  /* The giant scale(3.6) and mix-blend-mode were causing the artifact and click-blocking issues */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* GNB */
.gnb {
  display: flex;
  gap: 0.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gnb a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-sm);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.gnb a:hover {
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.gnb a.active {
  color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

/* Links that open another site in a new tab (the blog) */
.gnb a.nav-external,
.mobile-menu-link.nav-external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mobile-menu-link.nav-external { display: flex; gap: 6px; }
.nav-external-icon {
  flex: none;
  opacity: 0.7;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.nav-external:hover .nav-external-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Admin sub tabs — a row under the header on admin routes (see gnb.js). */
.admin-subnav {
  display: flex;
  gap: 0.25rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-main);
  position: sticky;
  top: var(--header-h);
  z-index: 9;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.admin-subnav::-webkit-scrollbar {
  display: none;
}

.admin-subnav-tab {
  padding: 0.7rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.admin-subnav-tab:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.admin-subnav-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--primary);
}

.admin-subnav-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

@media (max-width: 480px) {
  .admin-subnav {
    padding: 0 0.5rem;
  }
}

.gnb-dropdown {
  position: relative;
  display: inline-block;
}

.gnb-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 500;
  font-size: var(--font-sm);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.gnb-dropdown-toggle:hover {
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.gnb-dropdown-toggle.active {
  color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

.gnb-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 160px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.gnb-dropdown-menu.hidden {
  display: none !important;
}

.gnb-dropdown-menu a {
  /* Explicit (not inherited) so the browser's default a:visited color
     can't win — these are real links, and a user who has already
     visited /shopping etc. would otherwise see washed-out purple text
     instead of the theme color. */
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0;
  display: block;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.gnb-dropdown-menu a:hover {
  background-color: var(--surface-hover);
  text-decoration: none;
}

.sso-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--surface-hover);
  border: 1px solid var(--border-focus);
  cursor: pointer;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--font-sm);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn {
  padding: 0.4rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  /* Also set explicitly (not just inherited from the `button` reset
     above) so anchor tags styled as buttons (e.g. <a class="btn">) get
     the same per-site radius. */
  border-radius: var(--radius);
}

.btn:disabled,
.btn[disabled],
.custom-alert-btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.primary {
  background-color: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--btn-shadow);
}

@keyframes login-glow {
  0% {
    box-shadow: 0 0 5px 2px color-mix(in srgb, var(--primary) 20%, transparent);
  }
  100% {
    box-shadow: 0 0 15px 5px color-mix(in srgb, var(--primary) 60%, transparent);
  }
}

#login-btn {
  animation: login-glow 2s infinite alternate ease-in-out;
}

.btn.danger {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid var(--border-light);
}

.btn.danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn.secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn.secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-focus);
}

.btn-promo-login {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-promo-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.btn-promo-login svg {
  transition: transform 0.3s ease;
}
.btn-promo-login:hover svg {
  transform: translateX(4px);
}

.btn.premium {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.2);
  transition: all 0.2s ease;
}

.btn.premium:hover {
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .btn {
    padding: 0.6rem 1.2rem;
    min-height: 44px;
    font-size: var(--font-base);
  }
}

/* Toolbar */
.toolbar {
  padding: 0.75rem 1.5rem 0 1.5rem;
  display: flex;
  justify-content: flex-end;
  height: 48px;
  align-items: center;
}

/* Main Grid */
.grid-container {
  padding: 1rem 1.5rem 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem;
  flex: 1;
}

@media (max-width: 1400px) {
  .grid-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .grid-container {
    padding: 1rem;
    grid-template-columns: 1fr;
  }
}

/* Section Cards */
.section-card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  height: max-content;
  transition: border-color var(--transition-fast);
  break-inside: avoid;
  margin-bottom: 1rem;
}

.section-card:hover {
  border-color: var(--border-focus);
}

.section-header {
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  background-color: rgba(24, 24, 27, 0.8);
}

.section-title h3 {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Badges */
.keyword-badges {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.badge {
  background-color: var(--surface-hover);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-focus);
  white-space: nowrap;
}

/* Icons */
.icon-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.collapse-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.collapsed .collapse-icon {
  transform: rotate(180deg);
}

/* Articles List */
.articles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.article-item {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--transition-fast);
}

.article-item:hover {
  background-color: var(--surface-hover);
}

.article-item:last-child {
  border-bottom: none;
}

.article-title {
  font-size: var(--font-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.article-meta {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Section Footer */
.section-footer {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-xs);
  color: var(--text-muted);
  background-color: var(--bg-main);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.update-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.update-status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-dot-color, var(--success));
  transition: background-color 0.3s;
}

/* Articles Table View Filters */
.articles-toolbar {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--surface);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-input, .filter-select {
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-sm);
  transition: border-color var(--transition-fast);
  width: 100%;
}

.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Articles Table View */
.articles-table-container {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.articles-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
  min-width: 960px;
}

.articles-table th, .articles-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border-light);
}

.articles-table th {
  background-color: rgba(24, 24, 27, 0.8);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.articles-table td {
  font-size: var(--font-sm);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.articles-table tr:hover td {
  background-color: var(--surface-hover);
}

.articles-table tr:last-child td {
  border-bottom: none;
}

.articles-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
  margin: 0;
}

/* Bigger tap target for checkbox column without changing visual size */
.articles-table td:first-child,
.articles-table th:first-child {
  padding: 0.85rem 0.6rem;
}

/* Pricing page — feature-comparison table + promo-code block.
   Built on the same surface/border/radius tokens as .articles-table so it
   doesn't introduce a new visual language. */

.col-keyword {
  color: var(--text-secondary);
}

.keyword-chip {
  display: inline-block;
  background-color: var(--surface-hover);
  color: var(--text-primary);
  font-size: var(--font-xs);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-focus);
  white-space: nowrap;
}

.col-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.col-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.col-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.col-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  font-size: var(--font-xs);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.modal-content {
  position: relative;
  background: linear-gradient(150deg, rgba(30, 30, 35, 0.85) 0%, rgba(15, 15, 18, 0.95) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(99, 102, 241, 0.15);
  transform: scale(1) translateY(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  padding: 0;
}
.modal-close:hover {
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.modal.hidden .modal-content {
  transform: scale(0.9) translateY(20px);
}

.modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #9ca3af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1.2rem;
  display: flex;
  align-items: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.toggle-switch input:focus-visible + .slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface-hover);
  transition: .4s;
  border-radius: 24px;
  border: 1px solid var(--border-focus);
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary);
  border-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #fff;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  /* text-transform: uppercase; */
  /* letter-spacing: 0.03em; */
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  background-color: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6366f1;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.keyword-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.form-actions .btn {
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

/* Section Divider */
.section-divider {
  grid-column: 1 / -1;
  width: 100%;
  padding-bottom: 0.5rem;
  margin: 1.5rem 0 0.5rem 0;
  border-bottom: 2px solid var(--border-focus);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-divider-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
  pointer-events: none;
  align-items: center;
}

.global-toast {
  background-color: rgba(24, 24, 27, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(20px);
  border: 1px solid var(--border-focus);
  font-size: var(--font-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto; /* Allow interaction if needed, though container is none */
}

.global-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
}

.toast-message {
  line-height: 1.4;
  flex: 1;
}

.toast-dismiss {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0 0 0.5rem;
  font-size: 16px;
  line-height: 1;
  align-self: center;
}
.toast-dismiss:hover {
  color: var(--text-primary);
}
/* Footer */
.app-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: auto;
  font-size: 10px; /* very small text as requested */
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-main);
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.app-footer .disclaimer {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Promo Banner Revamp */
.promo-banner {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  font-family: 'Pretendard', 'Inter', sans-serif;
}

.promo-banner.hidden {
  display: none !important;
}

.promo-hero {
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%);
}

.promo-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.promo-hero h2 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.highlight-text {
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.promo-hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

.premium-btn {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: white;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(126, 34, 206, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.premium-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(126, 34, 206, 0.6);
  background: linear-gradient(135deg, #4338ca, #7e22ce);
}

.section-title-promo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #f3f4f6;
}

.promo-cta {
  padding: 6rem 2rem;
  text-align: center;
}

.promo-cta h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .promo-hero h2 {
    font-size: 2.5rem;
  }
  .promo-hero p {
    font-size: 1.1rem;
  }
}

/* Spinner Loader */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
  gap: 1rem;
}

/* Global Loader Overlay */
.global-loader-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.global-loader-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.global-loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

.global-loader-text {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* FAB Styles */

.fab-menu {
  position: absolute;
  top: 68px; /* Below the FAB */
  right: 0;
  background-color: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  min-width: 120px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 768px) {
  .fab-menu {
    top: 68px;
  }
}

.fab-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Intro Background — Aurora Gradient Mesh */
#intro-view {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 48px);
  /* Fade to the same navy (#0b1020) the aurora layer uses as its base, so when
     the aurora rotates on scroll the exposed corners blend in instead of
     showing pure-black wedges. */
  background: radial-gradient(ellipse at 50% -20%, #0d0a1f 0%, #0a0a1a 55%, #0b1020 100%);
}

.aurora-bg {
  position: fixed;
  /* Oversized well beyond the viewport so the scroll-driven rotation never
     pulls the layer's edges inside the visible area. */
  inset: -60vh -60vw;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Base ambient tint so areas the blobs don't reach (e.g. lower-left)
     never fall to pure black. */
  background:
    radial-gradient(120% 120% at 15% 90%, rgba(99,102,241,0.18) 0%, rgba(99,102,241,0) 55%),
    radial-gradient(120% 120% at 85% 15%, rgba(168,85,247,0.16) 0%, rgba(168,85,247,0) 55%),
    #0b1020;
  transform:
    translate3d(var(--aurora-shift-x, 0px), var(--aurora-shift-y, 0px), 0)
    rotate(var(--aurora-rotate, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
}

.aurora-blob {
  position: absolute;
  width: 65vw;
  height: 65vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora-blob-1 {
  top: -25%;
  left: -15%;
  background: radial-gradient(circle at 50% 50%, #6366f1 0%, rgba(99,102,241,0) 65%);
  animation: aurora-drift-1 24s ease-in-out infinite alternate;
}

.aurora-blob-2 {
  top: 5%;
  right: -20%;
  background: radial-gradient(circle at 50% 50%, #a855f7 0%, rgba(168,85,247,0) 65%);
  animation: aurora-drift-2 30s ease-in-out infinite alternate;
}

.aurora-blob-3 {
  bottom: -25%;
  left: 15%;
  background: radial-gradient(circle at 50% 50%, #ec4899 0%, rgba(236,72,153,0) 65%);
  animation: aurora-drift-3 28s ease-in-out infinite alternate;
}

.aurora-blob-4 {
  top: 25%;
  left: 30%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle at 50% 50%, #22d3ee 0%, rgba(34,211,238,0) 65%);
  opacity: 0.4;
  animation: aurora-drift-4 34s ease-in-out infinite alternate;
}

.aurora-blob-5 {
  bottom: 0%;
  right: 10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle at 50% 50%, #3b82f6 0%, rgba(59,130,246,0) 65%);
  opacity: 0.45;
  animation: aurora-drift-5 26s ease-in-out infinite alternate;
}

@keyframes aurora-drift-1 {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(18vw, 14vh, 0) scale(1.18) rotate(35deg); }
}
@keyframes aurora-drift-2 {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(-22vw, 20vh, 0) scale(1.25) rotate(-28deg); }
}
@keyframes aurora-drift-3 {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(12vw, -16vh, 0) scale(1.15) rotate(40deg); }
}
@keyframes aurora-drift-4 {
  0%   { transform: translate3d(0, 0, 0) scale(0.95) rotate(0deg); }
  100% { transform: translate3d(-14vw, 10vh, 0) scale(1.2) rotate(-50deg); }
}
@keyframes aurora-drift-5 {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(-18vw, -12vh, 0) scale(1.1) rotate(25deg); }
}

/* Slow conic shimmer that adds the iridescent aurora banding */
.aurora-veil {
  position: absolute;
  inset: -25%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(99, 102, 241, 0) 0deg,
    rgba(168, 85, 247, 0.18) 60deg,
    rgba(236, 72, 153, 0) 120deg,
    rgba(34, 211, 238, 0.16) 200deg,
    rgba(99, 102, 241, 0) 280deg,
    rgba(99, 102, 241, 0) 360deg
  );
  filter: blur(60px);
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: aurora-spin 60s linear infinite;
  will-change: transform;
}

@keyframes aurora-spin {
  to { transform: rotate(360deg); }
}

/* Subtle film grain to break up the gradient banding */
.aurora-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob,
  .aurora-veil {
    animation: none;
  }
  .aurora-bg {
    transform: none;
  }
}

/* Custom Alert & Confirm Modals */
.custom-alert-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-alert-overlay.show {
  opacity: 1;
}

.custom-alert-content {
  background: linear-gradient(150deg, rgba(30, 30, 35, 0.9) 0%, rgba(15, 15, 18, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(99, 102, 241, 0.1);
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  text-align: center;
}

.custom-alert-overlay.show .custom-alert-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.custom-alert-message {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.custom-alert-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.custom-alert-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-alert-btn-cancel {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-focus);
}

.custom-alert-btn-cancel:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.custom-alert-btn-confirm {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Premium Modal */

.custom-alert-btn-confirm:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* Curation 4-Column Layouts */

/* Curation Hero Banner */

/* Animated canvas background */

/* Curation authoring is admin-only: whenever the admin Create button is hidden
   (visitors + regular users), show the conversion CTA in its place instead of
   leaving the hero actions row empty. Pure CSS — no auth-flow JS involved. */

/* =====================================================
   CURATION DETAIL – Hero & Sections
===================================================== */

/* Thin hero banner */

/* Blurred thumbnail background */

/* Dark gradient overlay for readability */

/* Content row inside hero */

/* Back button */

/* Text block in hero */

/* Action buttons in hero */

/* Sections grid – fixed width layout */

/* Section cards in curation detail – lighter, no thick border */

/* Divider labels in curation detail */

/* Promo Page (Intro) Overrides & Additions */
.promo-hero { text-align: center; padding: 12rem 1.5rem 4rem; }
.promo-badge { font-size: 0.8rem; background: rgba(59, 130, 246, 0.1); color: #60a5fa; padding: 0.25rem 0.75rem; border-radius: 99px; margin-bottom: 1rem; display: inline-block; border: 1px solid rgba(59, 130, 246, 0.3); }
.promo-hero h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
.highlight-text { background: linear-gradient(135deg, #60a5fa, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.promo-hero p { font-size: 1.1rem; color: #a1a1aa; margin-bottom: 2rem; }
.btn-promo-login { padding: 0.75rem 1.5rem; border-radius: 99px; font-size: 1rem; cursor: pointer; border: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }

/* Process section */
.promo-process-wrapper { padding: 2rem 1.5rem; max-width: 1000px; margin: 0 auto 3rem; }
.section-title-promo { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
@media(max-width: 768px) { .process-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.process-step-card { text-align: center; padding: 2rem; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; position: relative; z-index: 2; transition: transform 0.2s; }
.process-step-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.04); }
.process-icon { font-size: 2rem; margin-bottom: 1rem; display: inline-flex; width: 64px; height: 64px; background: rgba(59,130,246,0.1); border-radius: 50%; align-items: center; justify-content: center; }
.process-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; color: #e4e4e7; }
.process-desc { font-size: 0.95rem; color: #a1a1aa; line-height: 1.5; }

/* Mockup section */

/* Feature / Compare Grid */

/* FAQ section */
.promo-faq-wrapper { max-width: 800px; margin: 0 auto 3rem; padding: 0 1.5rem; }
.faq-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; margin-bottom: 1rem; padding: 1.25rem 1.5rem; }
.faq-q { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; color: #e4e4e7; }
.faq-a { font-size: 0.95rem; color: #9ca3af; line-height: 1.5; }

/* Stats Bar */

/* Action buttons in hero */

/* Sections grid – fixed width layout */

/* Section cards in curation detail – lighter, no thick border */

/* Divider labels in curation detail */

/* Promo Page (Intro) Overrides & Additions */
.promo-hero { text-align: center; padding: 12rem 1.5rem 4rem; }
.promo-badge { font-size: 0.8rem; background: rgba(59, 130, 246, 0.1); color: #60a5fa; padding: 0.25rem 0.75rem; border-radius: 99px; margin-bottom: 1rem; display: inline-block; border: 1px solid rgba(59, 130, 246, 0.3); }
.promo-hero h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
.highlight-text { background: linear-gradient(135deg, #60a5fa, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.promo-hero p { font-size: 1.1rem; color: #a1a1aa; margin-bottom: 2rem; }
.btn-promo-login { padding: 0.75rem 1.5rem; border-radius: 99px; font-size: 1rem; cursor: pointer; border: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }

/* Process section */
.promo-process-wrapper { padding: 2rem 1.5rem; max-width: 1000px; margin: 0 auto 3rem; }
.section-title-promo { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
@media(max-width: 768px) { .process-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.process-step-card { text-align: center; padding: 2rem; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; position: relative; z-index: 2; transition: transform 0.2s; }
.process-step-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.04); }
.process-icon { font-size: 2rem; margin-bottom: 1rem; display: inline-flex; width: 64px; height: 64px; background: rgba(59,130,246,0.1); border-radius: 50%; align-items: center; justify-content: center; }
.process-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; color: #e4e4e7; }
.process-desc { font-size: 0.95rem; color: #a1a1aa; line-height: 1.5; }

/* Mockup section */

/* Feature / Compare Grid */

/* FAQ section */
.promo-faq-wrapper { max-width: 800px; margin: 0 auto 3rem; padding: 0 1.5rem; }
.faq-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; margin-bottom: 1rem; padding: 1.25rem 1.5rem; }
.faq-q { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; color: #e4e4e7; }
.faq-a { font-size: 0.95rem; color: #9ca3af; line-height: 1.5; }

/* Stats Bar */
.stat-num { font-size: 2.2rem; font-weight: 700; background: linear-gradient(135deg, #fff, #9ca3af); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 0.25rem;}
.stat-label { font-size: 0.9rem; color: #71717a; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.promo-cta { text-align: center; padding: 3rem 1.5rem 5rem; }

/* Global Boot Loading Overlay (spinner) */
#global-loader {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#global-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

@keyframes skeleton-pulse {
  0% { background-color: rgba(255, 255, 255, 0.03); }
  50% { background-color: rgba(255, 255, 255, 0.08); }
  100% { background-color: rgba(255, 255, 255, 0.03); }
}

.skeleton {
  animation: skeleton-pulse 1.5s infinite ease-in-out;
  border-radius: 4px;
}
.skeleton-title { height: 28px; width: 250px; max-width: 40%; border-radius: 6px; }
.skeleton-search { height: 40px; width: 200px; max-width: 30%; border-radius: 8px; }
.skeleton-item { height: 60px; width: 100%; border-radius: 8px; }

/* ─── Logged-out content gate (Social / Shopping / Places lists) ───
   The CTA spans the grid row after the free items; skeleton cards
   fill the rows behind it. Both click through to the login button. */
.kn-gate-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.05);
  cursor: pointer;
  text-align: center;
}
.kn-gate-msg {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}
.kn-gate-skel {
  min-height: 240px;
  border-radius: 12px;
  animation: skeleton-pulse 1.5s infinite ease-in-out;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS PAGE
   ═══════════════════════════════════════════════════════════ */

.notif-page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Page Header */
.notif-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.notif-page-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.notif-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.notif-page-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

/* Panels */
.notif-panel {
  background: linear-gradient(150deg, rgba(24, 24, 27, 0.6) 0%, rgba(15, 15, 18, 0.8) 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notif-panel:hover {
  border-color: var(--border-focus);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-panel-icon.email-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.notif-panel-icon.slack-chat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.notif-panel-icon.slack-canvas-icon {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
}

.notif-panel-title-wrap {
  flex: 1;
  min-width: 0;
}

.notif-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.notif-panel-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

/* Panel Body */
.notif-panel-body {
  padding: 1.25rem 1.5rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Form Elements */
.notif-form-group {
  margin-bottom: 1rem;
}

.notif-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notif-input,
.notif-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notif-input:hover,
.notif-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.notif-input:focus,
.notif-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.notif-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%239ca3af' d='M2 4l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.notif-form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.notif-action-row {
  display: flex;
  gap: 0.75rem;
}

.notif-btn-save {
  flex: 1;
  padding: 0.65rem 1rem !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
}

.notif-btn-test {
  padding: 0.65rem 1.1rem !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
  white-space: nowrap;
}

/* Webhook Row */
.notif-webhook-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.notif-btn-verify {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid rgba(202, 138, 4, 0.35);
  border-radius: 8px;
  cursor: pointer;
  color: #fbbf24;
  background: rgba(202, 138, 4, 0.08);
  transition: all 0.2s ease;
}

.notif-btn-verify:hover {
  background: rgba(202, 138, 4, 0.15);
  border-color: rgba(202, 138, 4, 0.5);
}

/* Disabled hint */
.notif-disabled-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.notif-panel-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Section Divider */

/* Type Selector Tabs */

/* Format Previews */
.notif-format-preview {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.notif-format-preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

/* Chat Preview */
.notif-chat-preview {
  background: #1a1d21;
  border-radius: 8px;
  padding: 0.85rem;
}

.notif-chat-bubble {
  font-size: 0.82rem;
  line-height: 1.5;
}

.notif-chat-bot-name {
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.notif-chat-text {
  color: #d1d5db;
}

.notif-chat-text a {
  color: #60a5fa;
  text-decoration: none;
}

.notif-chat-text strong {
  color: #f1f5f9;
}

/* Canvas Preview */
.notif-canvas-preview {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #1a1a1a;
}

.notif-canvas-header {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}

.notif-canvas-date {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.notif-canvas-section {
  margin-top: 0.5rem;
}

.notif-canvas-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.notif-canvas-article {
  margin-left: 0.25rem;
}

.notif-canvas-article-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 0.25rem;
}

.notif-canvas-bullets {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.78rem;
  color: #374151;
  line-height: 1.5;
}

.notif-canvas-bullets li {
  margin-bottom: 0.15rem;
}

/* Spinner */
.notif-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: notif-spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes notif-spin {
  to { transform: rotate(360deg); }
}

/* Slack shared panel override */

/* Mobile */
@media (max-width: 640px) {
  .notif-page-container {
    padding: 1rem;
  }
  .notif-form-row {
    flex-direction: column;
  }
  .notif-action-row {
    flex-direction: column;
  }
  .notif-webhook-row {
    flex-direction: column;
  }
  .notif-btn-verify {
    width: 100%;
    justify-content: center;
  }
  .notif-page-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .notif-page-header-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* ── Curation Detail: Progressive Loading ── */

/* Insight Markdown Formatting */

/* ============================================================
   MOBILE OPTIMIZATION (Phase 1 — Foundation)
   Breakpoint: max-width 480px (phone portrait only)
   ============================================================ */

/* Hamburger toggle button — hidden on desktop, shown on mobile */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.5rem;
  margin-right: 0.25rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
}
.mobile-menu-toggle:hover {
  background-color: var(--surface-hover);
}

/* Mobile menu sheet — only rendered on mobile via @media block below.
   Default (desktop): hidden entirely. */
.mobile-menu-sheet,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 480px) {
  /* Sheet: baseline = open (translateX(0)); `.hidden` slides off-screen.
     This avoids `:not(.hidden)` selector quirks and keeps specificity clean
     (the `.hidden` rule wins when present, base wins when absent). */
  .mobile-menu-sheet {
    position: fixed;
    top: 0;
    right: 0;
    width: 84vw;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--surface);
    border-left: 1px solid var(--border-light);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-right: env(safe-area-inset-right);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Override global `.hidden { display: none }`: keep mounted, slide off */
  .mobile-menu-sheet.hidden {
    display: flex !important;
    transform: translateX(100%);
    pointer-events: none;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: block;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease;
  }
  .mobile-menu-backdrop.hidden {
    display: block !important;
    opacity: 0;
    pointer-events: none;
  }
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.mobile-menu-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}
.mobile-menu-close:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.5rem 0 1rem 0;
}
.mobile-menu-nav > .mobile-menu-section:last-child {
  margin-top: auto;
  padding-top: 1rem;
}
.mobile-menu-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  transition: background-color var(--transition-fast);
}
.mobile-menu-link:hover {
  background-color: var(--surface-hover);
  text-decoration: none;
}
.mobile-menu-link.active {
  color: var(--primary);
  background-color: rgba(59, 130, 246, 0.1);
}
.mobile-menu-link-danger {
  color: var(--danger);
}
.mobile-menu-link-danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.mobile-menu-section {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.mobile-menu-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.mobile-menu-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem 0.25rem;
  font-weight: 600;
}
.mobile-menu-cta {
  margin: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  width: calc(100% - 2rem);
}

/* Prevent iOS Safari from auto-zooming on input focus.
   Inputs must be ≥16px on touch devices. Applied globally
   for any pointer:coarse device to cover small tablets too. */
@media (pointer: coarse) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  /* Safe-area aware header (notch / dynamic island) */
  header {
    padding-left: calc(0.75rem + env(safe-area-inset-left));
    padding-right: calc(0.75rem + env(safe-area-inset-right));
  }

  /* Show hamburger on mobile */
  .mobile-menu-toggle {
    display: inline-flex;
    min-height: 44px;
    min-width: 44px;
  }
  .header-left {
    gap: 0.5rem !important;
  }
  .header-logo {
    height: 28px;
    max-width: 124px;
  }

  /* Hide desktop GNB and Upgrade button on mobile — replaced by hamburger sheet */
  .gnb {
    display: none !important;
  }
  /* Trim header SSO area: hide profile text/badge, keep avatar only */
  #user-profile #user-name,
  #user-profile #admin-badge {
    display: none !important;
  }
  #user-profile-toggle {
    padding: 0.25rem !important;
  }
  #sso-container {
    gap: 0.5rem !important;
  }

  /* Tap target minimum (Apple HIG 44px / Material 48px).
     Applies to common interactive controls. */
  .btn,
  .icon-btn,
  .gnb-dropdown-toggle {
    min-height: 44px;
  }

  /* Header login button — compact pill, smaller than full 44px tap target
     since it sits in a 52px header and the full Login CTA is in the sheet. */
  #login-btn {
    min-height: 32px;
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: none;  /* drop glow on mobile to reduce noise */
  }
  /* Shorter label on mobile via pseudo (button text stays for a11y on desktop) */
  #login-btn {
    font-size: 0;
  }
  #login-btn::before {
    content: "Login";
    font-size: 0.8rem;
  }

  /* Unify view padding — replaces inline `padding: 1.5rem` on page-view */
  .page-view {
    padding: 1rem !important;
  }
  /* Page-view variants that should keep edge-to-edge layout
     (intro/pricing have full-bleed hero sections; home/curation-detail
     manage their own inner padding; notifications also full-bleed) */
  #intro-view.page-view,
  #home-view.page-view,
  #notifications-view.page-view {
    padding: 0 !important;
  }
  /* Pricing inner sections still need horizontal breathing room on mobile */
  /* Home view inner padding for hero/toolbar/grid */
  #home-view .watchroom-hero-banner {
    margin: 1rem !important;
    padding: 1rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem;
  }
  #home-view .watchroom-hero-banner > div:nth-child(2) {
    margin-left: 0 !important;
    width: 100%;
  }
  #home-view .watchroom-hero-banner h2 {
    font-size: 1.1rem !important;
  }
  /* Hide decorative blob that intrudes on text */
  #home-view .watchroom-hero-banner > div:last-child {
    display: none !important;
  }
  #watchroom-report-settings-btn {
    width: 100%;
    justify-content: center !important;
  }
  /* Home toolbar: left/right groups stack, no horizontal overflow */
  #home-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem;
  }
  #home-toolbar > div {
    width: 100%;
    flex-wrap: wrap;
  }
  #home-date-filter {
    min-width: 0 !important;
    flex: 1;
  }
  #refresh-home-btn {
    flex: 0 0 auto;
  }
  #home-fab-btn {
    width: 100%;
    justify-content: center;
  }
  #fab-menu {
    left: 0;
    right: 0 !important;
    width: 100%;
  }
  .toolbar {
    padding: 0.75rem 1rem 0 1rem !important;
    height: auto;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .grid-container {
    padding: 1rem !important;
  }

  /* ───────── Curation List ─────────
     Keep the hero banner compact so the card list is visible above the fold
     on small phones (iPhone SE = 375×667). Hide the long promotional desc
     entirely — the title + CTA are enough context on mobile. */
  /* Drop the multi-sentence pitch on mobile — purely promotional copy */
  /* Right-half decorative blobs look awkward when banner is square — hide */
  /* Cut canvas particles entirely on mobile — costs perf, decorative only */

  /* Curation toolbar: stack vertically, search full width */

  /* ───────── Account ───────── */
  #account-view .glass-panel {
    padding: 1.25rem !important;
    margin-top: 1rem !important;
  }
  #account-view h2 {
    font-size: 1.1rem !important;
    margin-bottom: 1.25rem !important;
  }
  #account-view h3 {
    font-size: 1rem !important;
  }
  /* Info rows (Name/Email/Joined Date, etc.) — keep label left / value right */
  #account-view [style*="space-between"] {
    gap: 0.5rem;
  }

  /* ───────── Bookmarks (table kept as horizontal scroll, toolbar restructured) ───────── */
  #bookmarks-view .articles-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  #bookmarks-view .filter-group {
    width: 100%;
    min-width: 0 !important;
  }
  #bookmarks-view .filter-input,
  #bookmarks-view .filter-select {
    width: 100%;
  }
  /* Library / Bookmarks / Analysis / admin tables: ensure horizontal scroll is smooth */
  .articles-table-container {
    -webkit-overflow-scrolling: touch;
  }
  .articles-table th,
  .articles-table td {
    /* Slightly tighter cell padding on mobile so more columns fit before scroll */
    padding: 0.65rem 0.9rem;
  }

  /* ───────── Curation Detail ───────── */
  /* Existing 768px rule sets 3.5rem horizontal padding — way too much for 480px. */
  /* Floating prev/next arrows occlude content on narrow screens — hide */

  /* ───────── Intro / Promo ───────── */
  .promo-hero {
    padding: 4rem 1rem 3rem !important;
  }
  .promo-hero h2 {
    font-size: 1.85rem !important;
  }
  .promo-hero p {
    font-size: 0.95rem !important;
  }
  .promo-badge {
    font-size: 0.7rem !important;
  }
  .btn-promo-login {
    padding: 0.65rem 1.1rem !important;
    font-size: 0.9rem !important;
    width: 100%;
    justify-content: center;
  }
  .promo-process-wrapper,
  .promo-faq-wrapper {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-bottom: 3rem !important;
  }
  .section-title-promo {
    font-size: 1.4rem !important;
    margin-bottom: 1.5rem !important;
  }
  .process-step-card {
    padding: 1.25rem !important;
  }
  .faq-item {
    padding: 1rem !important;
  }

  /* ───────── Pricing ───────── */
  /* Override the generic `#pricing-view > * { padding-left: 1rem }` so children
     that need to manage their own padding can do so cleanly */

  /* ───────── Modals (settings / signup / read / cform-block / share) ───────── */
  /* Default modal-content is width:100% + padding 2.5rem, which goes edge-to-edge
     and feels cramped on phones. Add side breathing room and reduce padding.
     Use explicit width (not `auto`) so empty modals don't shrink-to-fit. */
  .modal-content {
    width: calc(100% - 1.5rem) !important;
    max-width: calc(100% - 1.5rem) !important;
    padding: 1.25rem !important;
    border-radius: 16px;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
  }
  .modal-content h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem !important;
    padding-bottom: 0.75rem !important;
  }
  /* read-modal markdown body should fit tighter */
  /* form action buttons stack at narrow widths */
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .form-actions .btn {
    width: 100%;
  }

  /* ───────── Curation Form View (Create / Edit) ───────── */
  /* Inline form inputs (curation-title, curation-desc) */
  /* Image toggle (AI vs Upload) — keep horizontal but smaller font */

  /* ───────── Long-word safety net ─────────
     Long URLs, untranslated foreign words, or pasted keywords can overflow
     narrow viewports. Allow break at any character as a last resort for
     content surfaces (cards, descriptions). Headings/badges keep nowrap. */
  .article-title,
  .article-meta,
  .section-title h3 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  /* article-title currently has white-space: nowrap + ellipsis on desktop;
     keep ellipsis behavior but allow wrap on mobile so titles aren't cut off */
  .article-title {
    white-space: normal;
  }

  /* ───────── Reduced motion: stop heavy canvas animations ───────── */
}

/* Outside the 480px block: reduced-motion users on any device get the same
   safety even at desktop sizes */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   TOUCH DEVICE GUARDS
   On no-hover devices, `:hover` styles are triggered on tap and persist
   until the next interaction — making elements look "stuck". Reset the most
   disruptive hover-induced changes (translateY lift, scale, big shadows).
   ============================================================ */
@media (hover: none) {
  .btn-promo-login:hover,
  .btn.premium:hover,
  .form-actions .btn:hover,
  .premium-btn:hover,
  .process-step-card:hover,
  .custom-alert-btn-confirm:hover {
    transform: none !important;
    box-shadow: inherit;
  }
  /* Don't keep "hover" background tints lingering on tap */
  .article-item:hover,
  .mobile-menu-link:hover,
  .gnb a:hover,
  .gnb-dropdown-toggle:hover,
  .gnb-dropdown-menu a:hover,
  .icon-btn:hover {
    background-color: transparent;
  }
}

/* Curation card thumbnail gradient placeholder */

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0 2px;
  height: 32px;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 7px;
  cursor: pointer;
  height: 100%;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
  letter-spacing: 0.02em;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.lang-btn.active {
  color: var(--primary);
  background: rgba(59,130,246,0.15);
  border-radius: 4px;
}

.lang-divider {
  color: var(--border-light);
  font-size: 0.7rem;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 480px) {
  .lang-toggle { height: 36px; }
  .lang-btn { font-size: 0.8rem; padding: 0 8px; }
  button.lang-btn { min-height: unset; }
}

/* ============================================================
   SOCIAL TRENDS PAGE (/social)
   ============================================================ */

/* Golf page — country selector (the /golf headline filter) */

/* ============================================================
   COINS PAGE (Market ▸ Coins) — coin cards with 7d sparklines
   ============================================================ */
:root {
  --coin-up: #16a34a;
  --coin-down: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root { --coin-up: #22c55e; --coin-down: #f87171; }
}
:root[data-theme="dark"] { --coin-up: #22c55e; --coin-down: #f87171; }
:root[data-theme="light"] { --coin-up: #16a34a; --coin-down: #dc2626; }

/* Coins — signed-out CTA banner */

/* Coins — add-coin control + search panel */

/* Coins — per-card delete control (signed-in list) */

/* When both a sample tag and a rank badge exist, only the sample tag gets the
   auto margin so they sit together on the right. */

/* ============================================================
   SHOPPING TRENDS PAGE (/shopping) — compact grid, up to 10 cols
   ============================================================ */

/* ---- 쿠팡 골드박스 배너 (파트너스) ---- */

/* 파트너스 고지 (필수 문구 — 항상 배너와 함께 노출) */

/* FOOD — reuses .shopping-grid / .shopping-card; adds a rating + location row */

/* Playground public/private facility badge (bottom-left of the thumb) */

/* Gold rank placeholder for image-less prestige sources (The World's 50 Best) */

/* "More curations" — full-bleed width matching the sections grid */

/* ── Alerts page: empty state ── */
.notif-empty { text-align: center; padding: 3rem 1.5rem; border: 1px dashed var(--border-light); border-radius: var(--radius-lg, 12px); color: var(--text-secondary); }
.notif-empty a { color: var(--primary); text-decoration: underline; display: inline-block; margin-top: 0.75rem; }

/* ── Alerts page: channel tabs, settings + guide columns ── */
.notif-lead { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.notif-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-light); overflow-x: auto; overflow-y: hidden; }
.notif-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.8rem 1.4rem; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-secondary); font: inherit; white-space: nowrap; cursor: pointer; }
.notif-tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.03); }
.notif-tab.active { color: var(--text-primary); border-bottom-color: var(--primary); }
.notif-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.notif-tab-name { font-size: 0.92rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.notif-tab-status { font-size: 0.78rem; color: var(--text-muted); }
.notif-tab-status.on { color: #34d399; }
.notif-tab-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; margin-top: 0.5rem; }
.notif-tab-panel[hidden] { display: none; }
/* Auto Marketing admin page (/marketing) */
.mkt-panel[hidden] { display: none; }
.mkt-label { display: block; margin-bottom: 0.4rem; font-size: 0.82rem; color: #9ca3af; }
.mkt-input { width: 100%; padding: 0.65rem 0.75rem; border-radius: 6px; border: 1px solid #374151; background: rgba(255,255,255,0.05); color: #e5e7eb; font: inherit; font-size: 0.9rem; box-sizing: border-box; }
.mkt-topic { padding: 1rem 1.1rem; border-radius: 8px; border: 1px solid var(--border-light); background: rgba(255,255,255,0.03); }
.mkt-topic.off { opacity: 0.6; }
.mkt-topic-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 0.6rem; }
.mkt-topic-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.7rem; font-size: 0.85rem; }
.mkt-topic-foot label { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.8rem; }
.mkt-topic-articles { margin-top: 0.7rem; font-size: 0.83rem; color: #9ca3af; }
.mkt-bubble { padding: 0.85rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; line-height: 1.55; }
.mkt-bubble.reply { margin-left: 1.25rem; }
@media (max-width: 720px) { .mkt-topic-grid { grid-template-columns: 1fr; } }
/* Engagement admin page (/engagement) */
.eng-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.eng-alert { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 8px; border: 1px solid rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); color: #fca5a5; font-size: 0.88rem; }
.eng-status { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; background: rgba(255,255,255,0.08); color: #9ca3af; }
.eng-status.posted { background: rgba(16,185,129,0.15); color: #34d399; }
.eng-status.test { background: rgba(59,130,246,0.15); color: #93c5fd; }
.eng-status.failed { background: rgba(239,68,68,0.15); color: #fca5a5; }
.eng-reason { margin-top: 0.25rem; font-size: 0.75rem; color: #6b7280; }
.eng-text { white-space: pre-wrap; word-break: break-word; }
#engagement-view .articles-table td { white-space: normal; overflow: visible; text-overflow: clip; }
.notif-tab-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.notif-guide { position: sticky; top: calc(var(--header-h) + 1rem); padding: 1.25rem 1.5rem; border: 1px solid var(--border-light); border-radius: 16px; background: rgba(255, 255, 255, 0.02); }
.notif-guide-title { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.notif-guide-subtitle { margin: 1.25rem 0 0.5rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.notif-guide-steps, .notif-guide-notes { margin: 0; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.notif-guide-steps li + li, .notif-guide-notes li + li { margin-top: 0.35rem; }
.notif-guide strong { color: var(--text-primary); font-weight: 600; }
.notif-guide a { color: var(--primary); text-decoration: underline; }
@media (max-width: 960px) {
  .notif-tab-panel { grid-template-columns: 1fr; }
  .notif-guide { position: static; }
  .notif-tab { padding: 0.7rem 1rem; }
}
