:root {
  --primary: #1a4b4a;
  --primary-dark: #123635;
  --secondary: #e4d3b7;
  --accent: #f08a38;
  --cork: #c99b62;
  --cork-dark: #a97f49;
  --cork-line: #b88a52;
  --paper: #fdf6e8;
  --ink: #2e2a24;
  --keeper: #4aa86b;
  --keeper-deep: #2f7a4c;
  --tweak: #e0a53b;
  --tweak-deep: #b07d1d;
  --fail: #9aa2a8;
  --fail-deep: #6f787e;
  --glass: rgba(255, 255, 255, 0.28);
  --wood: #8a5a33;
  --wood-dark: #6e4527;
  --wood-light: #a06a3d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Snell Roundhand", cursive, sans-serif;
  color: var(--ink);
  background: var(--cork);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

input,
textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ---------- Corkboard wall ---------- */
.corkboard {
  position: relative;
  min-height: 100%;
  padding: 18px 16px calc(92px + env(safe-area-inset-bottom));
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 18px 12px, rgba(0,0,0,0.12) 2px, transparent 2.5px),
    radial-gradient(circle at 40px 34px, rgba(0,0,0,0.10) 2px, transparent 2.5px),
    radial-gradient(circle at 64px 8px, rgba(0,0,0,0.11) 2px, transparent 2.5px),
    radial-gradient(circle at 12px 60px, rgba(0,0,0,0.09) 2px, transparent 2.5px),
    radial-gradient(circle at 48px 80px, rgba(0,0,0,0.10) 2px, transparent 2.5px),
    radial-gradient(circle at 30px 92px, rgba(0,0,0,0.11) 2px, transparent 2.5px),
    radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.10), transparent 60%);
}

.corkboard::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(120, 80, 40, 0.05) 0 14px,
    transparent 14px 34px
  );
}

.tab-view {
  position: relative;
  z-index: 1;
}

.tab-view.hidden {
  display: none;
}

