@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/greek-ext.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  --turquoise: #82cac5;
  --turquoise-deep: #6fbdba;
  --line: #e5e5e5;
  --muted: #6d6d6d;
  --text: #583119;
  --danger: #b91c1c;
  --ok: #166534;
  --info: #583119;
  --tint: #e8f6f5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--text); }
button, input, select, textarea { font: inherit; }

.shell { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 0; width: 100%; }
.side {
  background: #f3fafa;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding: 20px 12px 24px;
}
.side-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 4px 8px 16px 12px; min-width: 0; }
.brand-mark { width: 56px; height: 56px; object-fit: contain; flex: 0 0 56px; display: none; }
.brand-copy { min-width: 0; flex: 1; }
.brand-word { display: block; width: 72%; height: auto; }
.brand strong { display: block; font-size: 17px; letter-spacing: -0.03em; white-space: nowrap; }
.brand-copy > span { display: block; width: 72%; color: var(--text); font-size: 12px; margin-top: 2px; opacity: .75; text-align: center; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a, .logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.nav-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
.nav a.active { background: var(--turquoise); color: var(--text); font-weight: 600; }
.nav a:hover, .logout button:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px #583119;
}
.nav a.active:hover { background: var(--turquoise-deep); box-shadow: none; }
.logout { margin-top: 28px; }
.who { color: var(--text); font-size: 12px; padding: 8px 12px 0; opacity: .75; }

