/* ===== GeoStamper — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;800&display=swap');

:root {
  --bg:           #080e1a;
  --surface:      #0d1525;
  --card:         #111c2e;
  --card-2:       #162035;
  --border:       rgba(255,255,255,0.07);
  --border-2:     rgba(14,165,233,0.2);
  --accent:       #0ea5e9;
  --accent-2:     #38bdf8;
  --accent-glow:  rgba(14,165,233,0.15);
  --brand:        #22d3ee;
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 4px 32px rgba(0,0,0,0.5);
  --font:         "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "Courier New", "Consolas", monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,14,26,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.nav-logo {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  line-height: 0;
}
.nav-logo-img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nav-name {
  font-family: var(--font);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--brand);
  white-space: nowrap;
  line-height: 1;
}
.nav-gps {
  font-weight: 800;
  color: var(--brand);
}
.nav-cam {
  font-weight: 300;
  color: var(--brand);
}
.nav-links {
  display: flex; align-items: center; gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 0.4rem 1rem; border-radius: 8px; font-weight: 600;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--accent-2) !important; color: #fff !important; }
.nav-mobile-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text); font-size: 1.4rem;
}

/* ===== HERO ===== */
.hero {
  padding: 3rem 1.5rem 2rem;
  max-width: 1140px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "copy tool";
  gap: 3rem;
  align-items: start;
}
.hero-text {
  grid-area: copy; padding-top: 1rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-glow); border: 1px solid var(--border-2);
  color: var(--accent-2); font-size: 0.8rem; font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 20px; margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: 2.2rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 1rem; max-width: 18ch;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  color: var(--text-muted); font-size: 1.05rem; line-height: 1.7;
  margin-bottom: 1.5rem; max-width: 34rem;
}
.hero-stats {
  display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
  justify-content: center;
}
.hero-stat { text-align: center; }
.hero-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.hero-stat-lbl { font-size: 0.75rem; color: var(--text-muted); }
.hero-trust {
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-dim);
}
.trust-item::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ===== TOOL CARD ===== */
.tool-card {
  grid-area: tool;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.tool-tabs {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #162338 0%, var(--surface) 100%);
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 0.9rem 0.75rem;
  color: var(--text-muted); font-size: 0.9rem; font-weight: 600;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
}
.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, rgba(14,165,233,0.18), rgba(14,165,233,0.05));
}
.tab-btn:hover:not(.active) { color: var(--text); background: var(--card-2); }

