@import url("https://fonts.googleapis.com/css2?family=Anton&family=IBM+Plex+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600;700&display=swap");

:root {
  --bg: #e5decb;
  --surface: #fbf7ed;
  --surface-2: #efe7d2;
  --navy: #1e3a4a;
  --navy-2: #28495d;
  --ink: #211d17;
  --ink-soft: #6e6455;
  --amber: #dd6b12;
  --amber-deep: #a94e0a;
  --amber-ink: #fcf8ee;
  --green: #3e6b4f;
  --green-bg: #dee9dc;
  --brick: #a6341c;
  --brick-bg: #f2ded4;
  --line: #d2c6a8;
  --radius: 5px;
  --shadow: 3px 4px 0 rgba(33, 25, 15, 0.07), 0 2px 10px rgba(33, 25, 15, 0.1);
  --tap: 56px;
}

html[data-theme="dark"] {
  --bg: #15191c;
  --surface: #1e2428;
  --surface-2: #262d32;
  --navy: #0d1418;
  --navy-2: #17222a;
  --ink: #ece6d6;
  --ink-soft: #98a0a6;
  --amber: #ff8b3d;
  --amber-deep: #ffb067;
  --amber-ink: #1b1208;
  --green: #7bb08f;
  --green-bg: #1e3327;
  --brick: #e38264;
  --brick-bg: #3a241d;
  --line: #333b41;
  --shadow: 3px 4px 0 rgba(0, 0, 0, 0.3), 0 2px 12px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  background-image:
    linear-gradient(rgba(33, 25, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 25, 17, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 96px;
  font-size: 16px;
}
html[data-theme="dark"] body {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
}
h1,
h2,
h3,
.display {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: var(--navy);
  margin: 0;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: #fff;
}
.mono {
  font-family: "IBM Plex Mono", monospace;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font-family: "IBM Plex Sans", sans-serif;
}
svg {
  display: block;
}
.icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.topbar {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #eaedf1;
  padding: 20px 18px 26px;
  position: relative;
  overflow: hidden;
}
.topbar::before {
  content: "";
  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: 18px 18px;
  pointer-events: none;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 15px;
  background-image: radial-gradient(
    circle at 11px 1px,
    var(--bg) 6px,
    transparent 6.4px
  );
  background-size: 22px 15px;
  background-position: 5px 0;
  background-repeat: repeat-x;
}
html[data-theme="dark"] .topbar::after {
  background-image: radial-gradient(
    circle at 11px 1px,
    var(--bg) 6px,
    transparent 6.4px
  );
}
.topbar h1 {
  color: #fff;
  font-size: 27px;
  position: relative;
}
.topbar .sub {
  color: #aec0cc;
  font-size: 13px;
  margin-top: 6px;
  position: relative;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
}

.view {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-weight: 700;
  margin: 26px 0 12px;
  font-family: "IBM Plex Mono", monospace;
}
.section-title::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--line);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.stat-card {
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 16px 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-card .num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--amber);
}
.stat-card .lbl {
  font-size: 12.5px;
  color: #c4ccd6;
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.value-banner {
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 20px 18px;
  color: #fff;
  margin-top: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.value-banner .lbl {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
}
.value-banner .num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 32px;
  margin-top: 6px;
}
.value-banner .num-sub {
  font-size: 12.5px;
  color: #b9c2ce;
  margin-top: 6px;
  font-weight: 600;
}

.search-bar {
  margin-top: 2px;
  margin-bottom: 10px;
}
.search-bar input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 15.5px;
  background: var(--surface);
  color: var(--ink);
  min-height: 48px;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--amber-deep);
}
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.filter-tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.filter-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
html[data-theme="dark"] .filter-tab.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.sort-select {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  color: var(--ink-soft);
  margin-bottom: 16px;
  min-height: 44px;
  font-weight: 600;
}

