/* ========== Micro Tools — Shared Styles (v2 — polished) ========== */
:root {
  /* Brand colors */
  --navy: #1e3a5f;
  --navy-light: #2a5082;
  --navy-dark: #122540;
  --accent: #0d9488;
  --accent-hover: #0b7e73;
  --accent-light: #ccfbf1;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --red-light: #fee2e2;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* Radii */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Fluid type */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --text-xl: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --text-2xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.7rem, 1.3rem + 2vw, 2.5rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img, svg { max-width: 100%; height: auto; }

/* ========== Header ========== */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}
.site-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--gray-200); text-decoration: none; }
.site-logo svg { width: 26px; height: 26px; flex-shrink: 0; }
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--gray-300);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  padding: 6px 12px;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* ========== Container ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: var(--white);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  position: relative;
}
.hero p {
  font-size: var(--text-lg);
  color: var(--gray-300);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ========== Tools Grid (index page) ========== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: -40px auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.tool-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
  color: inherit;
}
.tool-card:active { transform: translateY(-2px); }
.tool-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card h2 {
  font-size: var(--text-xl);
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 700;
}
.tool-card p {
  font-size: var(--text-sm);
  color: var(--gray-500);
  flex: 1;
  line-height: 1.6;
}
.tool-card .price {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badge-free {
  background: var(--green-light);
  color: var(--green);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.badge-premium {
  background: var(--orange-light);
  color: var(--orange);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  text-align: center;
  box-shadow: 0 2px 8px rgba(13,148,136,0.3);
  transition: all 0.2s;
  min-height: 48px;
}
.cta-btn:hover {
  box-shadow: 0 4px 12px rgba(13,148,136,0.4);
}

/* ========== Form Sections ========== */
.form-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}
.form-section h2 {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
  font-weight: 700;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.form-row.full { grid-template-columns: 1fr; }
.form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 48px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}
input::placeholder, textarea::placeholder {
  color: var(--gray-400);
}

/* ========== Buttons ========== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:active { transform: scale(0.98); }
.btn-add {
  background: var(--green-light);
  color: var(--green);
}
.btn-add:hover { background: #a7f3d0; }
.btn-remove {
  background: var(--red-light);
  color: var(--red);
  padding: 8px 12px;
  font-size: var(--text-xs);
  min-height: 36px;
}
.btn-remove:hover { background: #fecaca; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  padding: 14px 32px;
  font-size: var(--text-base);
  box-shadow: 0 2px 8px rgba(13,148,136,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #0a6d64);
  box-shadow: 0 4px 12px rgba(13,148,136,0.4);
}
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-200); }

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.premium-note {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 8px;
}

/* ========== Items Table (Invoice) ========== */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.items-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--gray-50);
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 600;
  border-bottom: 2px solid var(--gray-200);
}
.items-table td {
  padding: 8px 4px;
}
.items-table input {
  padding: 10px 12px;
  font-size: var(--text-sm);
}

/* ========== Social Proof ========== */
.social-proof-bar {
  background: linear-gradient(135deg, var(--green-light), #ecfdf5);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-proof-bar .count {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--green);
}
.social-proof-bar .label {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.4;
}
.social-proof-bar .badge {
  background: var(--green);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
}

/* ========== Urgency Banner ========== */
.urgency-banner {
  background: linear-gradient(135deg, var(--orange-light), #fed7aa);
  border: 1.5px solid #fbbf24;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.urgency-banner .title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}
.urgency-banner .timer {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #92400e;
  font-variant-numeric: tabular-nums;
}

/* ========== Premium Upgrade ========== */
.premium-upgrade {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}
.premium-upgrade::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(13,148,136,0.1), transparent 60%);
  pointer-events: none;
}
.premium-upgrade h3 {
  color: var(--white);
  font-size: var(--text-xl);
  margin-bottom: 8px;
  position: relative;
}
.premium-upgrade p {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  margin-bottom: 20px;
  position: relative;
}
.premium-upgrade .price-big {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--accent-light);
  margin-bottom: 4px;
  position: relative;
}
.premium-upgrade .price-note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  position: relative;
}
.btn-premium-big {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  padding: 16px 40px;
  font-size: var(--text-lg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(13,148,136,0.4);
  transition: all 0.3s ease;
  position: relative;
  min-height: 56px;
}
.btn-premium-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13,148,136,0.5);
  color: var(--white);
  text-decoration: none;
}
.btn-premium {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  padding: 12px 32px;
  font-size: var(--text-base);
  text-decoration: none;
  display: inline-block;
  border-radius: var(--radius);
  font-weight: 600;
  min-height: 48px;
  line-height: 24px;
}
.btn-premium:hover {
  opacity: 0.9;
  color: var(--white);
  text-decoration: none;
}

