:root {
  --ink: #261f28;
  --muted: #6f6670;
  --paper: #fbf7f1;
  --card: #ffffff;
  --plum: #5f315d;
  --plum-dark: #3a203d;
  --line: #e8ded7;
  --danger: #a83a4c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: #eee8e2;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
.phone {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 26px 22px 32px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wordmark { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; }
.sub { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.screen { display: flex; flex-direction: column; gap: 14px; }
h1:focus { outline: none; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; line-height: 1.15; font-weight: 400; }
.lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.step { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plum); }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 14px; font-weight: 600; }
input, select {
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid #9b5b94; outline-offset: 2px; }
.btn {
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  padding: 0 16px;
}
.btn.primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn.primary:hover { background: var(--plum-dark); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.link { background: none; border: 0; color: var(--plum); min-height: 44px; font-weight: 600; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  min-height: 52px;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  cursor: pointer;
}
.option[aria-pressed="true"] { border: 2px solid var(--plum); background: #f7eef6; }
.error { margin: 0; color: var(--danger); font-size: 14px; }
.steps { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.6; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.file-button { display: flex; align-items: center; justify-content: center; }
.selfie { width: 100%; border-radius: 20px; object-fit: cover; max-height: 360px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
input[type="file"] { padding: 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--plum); transition: width 0.2s; }
.row { display: flex; justify-content: space-between; }
textarea {
  font: inherit; min-height: 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--ink); width: 100%; resize: vertical;
}
textarea:focus-visible { outline: 3px solid #9b5b94; outline-offset: 2px; }
.count { margin: 0; font-size: 13px; color: var(--muted); text-align: right; }
.label { margin: 0; font-size: 14px; font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { display: flex; flex-direction: column; gap: 6px; }
.slot button {
  aspect-ratio: 3 / 4; width: 100%; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px dashed #c9b8c6; border-radius: 16px; background: var(--card); color: var(--plum); font-weight: 700;
}
.slot button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.rejected button { border: 2px solid var(--danger); }
.slot.rejected img { opacity: 0.45; }
.note { margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.slot.rejected .note { color: var(--danger); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab { min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 700; color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.case h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pair img, .case > img, .case video { width: 100%; border-radius: 14px; object-fit: cover; background: var(--line); }
.pair img { aspect-ratio: 3 / 4; }
.pair figcaption { font-size: 13px; color: var(--muted); }
.checks { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.6; }
.ok { color: #2f6b45; }
.bad { color: var(--danger); font-weight: 700; }
.late { color: var(--danger); font-weight: 700; }
.chips { display: flex; flex-direction: column; gap: 8px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.empty-photo { aspect-ratio: 3 / 4; border-radius: 14px; background: var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.box { background: #f7eef6; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.4; }
.box strong { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plum); }
.box .them { color: var(--muted); }
.quote { margin: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.4; }
.quote span { display: block; font-family: inherit; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "⌄"; color: var(--plum); font-size: 20px; }
details[open] summary::after { content: "⌃"; }
.qa { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.qa dt { color: var(--muted); }
.qa dd { margin: 0 0 8px; font-weight: 600; }
.qa .mine { display: block; font-weight: 400; color: var(--muted); }
.pair-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: var(--paper); }
.tabs.two { grid-template-columns: 1fr 1fr; }
.item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; text-align: left; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; font: inherit; color: var(--ink); }
.item b { font-weight: 700; }
.item span { font-size: 13px; color: var(--muted); }
.item.new { border: 2px solid var(--plum); }
.group { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plum); }
.back { align-self: flex-start; padding: 0; }
.log { display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; background: var(--card); border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--plum); color: #fff; border-color: var(--plum); }
.msg-note { align-self: flex-start; margin: -2px 0 4px; font-size: 13px; color: var(--danger); }
.warn { margin: 0; padding: 12px 14px; border-radius: 14px; background: #fbeef0; color: var(--danger); font-size: 14px; line-height: 1.4; }
.send { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; position: sticky; bottom: 0; padding: 10px 0; background: var(--paper); }
.send textarea { min-height: 52px; }
.reveal-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: var(--line); }
#chatTools .btn.link { padding: 0 6px; }
.tabs.four { grid-template-columns: repeat(4, 1fr); }
.tabs.four .tab { font-size: 14px; padding: 0 4px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.case.help { border: 2px solid var(--danger); }
.duo .btn { text-align: center; padding-left: 8px; padding-right: 8px; }
.free-grid { display: grid; grid-template-columns: 1fr repeat(3, 1fr); gap: 6px; align-items: center; }
.free-grid .day { font-size: 14px; font-weight: 600; }
.free-grid .head { font-size: 12px; color: var(--muted); text-align: center; }
.free-grid .option { min-height: 44px; padding: 0; justify-content: center; text-align: center; font-size: 13px; }