.client-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-height: var(--tap);
  gap: 10px;
  position: relative;
}
.client-row:active {
  transform: scale(0.99);
}
.client-row.overdue,
.client-row.today {
  border-left: 5px solid transparent;
}
.client-row.overdue::before,
.client-row.today::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 6px;
  border-radius: var(--radius) 0 0 var(--radius);
}
.client-row.overdue::before {
  background-image: repeating-linear-gradient(
    135deg,
    var(--brick) 0 4px,
    #1a1714 4px 8px
  );
}
.client-row.today::before {
  background-image: repeating-linear-gradient(
    135deg,
    var(--amber-deep) 0 4px,
    #1a1714 4px 8px
  );
}
.client-row .name {
  font-weight: 700;
  font-size: 16.5px;
}
.client-row .meta {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.client-row .value {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  white-space: nowrap;
}
html[data-theme="dark"] .client-row .value {
  color: var(--amber-deep);
}
.client-row .rowside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.call-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
}
html[data-theme="dark"] .call-icon-btn {
  color: var(--amber-deep);
}
.call-icon-btn .icon {
  width: 18px;
  height: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  margin-top: 8px;
  border: 1.5px solid currentColor;
  transform: rotate(-1.4deg);
}
.badge.st-0 {
  background: #e7e4da;
  color: #565a4e;
}
.badge.st-1 {
  background: #dde7f0;
  color: #33526e;
}
.badge.st-2 {
  background: #f3e9d2;
  color: #7a5a10;
}
.badge.st-3 {
  background: #fbeacb;
  color: var(--amber-deep);
}
.badge.st-4 {
  background: #fbeacb;
  color: var(--amber-deep);
}
.badge.won {
  background: var(--green-bg);
  color: var(--green);
  transform: rotate(1.2deg);
}
.badge.lost {
  background: var(--brick-bg);
  color: var(--brick);
  transform: rotate(-2deg);
}
html[data-theme="dark"] .badge.st-0 {
  background: #2a2f35;
  color: #b9c0c8;
}
html[data-theme="dark"] .badge.st-1 {
  background: #22303f;
  color: #9fc2e0;
}
html[data-theme="dark"] .badge.st-2 {
  background: #3a3320;
  color: #e4c878;
}
html[data-theme="dark"] .badge.st-3 {
  background: #3a3320;
  color: #f2c778;
}
html[data-theme="dark"] .badge.st-4 {
  background: #3a3320;
  color: #f2c778;
}

.stagelist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.stage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface-2);
}
.stage-row .dot {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.stage-row .lbl {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.stage-row.done {
  border-color: var(--amber);
  background: var(--surface);
}
.stage-row.done .dot {
  background: var(--amber);
  border-color: var(--amber);
}
.stage-row.done .lbl {
  color: var(--ink);
}
.stage-row.active {
  border-color: var(--amber-deep);
  background: var(--surface);
  border-width: 3px;
}
.stage-row.active .dot {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
}
.stage-row.active .lbl {
  color: var(--ink);
  font-weight: 800;
}
.stage-row.locked {
  opacity: 0.55;
}
.outcome-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.outcome-btn {
  flex: 1;
  min-height: var(--tap);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.outcome-btn.won.active {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}
.outcome-btn.lost.active {
  background: var(--brick-bg);
  border-color: var(--brick);
  color: var(--brick);
}
.outcome-btn:disabled {
  opacity: 0.45;
}

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "IBM Plex Mono", monospace;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  background: var(--surface-2);
  color: var(--ink);
  min-height: var(--tap);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber-deep);
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: none;
  font-weight: 700;
  font-size: 15px;
  min-height: var(--tap);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-primary {
  background: var(--amber);
  color: var(--amber-ink);
  width: 100%;
  box-shadow: 0 3px 0 var(--amber-deep);
}
.btn-primary:active {
  background: var(--amber-deep);
  box-shadow: 0 1px 0 var(--amber-deep);
  transform: translateY(2px);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
}
.btn-danger-outline {
  background: var(--surface);
  color: var(--brick);
  border: 2px solid var(--brick);
  width: 100%;
}
.btn-full {
  width: 100%;
}
.fab {
  position: fixed;
  right: 18px;
  bottom: 104px;
  width: 64px;
  height: 64px;
  background: var(--amber);
  color: var(--amber-ink);
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0% 50%);
}

.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: var(--navy);
  display: flex;
  z-index: 40;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  border-top: 3px solid var(--amber-deep);
}
.navbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #8b96a4;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}
.navbtn.active {
  color: var(--amber);
}
.navbtn .icon {
  width: 26px;
  height: 26px;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}
