:root {
  --ink: #1b1b2f;
  --bg: #fdfaf6;
  --card: #ffffff;
  --border: #e7e0d6;
  --accent: #ff6f61;
  --accent-dark: #e2523f;
  --good: #2e9e6b;
  --warn: #d98c0f;
  --muted: #6b6f76;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.lang-switcher {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

/* Google injects a top banner iframe on translate — keep our layout stable */
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { font-family: inherit !important; font-size: 12px !important; color: var(--muted) !important; }
.goog-te-gadget .goog-te-combo {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 12px;
}

@keyframes scrambleSettle {
  0% { filter: blur(0); opacity: 1; letter-spacing: normal; }
  35% { filter: blur(2px); opacity: 0.55; letter-spacing: 1.5px; }
  100% { filter: blur(0); opacity: 1; letter-spacing: normal; }
}

.scramble-active {
  animation: scrambleSettle 900ms ease;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 8px 0;
}

.sub {
  color: var(--muted);
  font-size: 15px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}

.item-row input,
.item-row select,
.item-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.item-row .row-actions {
  display: flex;
  justify-content: flex-end;
}

.remove-row {
  background: none;
  border: none;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
}

textarea#paste-area {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}

.coming-soon {
  color: var(--muted);
  font-size: 14px;
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

#camera-preview-wrap img {
  max-width: 100%;
  border-radius: 10px;
  margin: 12px 0;
  display: block;
}

#camera-status {
  margin-top: 8px;
}

.meta-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-row label {
  font-size: 13px;
  font-weight: 600;
}

.meta-row input[type="text"] {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}

.cap-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
  width: 100%;
  margin-top: 12px;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
}

.error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
}

.score-block {
  text-align: center;
  margin-bottom: 20px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#score-number {
  font-size: 36px;
  font-weight: 800;
}

#score-grade {
  font-size: 16px;
  font-weight: 700;
}

.headline {
  font-size: 16px;
  color: var(--ink);
}

.gate {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
}

.gate form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.gate input[type="email"],
.gate input[type="text"] {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.check-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.check-card .icon { font-size: 18px; }

#tips-list {
  padding-left: 20px;
}

#tips-list li { margin-bottom: 8px; }

#review-rows .item-row { background: var(--bg); }