/* GPS Bar */
.gps-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.82rem; color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 36px;
}
.gps-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-dim);
}
.gps-bar.idle .gps-dot { background: var(--accent); }
.gps-bar.fetching .gps-dot { background: var(--warning); animation: pulse 1s infinite; }
.gps-bar.found .gps-dot { background: var(--success); }
.gps-bar.denied .gps-dot, .gps-bar.error .gps-dot { background: var(--danger); }
.gps-bar.found { color: var(--text); }
.gps-bar.idle { color: var(--text); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Panels */
.panel { padding: 1rem; }
.panel.hidden { display: none; }

/* Camera panel */
.video-wrap {
  position: relative;
  background: linear-gradient(160deg, #12203a 0%, #1a2b45 50%, #0f1a2e 100%);
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  transition: aspect-ratio 0.2s ease, min-height 0.2s ease;
}
.video-wrap:not(.is-live) {
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  height: auto;
}
.video-wrap:not(.is-live) .cam-video {
  display: none;
}
.cam-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: transparent;
}
.video-wrap.is-live .cam-video { background: #000; min-height: 200px; }
.cam-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.55rem; padding: 1rem 1.25rem; text-align: center;
  color: var(--text-muted); z-index: 1;
  pointer-events: auto;
  background: radial-gradient(ellipse at center, rgba(14,165,233,0.08), transparent 70%);
}
.video-wrap:not(.is-live) .cam-placeholder {
  position: relative;
  inset: auto;
  padding: 1.15rem 1rem 1.25rem;
  gap: 0.65rem;
}
.cam-placeholder.hidden { display: none; }
.cam-placeholder-icon { font-size: 1.65rem; line-height: 1; opacity: 0.95; }
.cam-placeholder p { font-size: 0.88rem; max-width: 20rem; line-height: 1.45; color: #cbd5e1; margin: 0; }
.cam-placeholder strong { color: var(--accent-2); }
.cam-perm-note { font-size: 0.78rem !important; max-width: 19rem !important; color: var(--text-dim) !important; line-height: 1.4 !important; }
.btn-perm {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0.1rem 0; padding: 0.75rem 1.2rem; min-height: 46px;
  width: min(100%, 20rem);
  border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #04101c; font-size: 0.92rem; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(14,165,233,0.28);
}
.btn-perm:active { transform: scale(0.98); }
.btn-perm:disabled { opacity: 0.65; cursor: wait; }
.btn-perm.hidden { display: none; }
.cam-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
}
.video-wrap:not(.is-live) .cam-overlay { display: none; }
.cam-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
}
.cam-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 0.75rem;
}
.btn-capture {
  flex: 1; max-width: 260px;
  background: var(--accent);
  color: #fff; border: none; border-radius: 10px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-capture:hover { background: var(--accent-2); }
.btn-capture:active { transform: scale(0.97); }
.btn-switch {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  transition: all 0.2s;
}
.btn-switch:hover { color: var(--text); border-color: var(--accent); }

/* Upload panel */
.drop-zone {
  display: block; cursor: pointer;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all 0.2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: var(--accent-glow);
}
.drop-zone input[type="file"] { display: none; }
.drop-inner {
  padding: 2.5rem 1rem; text-align: center;
}
.drop-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.drop-inner p { color: var(--text-muted); margin-bottom: 0.25rem; }
.drop-inner strong { color: var(--accent); }
.drop-hint { font-size: 0.8rem; color: var(--text-dim) !important; }

/* Preview */
.preview-wrap { padding: 1rem; }
.preview-wrap.hidden { display: none; }
.canvas-container {
  border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(45deg, #1e293b 25%, transparent 25%),
    linear-gradient(-45deg, #1e293b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1e293b 75%),
    linear-gradient(-45deg, transparent 75%, #1e293b 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #0f172a;
  margin-bottom: 1rem; max-height: 360px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
#stampCanvas {
  max-width: 100%; max-height: 360px;
  display: block; border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Controls */
.ctrl-row {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ctrl-label {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em;
}
.template-btns {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.tmpl-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 8px;
  min-height: 44px; padding: 10px 12px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.tmpl-btn.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
}
.tmpl-btn:hover:not(.active) { color: var(--text); border-color: var(--border-2); }

.toggles-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.toggle-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-muted); cursor: pointer;
  padding: 0.35rem 0.5rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.15s;
}
.toggle-label input { display: none; }
.toggle-label .tog-dot {
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--text-dim); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle-label .tog-dot::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.toggle-label input:checked + .tog-dot { background: var(--accent); }
.toggle-label input:checked + .tog-dot::after { transform: translateX(14px); }
.toggle-label.checked { border-color: var(--border-2); color: var(--text); }
.toggle-label.is-unavailable {
  opacity: 0.55;
}
.toggle-label .tog-hint {
  display: block; width: 100%; font-size: 0.68rem; color: var(--text-dim);
  margin-top: 2px; font-weight: 500;
}

.fmt-settings {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.fmt-group {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.3rem 0.5rem;
}
.fmt-lbl {
  font-size: 0.73rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em;
}
.seg-ctrl {
  display: flex; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}
.seg-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 0.78rem; font-weight: 600; padding: 0.22rem 0.45rem;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.active {
  background: var(--accent-glow); color: var(--accent);
}
.seg-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.04); }

.custom-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 0.55rem 0.75rem;
  font-size: 0.88rem; outline: none; transition: border-color 0.2s;
}
.custom-input:focus { border-color: var(--accent); }
.custom-input::placeholder { color: var(--text-dim); }

.action-btns {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 0.75rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff; border: none; border-radius: 10px;
  padding: 0.75rem 1.2rem; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 10px;
  padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-2); }

/* ===== SECTIONS COMMON ===== */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-tag {
  display: inline-block;
  background: var(--accent-glow); color: var(--accent-2);
  border: 1px solid var(--border-2);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem; border-radius: 20px; margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.section-header h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.6rem; }
.section-header p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-2); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-glow); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ===== USE CASES ===== */
.use-cases-bg { background: var(--surface); }
.use-cases-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.use-case-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.use-case-icon { font-size: 1.8rem; }
.use-case-card h3 { font-size: 0.95rem; font-weight: 700; }
.use-case-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.use-case-link {
  font-size: 0.82rem; color: var(--accent); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ===== HOW IT WORKS ===== */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.88rem; color: var(--text-muted); }