.empty .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  color: var(--ink-soft);
}
.empty .lbl {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.empty .sub2 {
  font-size: 14px;
  margin-top: 6px;
  color: var(--ink-soft);
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  position: relative;
}
.back-btn {
  background: none;
  border: none;
  color: var(--amber);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.back-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.detail-title h2 {
  font-size: 21px;
  color: #fff;
}
.detail-title .sub {
  color: #b9c2ce;
  font-size: 13.5px;
  font-family: "IBM Plex Mono", monospace;
}

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 16px;
  margin-left: 8px;
}
.tl-item {
  position: relative;
  padding-bottom: 16px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}
.tl-item .date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--ink-soft);
}
.tl-item .txt {
  font-size: 14.5px;
  margin-top: 3px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 12px 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-height: var(--tap);
  position: relative;
}
.task-item.overdue,
.task-item.today {
  border-left: 5px solid transparent;
}
.task-item.overdue::before,
.task-item.today::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 6px;
  border-radius: var(--radius) 0 0 var(--radius);
}
.task-item.overdue::before {
  background-image: repeating-linear-gradient(
    135deg,
    var(--brick) 0 4px,
    #1a1714 4px 8px
  );
}
.task-item.today::before {
  background-image: repeating-linear-gradient(
    135deg,
    var(--amber-deep) 0 4px,
    #1a1714 4px 8px
  );
}
.chk {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.chk .icon {
  width: 18px;
  height: 18px;
  color: #fff;
}
.chk.done {
  background: var(--green);
  border-color: var(--green);
}
.task-txt {
  flex: 1;
  min-width: 0;
}
.task-txt .t {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.task-txt .t .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
}
.task-txt .d {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
  font-family: "IBM Plex Mono", monospace;
}
.task-txt.done .t {
  text-decoration: line-through;
  color: var(--ink-soft);
}
.task-edit-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-edit-btn .icon {
  width: 17px;
  height: 17px;
}
.task-edit-btn:active {
  background: var(--surface-2);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 6px;
  border-bottom: 1px dashed var(--line);
  min-height: var(--tap);
  flex-wrap: wrap;
}
.checklist-item:last-child {
  border-bottom: none;
}
.checklist-item input[type="checkbox"] {
  width: 26px;
  height: 26px;
  accent-color: var(--amber-deep);
  flex-shrink: 0;
}
.checklist-item label {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 120px;
}
.checklist-item .when {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.ns-date {
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 14.5px;
  background: var(--surface-2);
  color: var(--ink);
  min-height: 44px;
}
.ns-date:disabled {
  opacity: 0.4;
  background: var(--surface-2);
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.6);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal {
  background: var(--bg);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 14px 14px 0 0;
  padding: 16px 18px 30px;
  border-top: 1px solid var(--line);
}
.modal-handle {
  width: 100%;
  height: 14px;
  background-image: radial-gradient(
    circle at center,
    var(--line) 2.4px,
    transparent 3px
  );
  background-size: 16px 14px;
  background-position: center;
  margin: 0 auto 16px;
}
.modal h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.modal .modal-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.modal .step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-deep);
  background: var(--surface-2);
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: 8px;
  font-family: "IBM Plex Mono", monospace;
  border: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  max-width: 88vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
}