/* ---------- Pushpins ---------- */
.pushpin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  z-index: 5;
  box-shadow: inset -2px -2px 3px rgba(0,0,0,0.35), 0 3px 4px rgba(0,0,0,0.3);
}
.pushpin.p-red  { background: radial-gradient(circle at 35% 30%, #ff8a80, #e5484d 60%, #b3373c); }
.pushpin.p-blue { background: radial-gradient(circle at 35% 30%, #9fd0ff, #4a7fd0 60%, #33609f); }
.pushpin.p-grn  { background: radial-gradient(circle at 35% 30%, #b4f0b0, #4f9a4f 60%, #3a7a3a); }
.pushpin.p-org  { background: radial-gradient(circle at 35% 30%, #ffd48a, #f08a38 60%, #c46a1f); }
.pushpin.p-yel  { background: radial-gradient(circle at 35% 30%, #fff0a0, #e0b93b 60%, #b69020); }

/* ---------- Dashboard: test-tube rack counters ---------- */
.dashboard {
  margin-bottom: 22px;
}

.rack {
  background: linear-gradient(180deg, var(--wood-light), var(--wood) 55%, var(--wood-dark));
  border-radius: 14px 14px 10px 10px;
  padding: 16px 14px 14px;
  box-shadow: 0 6px 0 var(--wood-dark), 0 10px 18px rgba(0,0,0,0.28);
  position: relative;
}

.rack::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 10px;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}

.rack-counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.counter-label {
  font-size: 14px;
  font-weight: 700;
  color: #f3e6cf;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.tube-large {
  position: relative;
  width: 86px;
  height: 128px;
}

.tube-glass {
  position: absolute;
  inset: 0;
  border-radius: 12px 12px 46px 46px;
  background: linear-gradient(110deg, rgba(255,255,255,0.5), rgba(255,255,255,0.12) 45%, rgba(255,255,255,0.28));
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3), 0 6px 12px rgba(0,0,0,0.3);
  overflow: hidden;
}

.tube-liquid {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 6px;
  border-radius: 0 0 38px 38px;
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: inset 0 -6px 10px rgba(0,0,0,0.22), inset 0 3px 6px rgba(255,255,255,0.35);
}
.tube-liquid.l-blue { background: linear-gradient(180deg, #5a9bd4, #2f6fa8); }
.tube-liquid.l-green { background: linear-gradient(180deg, #5fbc7e, #2f7a4c); }
.tube-liquid.l-amber { background: linear-gradient(180deg, #f0c05a, #b07d1d); }
.tube-liquid.l-grey { background: linear-gradient(180deg, #b9bec3, #6f787e); }

.etch {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  z-index: 1;
}
.etch.e1 { bottom: 34px; }
.etch.e2 { bottom: 62px; }
.etch.e3 { bottom: 92px; }

.tube-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 3px rgba(0,0,0,0.45);
  z-index: 2;
}

.rack-hole {
  position: absolute;
  top: -12px;
  width: 54px;
  height: 18px;
  background: #5a3a1d;
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.4);
}
.rack-hole.h1 { left: 15%; }
.rack-hole.h2 { right: 15%; }

/* ---------- Recent strip ---------- */
.recent-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(46,42,36,0.75);
  margin: 14px 2px 8px;
  letter-spacing: 0.4px;
}

.recent-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
}
.recent-strip::-webkit-scrollbar { display: none; }

.recent-item {
  flex: 0 0 auto;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.mini-pin {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8ecf1, #9aa3ad 60%, #737c86);
  box-shadow: 0 2px 2px rgba(0,0,0,0.3);
  z-index: 3;
  margin-bottom: -3px;
}

.mini-tube {
  position: relative;
  width: 42px;
  height: 62px;
}

.mini-tube .tube-glass {
  border-radius: 8px 8px 26px 26px;
  border-width: 1.5px;
}

.mini-tube .tube-liquid {
  left: 2px;
  right: 2px;
  bottom: 4px;
  border-radius: 0 0 22px 22px;
}

.mini-label {
  font-size: 10px;
  text-align: center;
  background: #f7f2e6;
  padding: 2px 5px;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.2);
  max-width: 74px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  transform: rotate(-1deg);
}

/* ---------- Search index card ---------- */
.search-card {
  margin: 4px 0 16px;
  background: var(--paper);
  border-radius: 6px;
  padding: 10px 12px;
  position: relative;
  box-shadow: 0 3px 6px rgba(0,0,0,0.22);
  transform: rotate(-0.4deg);
}

.search-card .pushpin {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  border-bottom: 2px dashed rgba(46,42,36,0.25);
  padding: 6px 2px 8px;
}
.search-input::placeholder { color: rgba(46,42,36,0.45); }

/* ---------- Experiment list ---------- */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exp-item {
  position: relative;
  background: var(--paper);
  border-radius: 8px;
  padding: 14px 14px 14px 60px;
  box-shadow: 0 3px 0 var(--cork-dark), 0 6px 10px rgba(0,0,0,0.18);
  transform: rotate(-0.3deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.exp-item:nth-child(even) { transform: rotate(0.3deg); }

.exp-item.swiping {
  transition: transform 0.18s ease;
}

.exp-delete-hint {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 74px;
  background: linear-gradient(180deg, #d95c5c, #b53c3c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 0 8px 8px 0;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.2);
  z-index: 0;
}

.exp-item-inner {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-radius: 8px;
  padding: 14px 14px 14px 60px;
  min-height: 76px;
  transform: translateX(0);
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.exp-item-inner.revealed {
  transform: translateX(-74px);
}

.exp-tube {
  position: relative;
  width: 44px;
  height: 66px;
  flex: 0 0 44px;
  margin-left: -46px;
}

.exp-tube .tube-glass {
  border-radius: 8px 8px 26px 26px;
  border-width: 1.5px;
}
.exp-tube .tube-liquid {
  left: 2px; right: 2px; bottom: 4px;
  border-radius: 0 0 22px 22px;
}

.exp-pin {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2f5f8, #a6afb9 60%, #7a838d);
  box-shadow: 0 2px 2px rgba(0,0,0,0.3);
  z-index: 3;
}

.exp-body {
  flex: 1;
  min-width: 0;
}

.exp-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.exp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(46,42,36,0.6);
}

.exp-date {
  white-space: nowrap;
}

.verdict-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  color: #fff;
}
.verdict-chip.keeper { background: var(--keeper-deep); }
.verdict-chip.tweak { background: var(--tweak-deep); }
.verdict-chip.fail { background: var(--fail-deep); }

.exp-note {
  margin-top: 5px;
  font-size: 13px;
  color: rgba(46,42,36,0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exp-chev {
  color: rgba(46,42,36,0.35);
  font-size: 18px;
  flex: 0 0 auto;
}

/* ---------- Verdict lanes ---------- */
.lane {
  background: var(--paper);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 3px 0 var(--cork-dark), 0 6px 10px rgba(0,0,0,0.16);
}

.lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.lane-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.lane-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset -2px -2px 3px rgba(0,0,0,0.3);
}
.lane-dot.keeper { background: var(--keeper); }
.lane-dot.tweak { background: var(--tweak); }
.lane-dot.fail { background: var(--fail); }

.lane-count {
  background: rgba(26,75,74,0.12);
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  border-radius: 20px;
  padding: 2px 10px;
}

.lane-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lane-item {
  background: var(--paper);
  border: 1px dashed rgba(46,42,36,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.lane-item .mini-tube { flex: 0 0 auto; }

.lane-item-body {
  flex: 1;
  min-width: 0;
}
.lane-item-title { font-weight: 700; font-size: 15px; }
.lane-item-date { font-size: 12px; color: rgba(46,42,36,0.6); margin-top: 2px; }

.lane-chev { color: rgba(46,42,36,0.3); }

/* ---------- Empty states ---------- */
.empty {
  text-align: center;
  padding: 34px 20px;
  color: rgba(46,42,36,0.55);
}

.empty .mini-tube {
  margin: 0 auto 12px;
  opacity: 0.7;
  transform: rotate(3deg);
}

.empty p {
  font-size: 15px;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--paper);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: 0 3px 0 var(--cork-dark), 0 6px 10px rgba(0,0,0,0.16);
  transform: rotate(-0.3deg);
}

.form-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.form-sub {
  font-size: 13px;
  color: rgba(46,42,36,0.6);
  margin-bottom: 16px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.field input,
.field textarea {
  width: 100%;
  border: 2px solid rgba(26,75,74,0.25);
  border-radius: 8px;
  background: #fffdf6;
  font-size: 16px;
  color: var(--ink);
  padding: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field-error {
  color: #c0392b;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}
.field.invalid input,
.field.invalid textarea { border-color: #c0392b; }
.field.invalid .field-error { display: block; }

/* Verdict selector */
.verdict-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.verdict-options {
  display: flex;
  gap: 10px;
}

.v-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(26,75,74,0.06);
  transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.v-btn:active { transform: scale(0.96); }

.v-btn .tube {
  width: 40px;
  height: 58px;
  position: relative;
  opacity: 0.75;
  filter: saturate(0.7);
}

.v-btn .tube .tube-glass {
  border-radius: 8px 8px 26px 26px;
  border-width: 1.5px;
  opacity: 0.85;
}
.v-btn .tube .tube-liquid {
  left: 2px; right: 2px; bottom: 4px;
  border-radius: 0 0 22px 22px;
}

.v-btn .v-name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(46,42,36,0.6);
}

.v-btn.selected {
  border-color: var(--primary);
  background: rgba(26,75,74,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.v-btn.selected .tube { opacity: 1; filter: saturate(1.1); }
.v-btn.selected .v-name { color: var(--primary); }

.save-btn {
  width: 100%;
  background: linear-gradient(180deg, #f2a65c, var(--accent));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 0 #c46a1f, 0 6px 12px rgba(0,0,0,0.2);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.save-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c46a1f; }

.delete-btn {
  width: 100%;
  background: linear-gradient(180deg, #d95c5c, #b53c3c);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  box-shadow: 0 3px 0 #7f2727;
  margin-top: 14px;
}
.delete-btn:active { transform: translateY(2px); }

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.form-actions {
  margin-top: 16px;
}

/* ---------- Settings ---------- */
.settings-card {
  background: var(--paper);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: 0 3px 0 var(--cork-dark), 0 6px 10px rgba(0,0,0,0.16);
  margin-bottom: 16px;
}

.settings-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.settings-card p {
  font-size: 14px;
  color: rgba(46,42,36,0.7);
  line-height: 1.5;
}

.theme-swatch {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.theme-swatch span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset -2px -2px 4px rgba(0,0,0,0.3);
}
.sw-primary { background: var(--primary); }
.sw-secondary { background: var(--secondary); }
.sw-accent { background: var(--accent); }

.clear-btn {
  width: 100%;
  background: linear-gradient(180deg, #d95c5c, #b53c3c);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 3px 0 #7f2727;
}
.clear-btn:active { transform: translateY(2px); }

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(46,42,36,0.15);
  font-size: 14px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .k { color: rgba(46,42,36,0.6); }
.stat-row .v { font-weight: 800; color: var(--primary); }

/* ---------- Bottom tab bar rack ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(74px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}

.tabbar-rack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood) 55%, var(--wood-dark));
  border-top: 3px solid var(--wood-dark);
  box-shadow: 0 -3px 10px rgba(0,0,0,0.3);
}

.tabbar-rack::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 4px;
  background: rgba(0,0,0,0.18);
}

.tabbar-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 4px;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  gap: 2px;
  position: relative;
  color: rgba(255,255,255,0.65);
}

.tab .tab-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(243,230,207,0.7);
  transition: color 0.2s;
}

.tab .tab-tube {
  position: relative;
  width: 30px;
  height: 44px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-bottom: 2px;
}

.tab .tab-tube .tube-glass {
  border-radius: 6px 6px 20px 20px;
  border-width: 1.5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 3px 6px rgba(0,0,0,0.3);
}

.tab .tab-tube .tube-liquid {
  left: 2px; right: 2px; bottom: 3px;
  border-radius: 0 0 17px 17px;
  height: 22%;
  opacity: 0.25;
  transition: opacity 0.25s, box-shadow 0.25s;
}

.tab .stopper {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 10px;
  border-radius: 3px 3px 6px 6px;
  opacity: 0.55;
  box-shadow: inset -1px -1px 2px rgba(0,0,0,0.4);
  transition: transform 0.25s, opacity 0.25s;
}
.tab .stopper.s-green { background: #4a8f5c; }
.tab .stopper.s-blue { background: #4a7fd0; }
.tab .stopper.s-orange { background: #f08a38; }
.tab .stopper.s-red { background: #b54848; }

.tab.active .tab-label { color: #ffe9c9; }
.tab.active .tab-tube { transform: translateY(-12px); }
.tab.active .stopper { transform: translateX(-50%) translateY(-4px) rotate(-8deg); opacity: 1; }

/* Glow */
.tab .tab-glow {
  position: absolute;
  left: -2px;
  right: -2px;
  top: -6px;
  height: 40px;
  border-radius: 8px 8px 18px 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  filter: blur(6px);
}
.tab.active .tab-glow { opacity: 0.55; }
.tab-glow.g-green { background: var(--keeper); }
.tab-glow.g-blue { background: #5a9bd4; }
.tab-glow.g-orange { background: var(--accent); }
.tab-glow.g-red { background: #d95c5c; }

.tab.active .tube-liquid { opacity: 1; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.2), 0 0 10px rgba(255,255,255,0.3); }

/* ---------- Confirmation modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--paper);
  border-radius: 12px;
  padding: 22px 18px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  text-align: center;
}

.modal h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
}

.modal p {
  font-size: 14px;
  color: rgba(46,42,36,0.75);
  margin-bottom: 18px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
}
.modal-btn.cancel { background: rgba(26,75,74,0.12); color: var(--primary); }
.modal-btn.confirm { background: linear-gradient(180deg, #d95c5c, #b53c3c); color: #fff; box-shadow: 0 3px 0 #7f2727; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 11px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 120;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.page-header {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin: 4px 2px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-header .pin-tube {
  width: 26px;
  height: 40px;
  position: relative;
}