.main { flex: 1 0 auto; padding: 28px 20px 64px; }
h1 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 6px; }
.title-line { margin: 0 0 6px; }
.title-line h1 { margin: 0; }
.title-line.is-editing { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.title-line.is-editing h1,
.title-line.is-editing .edit-write { display: contents; }
.title-line.is-editing .edit-write form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 16rem;
  min-width: 0;
  order: -1;
  margin: 0;
}
.title-line .edit-write input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  font-size: 22px;
  font-weight: 600;
}
.edit-pen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  vertical-align: middle;
  cursor: pointer;
}
.edit-pen:hover { color: var(--turquoise-deep); }
.edit-write .actions { margin-top: 8px; }
.edit-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 8px; }
.edit-specs .edit-save { grid-column: 1 / -1; }
.price-bubble {
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  background: var(--tint);
  color: var(--text);
  border: 0;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
}
.comps { margin: 8px 0 0; padding-left: 0; list-style: none; }
.comps li { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
.comps li:last-child { margin-bottom: 0; }
.comps .price-bubble { flex: none; margin-right: 0; }
.comp-price { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.country-bubble {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px 0;
  background: #ececec;
  color: #6d6d6d;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: 1px;
}
.comps .country-bubble { margin-left: 0; }
.comps .comp-text { flex: 1 1 auto; min-width: 0; }
.comp-delete { margin: 0; flex: none; line-height: 0; }
button.comp-x {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6d6d6d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
button.comp-x:hover { color: #583119; background: #f3f3f3; }
a.link-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  color: var(--text);
  text-decoration: none;
}
a.link-icon:hover { color: var(--turquoise-deep); }
h1 .ref-bubble {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  background: var(--turquoise);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 10px 1px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}
h2 { font-size: 22px; margin: 28px 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.row-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 0 0 18px; }
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  max-width: 48rem;
  border-bottom: 1px solid var(--line);
}
.subnav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--turquoise); }
.subnav a.has-count {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.count-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8f6f5;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--turquoise);
  color: var(--text);
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--turquoise-deep); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--turquoise); }
.btn.secondary:hover { background: var(--tint); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; }
@media (hover: hover) and (pointer: fine) {
  .btn.danger:hover { background: #fef2f2; }
}
@media (hover: none) {
  .btn.danger:hover,
  .btn.danger:active,
  .btn.danger:focus { background: #fff; color: var(--danger); }
}

.result-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 48rem;
  width: 100%;
  margin: 0 0 12px;
}
.result-pair.is-single { grid-template-columns: 1fr; }
.result-bubble {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.result-bubble.is-price { background: var(--tint); border: 0; }
.result-bubble h3 { margin: 0 0 8px; }
.result-bubble p { margin: 0 0 6px; }
.result-bubble p:last-child { margin-bottom: 0; }
.result-bubble .sum { font-size: 28px; line-height: 1.15; margin: 0; }
.sum-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.sum-note { margin-left: auto; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--muted); text-align: right; }
.sum-status { white-space: nowrap; }
.reset-pen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  vertical-align: -2px;
  cursor: pointer;
}
.reset-pen:hover { color: var(--text); }
.buy-price {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(88, 49, 25, 0.16);
}
.buy-price span { font-size: 13px; }
.buy-price small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.buy-price strong { font-size: 20px; font-weight: 600; }
.buy-figure { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.buy-price .buy-split { margin-top: 4px; line-height: 1.35; font-size: 11px; }
.margin-slider, .market-slider { margin: 12px 0 0; width: 100%; }
.span-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.range-scale { width: 100%; }
.margin-slider input[type="range"],
.market-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 10px;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.margin-slider input[type="range"]::-webkit-slider-thumb,
.market-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
  cursor: pointer;
}
.margin-slider input[type="range"]::-moz-range-track,
.market-slider input[type="range"]::-moz-range-track {
  height: 10px;
  background: #fff;
  border: 0;
  border-radius: 999px;
}
.margin-slider input[type="range"]::-moz-range-thumb,
.market-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
  cursor: pointer;
}
.market-slider input[type="range"].is-moved {
  background: #b7ddd9;
}
.market-slider input[type="range"].is-moved::-moz-range-track {
  background: #b7ddd9;
}
.result-facts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.range { margin-top: 10px; }
.range-track { position: relative; height: 10px; border-radius: 999px; background: #fff; }
.range-mark {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%);
}
.range-scale { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 8px 0 0; }
.spec { margin: 0; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: 12px; }
.spec dd { margin: 2px 0 0; }
.watch-profile h3 { margin-top: 14px; }
.watch-profile h3:first-child { margin-top: 0; }
.watch-profile .fold { margin-top: 14px; }
details.fold > summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 2px;
}
details.fold[open] > summary::before {
  transform: rotate(45deg);
  vertical-align: 1px;
}
.token-total { margin-top: 18px; }
@media (max-width: 699px) {
  .result-pair { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .edit-specs { grid-template-columns: 1fr; }
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 12px;
  max-width: 48rem;
  width: 100%;
}
.flow { list-style: none; margin: 0; padding: 0; }
.flow li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 14px;
  position: relative;
  padding: 0 0 16px;
}
.flow li:last-child { padding-bottom: 0; }
.flow li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.flow li:last-child::before { content: none; }
.flow .step-no {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.flow h3 { margin: 2px 0 4px; }
.flow p { margin: 0; }
.flow-rules { margin: 8px 0 0; padding-left: 18px; }
.flow-rules li { margin: 0 0 8px; }
.flow-rules li:last-child { margin: 0; }
.prompt-label { margin-top: 18px; }
.prompt-view {
  margin: 0;
  padding: 12px 14px;
  max-height: 28rem;
  overflow: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 4px;
}
[hidden] { display: none !important; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr; }
label.field { display: block; }
.panel > #purchase-diff { margin-top: 14px; }
#purchase-sample { margin-top: 12px; }
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rate-row .rate-name { font-weight: 600; margin: 0; }
.rate-row .rate-value { display: flex; align-items: center; gap: 8px; margin: 0; }
.rate-row input[type="number"] { width: 5.5rem; text-align: right; }
.rate-row .rate-unit { color: var(--muted); }
label.field span, .label { display: block; font-size: 13px; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="url"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--text);
}
input[type="checkbox"] { accent-color: var(--text); }
label.field span.price-take {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  font-size: inherit;
}
.price-take input { width: 10rem; flex: 0 0 auto; }
.price-take .btn { white-space: nowrap; margin: 0; }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; vertical-align: middle; }
td { padding: 11px 10px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1; }
td.trash { width: 22px; padding: 10px 10px 10px 0; text-align: right; line-height: 0; }
.row-delete { margin: 0; line-height: 0; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { color: var(--danger); }
tr.row { cursor: pointer; }
tr.row a { color: inherit; text-decoration: none; }
tr.row:hover td { background: var(--tint); }
tr.row:focus { outline: 2px solid var(--turquoise); outline-offset: -2px; }
.table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 48rem; width: 100%; }
.table-wrap.is-wide { max-width: 76rem; }
.table-wrap.is-wide table { table-layout: fixed; }
.table-wrap.is-wide .col-number { width: 11.5rem; white-space: nowrap; }
.table-wrap.is-wide .col-name { width: 11rem; }
.table-wrap.is-wide .col-kind { width: 4.5rem; white-space: nowrap; }
.table-wrap.is-wide .channel-cell { width: 9rem; white-space: nowrap; }
.table-wrap.is-wide .ai-cost { width: 5.5rem; }
.table-wrap.is-wide th.trash,
.table-wrap.is-wide td.trash { width: 2.5rem; }