/* ========== Trust Badges ========== */
.trust-badges {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  padding: 8px 14px;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}
.trust-badge svg {
  width: 16px;
  height: 16px;
  fill: #34d399;
  flex-shrink: 0;
}

/* ========== Document Preview Wrapper ========== */
.preview-frame {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(0,0,0,0.02);
  overflow: hidden;
  position: relative;
}
.preview-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  z-index: 2;
}

/* ========== Invoice Preview ========== */
.invoice {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
  background: var(--white);
  font-size: 14px;
  position: relative;
}
.invoice .watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 80px;
  color: rgba(148,163,184,0.12);
  font-weight: 900;
  pointer-events: none;
  z-index: 10;
  letter-spacing: 12px;
  text-transform: uppercase;
  user-select: none;
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  align-items: flex-start;
}
.invoice-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 4px;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 8px;
}
.invoice-meta {
  text-align: right;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.8;
}
.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.party h3 {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 600;
}
.party .name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--gray-800);
}
.party .detail {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
}
.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.inv-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}
.inv-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
}
.inv-table tr:nth-child(even) { background: var(--gray-50); }
.inv-totals {
  text-align: right;
  margin-top: 16px;
}
.inv-totals .row {
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  padding: 6px 0;
  font-size: 14px;
}
.inv-totals .total {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--navy);
  padding-top: 10px;
  margin-top: 8px;
}
.inv-notes {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
}

/* ========== Resume Preview ========== */
.resume {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: var(--white);
  font-size: 13px;
  position: relative;
}
.resume .watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 80px;
  color: rgba(148,163,184,0.12);
  font-weight: 900;
  pointer-events: none;
  z-index: 10;
  letter-spacing: 12px;
  user-select: none;
}
.resume-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 4px;
  border-bottom: 3px double var(--gray-700);
  padding-bottom: 12px;
  color: var(--gray-900);
}
.resume-date {
  text-align: right;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.resume-photo-row {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}
.resume-basic { flex: 1; }
.resume-photo {
  width: 120px;
  height: 160px;
  border: 1.5px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 11px;
  background: var(--gray-50);
  border-radius: 4px;
  text-align: center;
  flex-shrink: 0;
}
.r-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.r-table th, .r-table td {
  border: 1px solid var(--gray-400);
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
}
.r-table th {
  background: var(--gray-100);
  font-weight: 600;
  width: 120px;
  white-space: nowrap;
  color: var(--gray-700);
}
.r-section {
  font-size: 14px;
  font-weight: 700;
  background: var(--gray-100);
  padding: 6px 10px;
  border: 1px solid var(--gray-400);
  margin-bottom: 0;
  color: var(--gray-800);
}

/* ========== Business Card Preview ========== */
.card-preview-area {
  text-align: center;
  margin: 32px 0;
}
.card-preview-area h3 {
  margin-bottom: 16px;
  color: var(--gray-600);
  font-size: var(--text-base);
}
.card-wrapper {
  display: inline-block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.card-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 28px;
  color: rgba(148,163,184,0.18);
  font-weight: 900;
  pointer-events: none;
  letter-spacing: 4px;
  user-select: none;
}

/* ========== Template Selector ========== */
.templates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.tpl {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}
.tpl.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}
.tpl:hover { border-color: var(--accent); }
.tpl-preview {
  width: 100%;
  aspect-ratio: 91/55;
  border-radius: var(--radius);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: #fff;
  font-weight: 600;
}
.tpl-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
}