.theme-row {
  display: flex;
  gap: 10px;
}
.theme-btn {
  flex: 1;
  min-height: var(--tap);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.theme-btn .icon {
  width: 22px;
  height: 22px;
}
.theme-btn.active {
  border-color: var(--amber-deep);
  background: var(--surface-2);
  color: var(--amber-deep);
}

.photo-preview {
  width: 100%;
  border-radius: 6px;
  display: block;
  margin-top: 12px;
  border: 1px solid var(--line);
}

.tour-panel {
  position: fixed;
  background: rgba(10, 15, 22, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 300;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.tour-ring {
  position: fixed;
  z-index: 301;
  border-radius: 16px;
  pointer-events: none;
  box-shadow:
    0 0 0 3px var(--amber),
    0 0 0 8px rgba(242, 169, 59, 0.25);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.tour-ring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  border: 2px solid var(--amber);
  animation: tourPulse 1.6s ease-out infinite;
}
@keyframes tourPulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}
.tour-hit {
  position: fixed;
  z-index: 302;
  cursor: pointer;
  border-radius: 16px;
}
.tour-tap-hint {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  animation: tourBounce 1.2s ease-in-out infinite;
}
@keyframes tourBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.tour-card {
  position: fixed;
  z-index: 303;
  max-width: 300px;
  background: var(--navy-2);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(242, 169, 59, 0.2);
  animation: tourCardIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes tourCardIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.tour-card .tour-eyebrow {
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 5px;
  font-family: "IBM Plex Mono", monospace;
}
.tour-card h4 {
  color: #fff;
  font-size: 16px;
  margin: 0 0 6px;
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.tour-card p {
  color: #c4ccd6;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}
.tour-card p b {
  color: #fff;
}
.tour-card .tour-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 11px;
  letter-spacing: 0.01em;
}
.tour-card .tour-cta .icon {
  width: 15px;
  height: 15px;
}
.tour-card-arrow {
  position: fixed;
  z-index: 303;
  width: 14px;
  height: 14px;
  background: var(--navy-2);
  border-right: 1px solid rgba(242, 169, 59, 0.2);
  border-bottom: 1px solid rgba(242, 169, 59, 0.2);
  transform: rotate(45deg);
}
.tour-card.tour-card-top {
  top: calc(52px + env(safe-area-inset-top));
  width: calc(100% - 32px);
  max-width: 340px;
}
.tour-dots {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(16px + env(safe-area-inset-top));
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 303;
  pointer-events: none;
}
.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.tour-dot.active {
  background: var(--amber);
  width: 18px;
  border-radius: 4px;
}
.tour-dot.done {
  background: rgba(242, 169, 59, 0.55);
}
.tour-skip {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 16px;
  z-index: 303;
  background: rgba(15, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c4ccd6;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
}
.tour-welcome {
  position: fixed;
  inset: 0;
  z-index: 303;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 22, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tour-welcome-card {
  max-width: 340px;
  width: calc(100% - 48px);
  background: var(--navy-2);
  color: #fff;
  border-radius: 18px;
  padding: 30px 26px;
  text-align: center;
  border: 1px solid rgba(242, 169, 59, 0.2);
  animation: tourCardIn 0.3s ease;
}
.tour-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--navy);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 169, 59, 0.25);
}
.tour-welcome-icon .icon {
  width: 32px;
  height: 32px;
  color: var(--amber);
}
.tour-welcome-card h1 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 10px;
}
.tour-welcome-card p {
  color: #c4ccd6;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
}

@media (min-width: 641px) {
  .view {
    padding: 22px;
  }
}

/* ─── Login Screen ─────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 32px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: var(--shadow);
}
.login-logo {
  font-size: 48px;
  color: var(--amber);
  margin-bottom: 8px;
}
.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 4px 0;
}
.login-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 24px 0;
}
.login-code-wrap {
  margin-bottom: 16px;
}
.login-code-input {
  width: 100%;
  max-width: 220px;
  padding: 14px 16px;
  font-size: 28px;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  text-align: center;
  letter-spacing: 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.login-code-input:focus {
  border-color: var(--amber);
}
.login-error {
  color: var(--brick);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 20px;
}