/* ===== ADVANTAGES vs APPS ===== */
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.compare-table th, .compare-table td {
  padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left;
}
.compare-table thead th { background: var(--card-2); font-weight: 700; color: var(--text-muted); }
.compare-table thead th:first-child { color: var(--text); }
.compare-table thead th.us { color: var(--accent); }
.compare-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.compare-table .yes { color: var(--success); font-weight: 700; }
.compare-table .no  { color: var(--danger); }
.compare-table .us-col { background: var(--accent-glow) !important; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; text-align: left;
  color: var(--text); font-size: 0.95rem; font-weight: 600;
}
.faq-q:hover { color: var(--accent); }
.faq-arrow { color: var(--text-dim); font-size: 1.1rem; transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 1.25rem 1rem;
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ===== NETWORK FOOTER ===== */
.network-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 2rem 1.5rem; text-align: center;
}
.network-title {
  font-size: 0.75rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem;
}
.network-links {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
  max-width: 1140px; margin: 0 auto;
}
.network-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 0.9rem;
  color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s;
}
.network-link:hover { border-color: var(--border-2); color: var(--text); }
.network-icon-img { width: 18px; height: 18px; border-radius: 4px; }
.network-text { white-space: nowrap; }

.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  overflow-x: hidden;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.85rem; text-align: center;
}
.footer-copy { font-size: 0.82rem; color: var(--text-dim); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem;
  justify-content: center; align-items: center;
  max-width: 100%;
  list-style: none;
}
.footer-links a {
  font-size: 0.82rem; color: var(--text-dim); transition: color 0.2s;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--text-muted); }
.footer-links .sep {
  color: var(--text-dim); opacity: 0.45; font-size: 0.7rem;
  user-select: none;
}
/* Legacy bare footer (no .footer-inner) still centers */
.footer > .footer-links {
  justify-content: center;
  padding: 0 0.25rem;
}

/* ===== PAGE LAYOUTS (about, guides, etc.) ===== */
.page-hero {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.6rem; }
.page-hero p { color: var(--text-muted); max-width: 580px; margin: 0 auto; }
.page-content {
  max-width: 800px; margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.page-content h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--accent-2); }
.page-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.page-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.3rem; }
.page-content a { color: var(--accent); }
.page-content strong { color: var(--text); }

/* Guide pages */
.guide-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3rem 1.5rem; }
.guide-hero-inner { max-width: 800px; margin: 0 auto; }
.guide-breadcrumb {
  font-size: 0.8rem; color: var(--text-dim); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 6px;
}
.guide-breadcrumb a { color: var(--text-dim); }
.guide-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.guide-hero .guide-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--text-dim);
}
.guide-content { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.guide-content h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--accent-2); }
.guide-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.guide-content ul, .guide-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.guide-content li { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.4rem; }
.guide-content strong { color: var(--text); }
.guide-content a { color: var(--accent); }

