:root {
  --paper: #f6f1e7;
  --card: #fffdf8;
  --ink: #1e1b16;
  --muted: #7c7165;
  --line: #e3d9cb;
  --accent: #d9542b;
  --accent-soft: #f6ded4;
  --green: #2e6b5e;
  --green-soft: #dde9e4;
  --display: "Songti SC", "Noto Serif SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e7dfd2;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
}

@media (min-width: 600px) {
  body {
    padding: 24px 0;
    align-items: flex-start;
  }
  .phone {
    min-height: calc(100vh - 48px);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(30, 27, 22, 0.18);
  }
}

.statusbar {
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid rgba(227, 217, 203, 0.6);
}

.status-title {
  letter-spacing: 2px;
  font-size: 10px;
}

main {
  padding: 28px 20px 64px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.h1 {
  font-size: 40px;
  line-height: 1.12;
}

.h2 {
  font-size: 26px;
  line-height: 1.25;
}

.h3 {
  font-size: 18px;
  line-height: 1.35;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 11px;
  color: var(--muted);
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.row {
  display: flex;
  align-items: center;
}

.between {
  justify-content: space-between;
}

.grow {
  flex: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background: var(--ink);
  color: var(--card);
}

.btn-accent {
  background: var(--accent);
  color: var(--card);
}

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

.btn-soft {
  background: var(--accent-soft);
  color: var(--ink);
}

.btn-sm {
  height: 38px;
  width: auto;
  padding: 0 16px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  margin-right: 6px;
  margin-bottom: 6px;
}

.mode-card {
  display: flex;
  align-items: center;
  padding: 14px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.mode-card.active {
  border-color: var(--ink);
  background: #fbf4e9;
}

.mode-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 12px;
  margin-right: 12px;
}

.mode-card.active .mode-mark {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.mode-check {
  color: var(--accent);
  font-weight: 700;
  width: 20px;
  text-align: right;
}

.code-input {
  flex: 1;
  height: 42px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 4px;
  outline: none;
}

.option {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.option.active {
  border-color: var(--ink);
  background: #fbf4e9;
}

.option-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line);
  margin-right: 10px;
  flex-shrink: 0;
}

.option.active .option-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--card);
}

.option-label {
  flex: 1;
  font-size: 14px;
}

.option-num {
  font-size: 11px;
  color: var(--muted);
}

.progress-track {
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.bar-row {
  margin-bottom: 12px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.bar-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bar-fill-accent {
  background: var(--accent);
}

.code-card {
  padding: 24px 18px;
  background: var(--ink);
  border-radius: 18px;
  text-align: center;
  color: var(--card);
}

.code-hint {
  font-size: 11px;
  letter-spacing: 3px;
  color: #b9ae9f;
}

.code-display {
  margin-top: 8px;
  font-size: 36px;
  letter-spacing: 10px;
  font-family: var(--display);
}

.pair-hero {
  text-align: center;
}

.pair-name {
  font-size: 38px;
  line-height: 1.1;
}

.pair-codes {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pair-person {
  width: 110px;
}

.pair-code {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--card);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 3px;
}

.pair-x {
  padding: 8px 12px 0;
  color: var(--muted);
}

.list-row {
  display: flex;
  align-items: flex-start;
  padding: 5px 0;
}

.list-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 8px;
  margin-right: 9px;
  flex-shrink: 0;
  background: var(--accent);
}

.green-dot {
  background: var(--green);
}

.accent-dot {
  background: var(--accent);
}

.list-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
}

.tip-row {
  display: flex;
  align-items: flex-start;
  padding: 6px 0;
}

.tip-num {
  width: 26px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 14px;
  flex-shrink: 0;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.pair-card {
  width: 48%;
  min-height: 110px;
  padding: 14px 12px;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.pair-card-name {
  font-size: 17px;
  line-height: 1.3;
}

.pair-card-codes {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
}

.pair-card.locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: rgba(255, 253, 248, 0.35);
  cursor: default;
}

.lock-mark {
  font-family: var(--display);
  font-size: 24px;
  color: var(--line);
}

.record-card {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.record-code {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
}

.stats {
  display: flex;
}

.stat {
  flex: 1;
  padding: 14px;
  margin-right: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stat:last-child {
  margin-right: 0;
}

.stat-num {
  font-size: 28px;
  line-height: 1.1;
}

.footer-note {
  margin-top: 32px;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.link-center {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.fade-up {
  animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lock-card {
  background: linear-gradient(180deg, #fffdf8 0%, #fbf5ea 100%);
  border: 1px solid var(--line);
}

.lock-top {
  text-align: center;
}

.lock-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 84, 43, 0.1);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 1px;
}

.lock-title {
  font-size: 20px;
  margin-top: 8px;
}

.lock-preview {
  margin: 18px 0 6px;
}

.lock-line {
  height: 9px;
  border-radius: 999px;
  margin: 7px 0;
  background: linear-gradient(90deg, #ede4d6 0%, #f6f1e7 100%);
}

.lock-points {
  margin-top: 8px;
}

.lock-point {
  display: flex;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0;
}

.lock-point .list-dot {
  margin-top: 5px;
}

.lock-dot-neutral {
  background: #d8cdbd;
}