.badge { display: inline-block; background: var(--tint); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 13px; line-height: 1.4; }
.channel-bubble {
  display: inline-block;
  padding: 1px 6px 0;
  background: #ececec;
  color: #6d6d6d;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: 1px;
}
.channel-bubble.is-whatsapp {
  background: #e8f6f5;
  color: #583119;
}
.channel-cell { white-space: normal; }
td.ai-cost { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.channel-number {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
}
.note-bubble {
  display: inline-block;
  margin: 0 8px 0 0;
  padding: 2px 8px;
  background: #ececec;
  color: #6d6d6d;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: baseline;
  white-space: nowrap;
}
.badge.with-tick { display: inline-flex; align-items: center; gap: 6px; }
.flash { border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; max-width: 48rem; width: 100%; }
.flash.error { background: #fef2f2; color: var(--danger); }
.flash.ok, .flash.info { background: var(--tint); color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.photo { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin: 0; }
.photo form { margin: 0; line-height: 0; }
.photo img { display: block; width: 100%; height: 96px; object-fit: cover; background: #f8fafc; border-radius: 6px; cursor: pointer; }
.photo-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.photo .btn { padding: 4px 0; font-size: 13px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
body.home-body .login-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 36px;
}
body.home-body .login {
  padding: 28px 24px 24px;
}
body.home-body .login-wrap .flash { width: min(420px, 100%); }
body.home-body .login,
body.home-body .legal {
  color: var(--text);
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}
body.home-body .login textarea { min-height: 88px; }
.access-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
body.home-body .login .panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}
body.home-body .legal {
  width: min(48rem, calc(100% - 48px));
  margin: 28px auto 48px;
  padding: 32px 36px 40px;
}
body.home-body .login h1,
body.home-body .legal h1 {
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
body.home-body .home-stage > .legal { flex: 0 0 auto; align-self: center; }
.login { width: min(420px, 100%); }
.login-logo { display: block; width: 62%; height: auto; margin: 0 0 18px; }
.kicker { color: var(--text); font-weight: 700; letter-spacing: -0.03em; font-size: 28px; margin: 0 0 8px; }
.choices { display: grid; gap: 16px; max-width: 52rem; width: 100%; }
.choices form { margin: 0; }
a.choice, button.choice {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
}
a.choice span, button.choice span {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
a.choice:hover, button.choice:hover { border-color: var(--turquoise); background: var(--tint); }
button.choice:disabled,
button.choice:disabled:hover {
  color: #a3a3a3;
  background: #f3f3f3;
  border-color: var(--line);
  cursor: not-allowed;
}
button.choice:disabled span,
button.choice:disabled:hover span { color: #bdbdbd; }
.menu-toggle {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 2px 4px 8px 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle:hover, .menu-toggle:focus-visible { background: #f6f6f6; outline: none; }
.menu-toggle svg { display: block; width: 20px; height: 20px; }
.menu-toggle .icon-expand { display: none; }
html[data-nav="folded"] .menu-toggle .icon-collapse,
html:not([data-nav]) .shell.folded .menu-toggle .icon-collapse { display: none; }
html[data-nav="folded"] .menu-toggle .icon-expand,
html:not([data-nav]) .shell.folded .menu-toggle .icon-expand { display: inline-flex; }
html[data-nav="folded"] .nav-label,
html:not([data-nav]) .shell.folded .nav-label,
html[data-nav="folded"] .who,
html:not([data-nav]) .shell.folded .who,
html[data-nav="folded"] .brand-copy,
html:not([data-nav]) .shell.folded .brand-copy { display: none; }
html[data-nav="folded"] .brand-mark,
html:not([data-nav]) .shell.folded .brand-mark { display: block; }
html[data-nav="folded"] .side-top,
html:not([data-nav]) .shell.folded .side-top { flex-direction: column; align-items: center; }
html[data-nav="folded"] .brand,
html:not([data-nav]) .shell.folded .brand { padding: 4px 0 10px; justify-content: center; }
html[data-nav="folded"] .brand strong,
html:not([data-nav]) .shell.folded .brand strong { font-size: 15px; }
html[data-nav="folded"] .nav,
html:not([data-nav]) .shell.folded .nav { justify-content: center; }
html[data-nav="folded"] .nav a,
html:not([data-nav]) .shell.folded .nav a,
html[data-nav="folded"] .logout button,
html:not([data-nav]) .shell.folded .logout button {
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  gap: 0;
}
html[data-nav="folded"] .side,
html:not([data-nav]) .shell.folded .side { padding-left: 8px; padding-right: 8px; }
.step { max-width: 48rem; width: 100%; }
.step-cancel { margin-top: 24px; }

#ai-busy {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
}
#ai-busy[hidden] { display: none; }
#ai-busy .busy-card {
  max-width: 22rem;
  text-align: center;
}
#ai-busy .busy-card::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--text);
  animation: ai-pulse 1.1s ease-in-out infinite;
}
#ai-busy .busy-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}
#ai-busy .busy-step {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}
@keyframes ai-pulse {
  50% { opacity: 0.25; }
}
.main:has(#drop) {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.step:has(#drop) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.step:has(#drop:not(.has-photos)) > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.step:has(#drop) .step-cancel { margin-top: 16px; }
.step:has(.drop.has-photos) .step-cancel { margin-top: auto; padding-top: 16px; }
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 220px;
  width: 100%;
  margin: 0;
  border: 2px dashed var(--turquoise);
  border-radius: 16px;
  background: var(--tint);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  padding: 32px;
}
.drop strong { font-size: 28px; letter-spacing: -0.03em; }
.drop input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; opacity: 0; pointer-events: none; }
#drop-idle, #camera, .shot-row, .drop-names { position: relative; z-index: 1; }
#drop-idle { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#camera { width: 100%; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
#camera[hidden], #drop-idle[hidden], #weiter[hidden] { display: none; }
#weiter { margin-top: 16px; }
#cam { width: 100%; flex: 1 1 auto; min-height: 180px; height: 100%; background: #111; border-radius: 10px; object-fit: cover; }
.shot-row { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; justify-content: center; }
.shot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; padding: 0; background: transparent; }
.shot img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.shot .photo-x { top: 4px; right: 4px; }
.drop-names { color: var(--muted); }
.drop.has-photos, .drop.is-shut { flex: 0 0 auto; min-height: 0; padding: 16px; justify-content: flex-start; }
.drop.over { background: #fff; }
.cam-frame { position: relative; display: flex; width: 100%; flex: 1 1 auto; min-height: 180px; }
.cam-ok {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #6d6d6d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cam-ok.is-shot { background: #166534; color: #fff; }
#cam { cursor: pointer; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; }
.flags .badge { white-space: normal; max-width: 100%; }
.switches { display: flex; flex-direction: column; gap: 10px; }
.extra-fields { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.extra-row { display: flex; align-items: center; gap: 12px; }
.extra-row.is-notes { align-items: flex-start; }
.extra-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 220px;
  width: 220px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
}
.extra-pick input { width: 16px; height: 16px; margin: 0; flex: none; }
.extra-pick span { display: block; line-height: 20px; }
.extra-value { flex: 1 1 auto; min-width: 0; margin: 0; }
.extra-notes { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.switch-label { font-weight: 600; }
.switch-track {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e5e5e5;
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(88, 49, 25, 0.28);
}
.switch[aria-pressed="true"] .switch-track { background: var(--turquoise); }
.switch[aria-pressed="true"] .switch-knob { transform: translateX(18px); }
.letterhead-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
button.letterhead-name,
button.letterhead-track {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
button.letterhead-name { font-weight: 600; }
button.letterhead-track {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e5e5e5;
}
.letterhead-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(88, 49, 25, 0.28);
}
.letterhead-pick.is-mahlberg .letterhead-knob { transform: translateX(18px); }
.letterhead-preview { margin-top: 18px; text-align: center; }
.letterhead-preview img { display: block; height: 48px; width: auto; margin: 0 auto 12px; }
.letterhead-preview p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.footer-lines { display: flex; flex-direction: column; gap: 6px; }
.footer-lines input { text-align: center; font-size: 13px; }
.logo-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 12px 18px 14px;
  border-radius: 18px;
  background: var(--tint);
  color: var(--text);
}
.logo-bubble span { font-size: 13px; font-weight: 600; }
.logo-preview { display: block; max-width: 180px; max-height: 56px; width: auto; height: auto; margin: 0; object-fit: contain; }
.token-create { display: grid; gap: 12px; max-width: 24rem; }
.token-list td:last-child { width: 1%; white-space: nowrap; }
.token-list form { margin: 0; }
.kinds { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
select.photo-kind { margin-top: 8px; }

@media (max-width: 799px) {
  .side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 10px;
    overflow: visible;
  }
  .side-top,
  html[data-nav="folded"] .side-top,
  html:not([data-nav]) .shell.folded .side-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .brand,
  html[data-nav="folded"] .brand,
  html:not([data-nav]) .shell.folded .brand {
    padding: 0;
    gap: 0;
    justify-content: flex-start;
  }
  .who { display: none; }
  .brand-word { width: min(150px, 52vw); }
  .brand-copy span { display: none; }
  .nav, .logout { display: none; }
  html[data-nav="open"] .nav,
  html:not([data-nav]) .shell:not(.folded) .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    margin-top: 8px;
  }
  html[data-nav="open"] .logout,
  html:not([data-nav]) .shell:not(.folded) .logout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 4px 0 0;
  }
  html[data-nav="open"] .nav a,
  html[data-nav="open"] .logout button,
  html:not([data-nav]) .shell:not(.folded) .nav a,
  html:not([data-nav]) .shell:not(.folded) .logout button {
    width: auto;
    height: auto;
    padding: 8px 12px;
    justify-content: flex-start;
    gap: 10px;
  }
  .menu-toggle { margin: 0; }
}

@media (min-width: 800px) {
  .shell { display: grid; grid-template-columns: 280px 1fr; grid-template-rows: 1fr; }
  html[data-nav="folded"] .shell,
  html:not([data-nav]) .shell.folded { grid-template-columns: 76px 1fr; }
  html[data-nav="open"] .shell { grid-template-columns: 280px 1fr; }
  .side { align-self: stretch; border-bottom: 0; border-right: 1px solid var(--line); }
  html[data-nav="open"] .side,
  html:not([data-nav]) .shell:not(.folded) .side { position: relative; padding-top: 8px; }
  html[data-nav="open"] .menu-toggle,
  html:not([data-nav]) .shell:not(.folded) .menu-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    margin: 0;
    z-index: 2;
  }
  html[data-nav="open"] .brand,
  html:not([data-nav]) .shell:not(.folded) .brand { padding: 16px 30px 12px 4px; }
  .nav { display: flex; flex-direction: column; overflow: visible; }
  html[data-nav="folded"] .nav,
  html:not([data-nav]) .shell.folded .nav { align-items: center; }
  .nav a { margin-bottom: 2px; }
  .logout { display: flex; flex-direction: column; align-items: flex-start; }
  html[data-nav="folded"] .logout,
  html:not([data-nav]) .shell.folded .logout { align-items: center; }
  .main { padding: 36px 40px 80px; }
  .grid.two { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 64rem; }
  .grid.three > .panel { max-width: none; }
  .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .measure { display: grid; grid-template-columns: 1.4fr .8fr .6fr auto; gap: 8px; align-items: end; }
}

.legal { width: min(48rem, 100%); margin: 0 auto; padding: 36px 20px 64px; }
.main .prose { max-width: 48rem; }
.legal .kicker a { color: inherit; text-decoration: none; }
.prose h2 { font-size: 18px; margin: 1.6rem 0 0.4rem; }
.prose p { margin: 0 0 0.85rem; }
.prose ul { margin: 0 0 0.85rem; padding-left: 1.2rem; }
.prose li { margin: 0 0 0.35rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose code { font-size: 0.9em; }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 0.65rem 1.5rem 0.7rem;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot-brand { margin: 0 0 0.1rem; color: var(--text); font-weight: 700; }
.foot-brand a { color: inherit; text-decoration: none; }
.foot-copy, .foot-note, .foot-tdm { margin: 0; line-height: 1.25; }
.foot-side { text-align: right; }
.foot-tdm { margin-top: 0.15rem; white-space: nowrap; }
@media (max-width: 40rem) {
  .foot-tdm { white-space: normal; }
}
.foot-nav { display: flex; flex-wrap: nowrap; gap: 1.1rem; justify-content: flex-end; align-items: flex-start; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover, .foot-nav a[aria-current="page"] { color: var(--text); }

body.home-body {
  background: #f8f5f0;
  color: #8a8a8a;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
}
.home-stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8f5f0;
}
.home-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 64px 16px;
  background: #f8f5f0;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e5e5e5;
}
.home-logo { display: block; flex: none; line-height: 0; }
.home-logo img { display: block; height: 34px; width: auto; }
.home-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}
.home-nav a { color: #8a8a8a; font-weight: 400; text-decoration: none; }
.home-nav a:hover { color: #6a6a6a; }
.home-nav-rule { width: 1px; height: 16px; background: #d9d0c6; }
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 7px;
  background: var(--turquoise);
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.2;
}
.home-btn:hover { background: var(--turquoise-deep); color: var(--text); }
.home-nav .home-btn,
.home-nav .home-btn:hover { color: var(--text); }
.home-arrow { display: block; flex: none; }
.home-hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: 28px 64px 56px;
  background-color: #f8f5f0;
  background-image:
    linear-gradient(90deg, #f8f5f0 0%, #f8f5f0 36%, rgba(248, 245, 240, 0.94) 46%, rgba(248, 245, 240, 0.45) 58%, rgba(248, 245, 240, 0) 70%),
    url("hero-desk.png?v=2");
  background-repeat: no-repeat;
  background-position: center center, 28% 68%;
  background-size: auto, 132% auto;
}
.home-copy { max-width: 46rem; }
.home-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #9c958c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.home-kicker::after {
  content: "";
  width: 48px;
  height: 1px;
  background: #d5cfc6;
}
.home-copy h1 {
  margin: 0 0 18px;
  color: #5c3820;
  font-family: "Source Sans 3", sans-serif;
  font-size: 58px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.18;
}
.home-copy .home-lead {
  max-width: 32rem;
  margin: 0 0 10px;
  color: #8a8a8a;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}
.home-time {
  margin: 0 0 28px;
  color: #5c3820;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
}
br.home-break { display: none; }
.home-copy .home-btn { padding: 12px 18px; font-size: 15.5px; }
.home-login {
  margin: 16px 0 0;
  color: #8a8a8a;
  font-size: 14px;
  font-weight: 400;
}
.home-login a { color: #6e6e6e; font-weight: 400; text-decoration: underline; text-underline-offset: 2px; }
.home-points {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #f9f8f4;
  padding: 8px 64px 12px;
}
.home-points article {
  position: relative;
  padding: 28px 36px 34px 0;
  text-align: left;
}
.home-points article + article { padding-left: 32px; }
.home-points article + article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  bottom: 30px;
  width: 1px;
  background: #e6dfd6;
}
.home-points h2 {
  margin: 0 0 8px;
  color: #583018;
  font-family: "Source Sans 3", sans-serif;
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.home-points p {
  margin: 0;
  color: #a3a3a3;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.015em;
}
body.home-body .foot {
  margin-top: 0;
  background: #f9f8f4;
  border-top: 1px solid #e7e1d8;
  color: #6d6d6d;
  font-family: "Source Sans 3", sans-serif;
}
body.home-body .foot-brand { color: #583119; }
body.home-body .foot-nav a { color: #6d6d6d; }
body.home-body .foot-nav a:hover,
body.home-body .foot-nav a[aria-current="page"] { color: #583119; }
@media (max-width: 980px) {
  .home-bar, .home-hero { padding-left: 28px; padding-right: 28px; }
  .home-nav { gap: 16px; font-size: 14px; }
  .home-copy h1 { font-size: 46px; }
  .home-points { padding-left: 28px; padding-right: 28px; }
  .home-hero {
    background-image:
      linear-gradient(180deg, #f8f5f0 0%, rgba(248, 245, 240, 0.92) 42%, rgba(248, 245, 240, 0.35) 100%),
      url("hero-desk.png?v=2");
    background-position: center center, 40% 60%;
  }
}
@media (max-width: 720px) {
  br.home-break { display: block; }
  .home-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .home-logo { flex: 0 1 auto; min-width: 0; }
  .home-logo img { height: 26px; width: auto; }
  .home-nav { flex: 0 0 auto; flex-wrap: nowrap; gap: 0; }
  .home-nav a:not(.home-btn),
  .home-nav-rule { display: none; }
  .home-nav .home-btn { padding: 8px 11px; font-size: 13.5px; white-space: nowrap; }
  .home-nav .home-btn .home-arrow { display: none; }
  .home-copy h1 { font-size: 36px; }
  .home-copy .home-lead { color: #5c3820; }
  .home-time { font-weight: 700; }
  .home-points { grid-template-columns: 1fr; padding-top: 4px; padding-bottom: 10px; }
  .home-points article { padding: 10px 0 6px; }
  .home-points article + article { padding-left: 0; }
  .home-points h2 { margin-bottom: 2px; }
  .home-points article + article::before { display: none; }
  body.home-body .legal { width: min(48rem, calc(100% - 32px)); margin: 20px auto 32px; padding: 24px 18px 28px; }
}