.cta-box {
  background: var(--accent-glow); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.cta-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
/* a.btn-cta beats .guide-content a (which was painting accent text on accent bg) */
a.btn-cta,
.cta-box .btn-cta,
.guide-content a.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #04101c !important;
  padding: 0.65rem 1.5rem; border-radius: 8px; font-weight: 700;
  font-size: 0.95rem; transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
a.btn-cta:hover,
a.btn-cta:focus,
a.btn-cta:active,
a.btn-cta:visited,
.cta-box .btn-cta:hover,
.guide-content a.btn-cta:hover {
  background: var(--accent-2);
  color: #04101c !important;
}

.info-box {
  background: var(--card); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.info-box p { margin-bottom: 0 !important; }

/* ===== CONTRIBUTE ===== */
.contribute-section {
  max-width: 680px; margin: 3rem auto 2rem; padding: 2.5rem 2rem;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); text-align: center;
}
.contribute-section h2 { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--text); }
.contribute-section p { color: var(--text-muted); margin-bottom: 1.5rem; }
.btn-support {
  display: inline-block; padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; border-radius: 8px;
  text-decoration: none; font-size: 1rem;
  transition: opacity 0.2s;
}
.btn-support:hover { opacity: 0.88; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.75rem 1rem 1.25rem;
    gap: 1.25rem;
  }
  .hero-text { order: 2; margin-top: 0; width: 100%; padding-top: 0; }
  .tool-card { order: 1; width: 100% !important; max-width: 100% !important; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .use-cases-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero { padding-top: 1.25rem; padding-left: 1rem; padding-right: 1rem; }
  .hero h1 { font-size: 1.7rem; }
  .features-grid { grid-template-columns: 1fr; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute; top: 60px; left: 0; width: 100%;
    background: rgba(8,14,26,0.98); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    flex-direction: column; padding: 1.5rem; gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.nav-open { display: flex; }
  .nav-mobile-btn { display: block; }
  .toggles-grid { grid-template-columns: 1fr; }
  .template-btns { grid-template-columns: repeat(2, 1fr); }
  .action-btns { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.78rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; gap: 0.5rem 0.85rem; }
  .nav-name { font-size: 0.95rem; }
  .nav-logo, .nav-logo-img { width: 32px; height: 32px; }
  .tool-tabs { grid-template-columns: 1fr 1fr 1fr; }
  .tab-btn { font-size: 0.78rem; padding: 0.75rem 0.35rem; }
  .video-wrap.is-live { aspect-ratio: 3/4; max-height: 52vh; }
  .video-wrap:not(.is-live) { min-height: 0; max-height: none; }
  .canvas-container { max-height: 48vh; }
  #stampCanvas { max-height: 48vh; }
  .tool-card { width: 100% !important; max-width: 100% !important; }
  .hero { width: 100%; }
}

.step { pointer-events: none; cursor: default; }


/* iOS Prompt */
.ios-prompt { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; background: #fff; color: #1e293b; padding: 16px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); z-index: 10000; }
.ios-prompt.hidden { display: none; }
.ios-prompt-close { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 20px; color: #64748b; cursor: pointer; }
.ios-prompt p { font-size: 0.95rem; line-height: 1.4; margin: 0; }
.ios-prompt-action { font-weight: bold; color: var(--accent); display: flex; align-items: center; gap: 6px; }

/* Android / Chrome PWA install button */
.nav-install-btn {
  background: none; border: 1.5px solid var(--accent); border-radius: 8px;
  color: var(--accent); cursor: pointer; font-size: 0.82rem; font-weight: 600;
  padding: 0.3rem 0.75rem; transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.nav-install-btn:hover { background: var(--accent); color: #fff; }
.nav-install-btn.hidden { display: none; }



/* PWA NATIVE APP OVERRIDE */
@media (display-mode: standalone) {
  .nav { display: flex !important; }
  .nav-links, .nav-mobile-btn { display: none !important; }
  .hero-text { display: none !important; }
  .hero { padding: 0.75rem 0.75rem 1.5rem !important; max-width: 100% !important; display: block !important; }
  .tool-card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow) !important;
    min-height: 0 !important;
  }
  .section { display: none !important; }
  .network-footer { display: none !important; }
  .ios-prompt { display: none !important; }
  body { background: var(--bg); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== GALLERY / MY PHOTOS ===== */
.gallery-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.gallery-search {
  flex: 1; min-width: 140px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
  color: var(--text); font-size: 0.85rem;
  outline: none; transition: border-color 0.2s;
}
.gallery-search:focus { border-color: var(--accent); }
.gallery-search::placeholder { color: var(--text-dim); }
.gallery-sort {
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
  color: var(--text); font-size: 0.85rem;
  cursor: pointer; outline: none;
}
.gallery-sort:focus { border-color: var(--accent); }
.gallery-count, .gallery-storage {
  font-size: 0.75rem; color: var(--text-dim);
  white-space: nowrap;
}
.gallery-storage { margin-left: auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.gallery-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.gallery-thumb {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
  background: var(--surface);
}
.gallery-meta {
  padding: 8px 10px;
}
.gallery-label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.gallery-addr {
  font-size: 0.7rem; color: var(--text-dim);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-date {
  font-size: 0.65rem; color: var(--text-dim);
  margin-top: 4px;
}
.gallery-actions {
  display: flex; gap: 6px; padding: 6px 10px 10px;
}
.gallery-actions button {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.7rem; cursor: pointer;
  border-radius: 6px; padding: 5px 0;
  transition: background 0.15s, color 0.15s;
}
.gallery-actions button:hover {
  background: var(--accent-glow); color: var(--accent);
}
.gallery-actions .btn-delete:hover {
  background: rgba(239,68,68,0.15); color: var(--danger);
}

.gallery-empty {
  text-align: center; padding: 48px 24px;
  color: var(--text-muted);
}
.gallery-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.gallery-empty p { margin: 4px 0; }
.gallery-empty-hint { font-size: 0.8rem; color: var(--text-dim); }

/* Label prompt modal */
.label-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.label-modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  width: 90%; max-width: 380px;
  box-shadow: var(--shadow);
}
.label-modal h3 {
  font-size: 1rem; margin-bottom: 6px; color: var(--text);
}
.label-modal p {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px;
}
.label-modal input {
  width: 100%; background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  color: var(--text); font-size: 0.9rem; outline: none;
  margin-bottom: 14px;
}
.label-modal input:focus { border-color: var(--accent); }
.label-modal .modal-btns {
  display: flex; gap: 8px; justify-content: flex-end;
}
.label-modal .modal-btns button {
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; border: none;
}
.label-modal .btn-save {
  background: var(--accent); color: #fff;
}
.label-modal .btn-skip {
  background: var(--card-2); color: var(--text-muted);
}
