@font-face { font-family: "Visby"; font-weight: 600; font-style: normal; font-display: swap; src: url("/brand/VisbySemibold.ttf") format("truetype"); }
@font-face { font-family: "Visby"; font-weight: 700; font-style: normal; font-display: swap; src: url("/brand/VisbyBold.ttf") format("truetype"); }

:root {
  /* AvoSolution design system v1.2 (looka brand kit) */
  --navy: #272f51;
  --ink: #151a2e;
  --blue: #2c8cf4;
  --blue-dark: #2370c3;
  --green: #16a34a;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e6ebf2;
  --text: #4a5568;
  --muted: #64748b;
  --faint: #a0aec0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 26, 46, 0.04);
  --head: "Visby", "Liberation Sans", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Liberation Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.16; margin: 0 0 0.5em; color: var(--ink); font-family: var(--head); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); letter-spacing: -0.4px; }
.hl { color: var(--blue); }
.eyebrow { font: 700 13px/1.4 var(--head); letter-spacing: 2.6px; text-transform: uppercase; color: var(--blue); margin: 0 0 10px; }
h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.2px; }
.brand span b { color: var(--blue); }
.brand svg { width: 34px; height: 34px; flex: none; }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { text-decoration: none; color: var(--navy); font-weight: 600; padding: 8px 10px; border-radius: 10px; font-size: 0.95rem; }
.top nav a:hover { background: var(--bg); }

/* buttons */
.btn {
  appearance: none; border: 1.5px solid transparent; border-radius: 10px; cursor: pointer;
  font: 700 1rem var(--head); padding: 12px 20px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; text-align: center; transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(44, 140, 244, 0.45); outline-offset: 2px;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.dark { background: var(--navy); color: #fff; }
.btn.buy { background: var(--blue); color: #fff; }
.btn.buy:hover { background: var(--blue-dark); }
.btn.ghost { background: var(--card); color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.danger { background: var(--card); color: #c62828; border-color: #f0c9c9; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 0.92rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* forms */
label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; min-width: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions > .btn { flex: 1 1 140px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flat { box-shadow: none; }

/* landing */
.grad { background: linear-gradient(128deg, #2b76cf 0%, #2a5797 42%, #272f51 100%); color: #fff; }
.hero { padding: 44px 0 40px; margin-bottom: 24px; }
.hero h1 { color: #fff; }
.hero .hl { color: #9cc8fb; }
.hero .eyebrow { color: #b9d8fc; }
.hero p.lead { font-size: 1.15rem; color: #d5e1f5; max-width: 40em; }
.hero .pillrow { margin-bottom: 0; }
.hero .pillrow li { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); }
.pillrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; padding: 0; list-style: none; }
.pillrow li { background: #eaf1fe; color: var(--navy); border-radius: 999px; padding: 6px 12px; font: 600 0.9rem var(--head); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 16px 0 28px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature .ico { width: 44px; height: 44px; border-radius: 11px; background: #eaf1fe; color: var(--blue); display: grid; place-items: center; margin-bottom: 10px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 62px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; }
.mylists a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 700; }
.mylists a:first-of-type { border-top: 0; }
.mylists a span { color: var(--muted); font-weight: 500; font-size: 0.9rem; }

/* list page */
.listhead { padding: 22px 0 6px; }
.listhead h1 { font-size: clamp(1.6rem, 6vw, 2.3rem); margin-bottom: 4px; }
.banner { border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.banner.info { background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 18px; }
.banner.warn { background: #fef3e2; color: #b45309; }
.orline { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 14px 0; font-size: 0.9rem; }
.orline::before, .orline::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.addrow { display: flex; gap: 10px; flex-wrap: wrap; }
.addrow input { flex: 1 1 200px; min-width: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 20px 0 12px; }
.toolbar .count { color: var(--muted); font-weight: 600; }

.gift { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.gift .thumb { width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--line); background: #fff center/contain no-repeat; display: grid; place-items: center; color: var(--blue); overflow: hidden; }
.gift .thumb img { width: 100%; height: 100%; object-fit: contain; }
.gift .thumb svg { width: 38px; height: 38px; }
.gift h3 { margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gift h3 a { color: inherit; text-decoration: none; }
.gift .meta { color: var(--muted); font-size: 0.9rem; }
.gift .price { font: 700 1.15rem var(--head); color: var(--navy); margin-top: 4px; }
.gift .notes { margin-top: 6px; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 0.95rem; }
.gift .foot { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.gift .foot .btn { flex: 1 1 130px; }
.gift .editbar { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.gift .editbar .btn { flex: 1 1 auto; }
.tag { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; font-weight: 700; margin-top: 6px; }
.tag.free { background: #e7f7ee; color: #16a34a; }
.tag.taken { background: #fef3e2; color: #b45309; }
.tag.bought { background: #eef2f7; color: var(--muted); }
.gift.done { opacity: 0.72; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }

/* dialogs */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); color: var(--text); box-shadow: 0 20px 60px rgba(20, 26, 50, 0.35); }
dialog::backdrop { background: rgba(28, 35, 64, 0.55); }
.sheet { padding: 20px; }
.sheet h2 { margin-bottom: 6px; }
.preview { display: flex; gap: 12px; align-items: center; margin: 10px 0 14px; }
.preview .thumb { width: 72px; height: 72px; flex: none; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); overflow: hidden; background: #fff; }
.preview .thumb img { width: 100%; height: 100%; object-fit: contain; }
.preview .thumb svg { width: 30px; height: 30px; }
.camera { position: relative; background: #0d1226; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; margin: 12px 0; }
.camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera .frame { position: absolute; inset: 22% 10%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(13, 18, 38, 0.35); }
.camera .msg { position: absolute; inset: 0; z-index: 1; background: #0d1226; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; max-width: calc(100vw - 32px); box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }
#toast button { background: none; border: 0; color: #9ccbff; font: inherit; font-weight: 800; cursor: pointer; padding: 0; }

/* santa */
.reveal { text-align: center; padding: 34px 18px; }
.reveal .name { font-size: clamp(2rem, 10vw, 3.2rem); font-family: var(--head); font-weight: 700; color: var(--blue); letter-spacing: -0.4px; margin: 10px 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.people li:first-child { border-top: 0; }
.people li b { flex: 1 1 120px; }

footer { padding: 28px 0 40px; color: var(--faint); font-size: 0.85rem; text-align: center; }
footer a { color: var(--muted); }
footer .by { display: inline-block; margin-bottom: 10px; }
footer .by img { height: 34px; width: auto; opacity: 0.55; }

@media (max-width: 420px) {
  .gift { grid-template-columns: 76px minmax(0, 1fr); }
  .gift .thumb { width: 76px; height: 76px; }
  .card { padding: 16px; }
}

.card.callout { background: var(--navy); border-color: var(--navy); border-radius: 12px; text-align: center; }
.card.callout h2 { color: #fff; }
.card.callout p { color: #b7c2dc; }
.steps li::before { font-family: var(--head); }
.steps li, .feature { box-shadow: var(--shadow); }
.gift h3 a, .mylists a { color: var(--ink); }