/* ========== Edu/Work/Cert entries ========== */
.edu-entry, .work-entry, .cert-entry {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  position: relative;
  border: 1px solid var(--gray-200);
}
.edu-entry .btn-remove,
.work-entry .btn-remove,
.cert-entry .btn-remove {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ========== Ad Space ========== */
.ad-space {
  text-align: center;
  margin: 24px 0;
}
.ad-space ins {
  display: block;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--navy-dark);
  color: var(--gray-400);
  padding: 40px 0 32px;
  font-size: var(--text-sm);
  margin-top: 48px;
}
.site-footer .container {
  text-align: center;
}
.site-footer p {
  color: var(--gray-500);
  font-size: var(--text-xs);
}
.site-footer a {
  color: var(--gray-400);
}
.site-footer a:hover { color: var(--white); }

/* Legacy footer compat */
footer {
  background: var(--navy-dark);
  color: var(--gray-400);
  padding: 40px 24px 32px;
  font-size: var(--text-sm);
  text-align: center;
  margin-top: 48px;
}
footer p { color: var(--gray-500); font-size: var(--text-xs); }
footer a { color: var(--gray-400); }
footer a:hover { color: var(--white); }

/* ========== Responsive: 1024px ========== */
@media (max-width: 1024px) {
  .tools-grid {
    gap: 24px;
    margin: -32px auto 48px;
  }
}

/* ========== Responsive: 768px ========== */
@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: var(--text-2xl); }
  .tools-grid {
    grid-template-columns: 1fr;
    margin: -24px 20px 40px;
    padding: 0;
  }
  .form-row { grid-template-columns: 1fr; }
  .form-row.col3 { grid-template-columns: 1fr; }
  .form-section { padding: 20px; }
  .site-nav { display: none; }
  .container { padding: 0 20px; }
  .invoice-parties { grid-template-columns: 1fr; gap: 20px; }
  .invoice { padding: 32px 20px; }
  .resume { padding: 32px 20px; }
  .resume-photo-row { flex-direction: column; }
  .resume-photo { width: 100px; height: 133px; align-self: flex-end; }
  .templates { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .premium-upgrade { padding: 32px 20px; }
  .trust-badges { gap: 8px; }
}

/* ========== Responsive: 480px ========== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 16px 28px; }
  .tools-grid { margin: -20px 16px 32px; padding: 0; }
  .form-section { padding: 16px; }
  .invoice-header { flex-direction: column; gap: 16px; }
  .invoice-meta { text-align: left; }
  .invoice { padding: 24px 16px; font-size: 12px; }
  .resume { padding: 24px 16px; }
  .templates { grid-template-columns: 1fr; }
  .tpl { padding: 12px; }
  .premium-upgrade { padding: 24px 16px; }
  .btn-premium-big { padding: 14px 28px; font-size: var(--text-base); }
  .social-proof-bar { padding: 12px 16px; }
  .urgency-banner { padding: 12px 16px; }
}

/* ========== Responsive: 320px ========== */
@media (max-width: 320px) {
  .container { padding: 0 12px; }
  .tools-grid { margin: -16px 12px 24px; }
  .tool-card { padding: 20px 16px; }
  .form-section { padding: 12px; }
  .hero { padding: 28px 12px 24px; }
  .site-header .container { padding: 12px; }
  .btn-primary { padding: 12px 20px; }
}

/* ========== Print ========== */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, footer,
  .form-section, .actions, .ad-space, .social-proof-bar,
  .urgency-banner, .premium-note, .premium-upgrade,
  .btn, .no-print, .trust-badges, .card-watermark {
    display: none !important;
  }
  #invoice-preview { display: block !important; }
  #resume-preview { display: block !important; }
  .invoice, .resume { padding: 24px; box-shadow: none; border: none; }
  .invoice .watermark, .resume .watermark { display: none; }
  .card-preview-area { margin: 0; }
  canvas { box-shadow: none; }
}
