/* Amigo invisible 1.1 — responsive, accessible, native controls. */
:root {
  color-scheme: light;
  --bg: #f5f6f1; --paper: #fff; --ink: #20382f; --muted: #52665c;
  --green: #245747; --green-hover: #194536; --line: #dce3db;
  --control: #8d9f94; --soft: #e8f0e9; --gold: #efca76;
  --red: #943a35; --shadow: 0 12px 40px #20382f0b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-underline-offset: .2em; }
:where(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #a56d18; outline-offset: 3px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; max-width: 100%; padding: 12px 18px; border: 1px solid transparent; border-radius: 12px; background: var(--green); color: white; font-weight: 700; line-height: 1.35; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
button:hover:not(:disabled) { background: var(--green-hover); }
button:disabled { opacity: .58; cursor: not-allowed; }
button.secondary { background: var(--soft); color: var(--green); }
button.secondary:hover:not(:disabled) { background: #dce9df; }
button.outline { background: var(--paper); border-color: var(--control); color: var(--ink); }
button.outline:hover:not(:disabled) { background: var(--bg); }
button.text { background: transparent; color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding-inline: 8px; }
button.text:hover:not(:disabled) { background: var(--soft); }
button.danger { background: #f9eae7; color: var(--red); }
button.danger:hover:not(:disabled) { background: #f4d9d4; }
button.small { font-size: .875rem; padding: 9px 13px; min-height: 44px; }
.wide { width: 100%; }
.top { width: min(100%, 1160px); margin: 0 auto; padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 0; color: var(--ink); text-decoration: none; font-size: 1.28rem; font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; margin-right: 10px; background: var(--green); color: #fff2ca; border-radius: 11px; font-size: 25px; letter-spacing: 0; line-height: 1; }
.brand-accent { font-weight: 550; }
.brand-dot { color: #a16d18; }
.topnote, footer { font-size: .875rem; color: var(--muted); }
main { width: min(100%, 1080px); flex: 1; margin: 0 auto; padding: 24px 24px 48px; min-width: 0; }
main:focus, h1:focus { outline: none; }
.narrow { width: min(100%, 480px); margin: 0 auto; }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.center { text-align: center; }
.eyebrow { font-size: .8rem; letter-spacing: .075em; font-weight: 700; color: var(--green); margin: 0 0 10px; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; border-radius: 99px; background: var(--soft); padding: 8px 14px; font-size: .875rem; font-weight: 700; }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #347758; }
h1,h2,h3,p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 5vw, 2.65rem); line-height: 1.13; letter-spacing: -.045em; margin-bottom: 12px; }
h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.025em; margin-bottom: 10px; }
h3 { font-size: 1rem; margin-bottom: 8px; }
p { line-height: 1.6; margin-bottom: 16px; }
.card > :last-child, .center > :last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.smalltext { font-size: .9rem; line-height: 1.55; }
.hero { padding: 32px; }
.hero h1 { max-width: 100%; margin-inline: auto; }
.hero > .center > p:not(.eyebrow) { max-width: 35ch; margin-inline: auto; }
.hero > .center + form { margin-top: 24px; }
.hero form + .smalltext, .hero button + p, .hero .error + p { margin-top: 16px; }
.hero .text.wide { margin-top: 8px; }
.hero-art { position: relative; display: grid; place-items: center; margin: 0 auto 24px; width: 104px; height: 104px; border-radius: 30px; background: var(--soft); }
.gift { position: relative; width: 58px; height: 48px; margin-top: 15px; background: var(--green); border-radius: 5px; }
.gift::before { content: ''; position: absolute; inset: 0 auto 0 24px; width: 10px; background: var(--gold); }
.gift::after { content: ''; position: absolute; top: -8px; left: -5px; right: -5px; height: 14px; border-radius: 4px; background: linear-gradient(90deg,#36705b 0 43%,var(--gold) 43% 57%,#36705b 57%); }
.bow { position: absolute; top: -21px; left: 12px; width: 18px; height: 16px; border: 4px solid #a77a31; border-radius: 50% 50% 0 50%; transform: rotate(12deg); }
.bow::after { content: ''; position: absolute; width: 18px; height: 16px; border: 4px solid #a77a31; border-radius: 50% 50% 50% 0; left: 10px; top: -6px; transform: rotate(-24deg); }
.star { position: absolute; top: 8px; right: 12px; color: #a16d18; font-size: 21px; }
.star.two { top: auto; bottom: 7px; left: 9px; right: auto; font-size: 16px; }
.steps { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0 0 20px; }
.step { height: 5px; width: 34px; background: #dce3db; border-radius: 9px; }
.step.active { background: var(--green); }
.step-label { margin-left: 7px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
label { display: block; font-weight: 650; margin-bottom: 8px; text-align: left; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 54px; border: 1px solid var(--control); border-radius: 12px; background: #fff; color: var(--ink); padding: 13px 15px; font-size: 1rem; line-height: 1.5; text-align: left; }
input:not([type=checkbox]), select { height: 54px; }
textarea { min-height: 108px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #66776c; opacity: 1; }
select { appearance: none; -webkit-appearance: none; padding-right: 46px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23245747' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 15px center; background-repeat: no-repeat; background-size: 20px 20px; cursor: pointer; text-overflow: ellipsis; }
select:invalid { color: #52665c; }
select option { color: var(--ink); }
.field { margin: 0 0 20px; text-align: left; }
.field small { display: block; margin-top: 8px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.form-actions, .action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.form-actions > * { flex: 1 1 130px; }
.error { background: #f9eae7; color: #85332f; padding: 14px; border: 1px solid #e8c2bc; border-radius: 12px; margin: 16px 0; line-height: 1.55; text-align: left; }
.error:empty { display: none; }
.notice { background: var(--soft); border-radius: 12px; padding: 14px 16px; line-height: 1.55; font-size: .9375rem; }
.notice p:last-child { margin-bottom: 0; }
.rule { height: 1px; background: var(--line); margin: 24px 0; }
.wheel-wrap { width: min(100%, 220px); aspect-ratio: 1; display: grid; place-items: center; position: relative; margin: 8px auto 28px; }
.wheel { width: 90%; aspect-ratio: 1; border: 8px solid var(--green); border-radius: 50%; background: conic-gradient(#e9c66e 0deg 60deg,#e9efe1 60deg 120deg,#5b8a73 120deg 180deg,#f1dba1 180deg 240deg,#cadac8 240deg 300deg,#8fb39d 300deg); box-shadow: 0 5px 0 #173b2b18; display: grid; place-items: center; transition: transform 1.15s cubic-bezier(.15,.55,.18,1); }
.wheel::after { content: '✳'; display: grid; place-items: center; border: 4px solid #fff; color: #fff; background: var(--green); font-size: 28px; border-radius: 50%; width: 58px; height: 58px; line-height: 1; }
.wheel.spin { transform: rotate(1450deg); }
.pointer { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 25px solid var(--ink); }
.result-box { border: 1px solid #b6d0b9; background: var(--soft); border-radius: 18px; padding: 28px 16px; margin: 24px 0; overflow-wrap: anywhere; }
.result-box strong { display: block; font-size: clamp(2rem,7vw,2.8rem); line-height: 1.15; letter-spacing: -.04em; }
.result-box span { display: block; font-weight: 600; margin-bottom: 10px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.admin-head > div { min-width: 0; }
.admin-head h1 { margin-bottom: 8px; }
.admin-head p:last-child { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.stat { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat strong { font-size: 1.8rem; display: block; line-height: 1.25; letter-spacing: -.04em; }
.stat span { font-size: .875rem; color: var(--muted); display: block; margin-top: 4px; overflow-wrap: anywhere; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 20px; align-items: start; }
.admin-grid > div { min-width: 0; }
.admin-grid .card { padding: 24px; box-shadow: none; }
.admin-grid button.wide + p { margin-top: 14px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-title h2 { margin: 0; }
.section-title > span { flex-shrink: 0; }
.person { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--soft); color: var(--green); }
.person-name { min-width: 0; overflow-wrap: anywhere; }
.person-name strong { display: block; }
.person-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.linkbox { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: stretch; margin: 16px 0; }
.linkbox input { font-size: .875rem; background: var(--bg); }
.exclude-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; overflow-wrap: anywhere; }
.checkrow { display: flex; gap: 12px; align-items: center; min-height: 44px; font-weight: 500; line-height: 1.45; margin: 0 0 16px; cursor: pointer; }
.checkrow input { width: 22px; height: 22px; margin: 0; accent-color: var(--green); flex-shrink: 0; }
.codebox { font-family: ui-monospace, monospace; font-size: 1rem; letter-spacing: .035em; overflow-wrap: anywhere; padding: 12px; background: var(--bg); border-radius: 10px; text-align: center; }
.private-details { margin: 8px 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.private-details .form-actions { margin-top: 10px; }
.private-details p { margin: 8px 0 12px; }
.admin-options { margin-top: 18px; }
.admin-options summary { cursor: pointer; font-weight: 650; min-height: 44px; padding-block: 10px; }
.admin-options .action-row { margin-top: 14px; }
footer { width: min(100%,1160px); margin: 0 auto; padding: 18px 32px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
#toast { position: fixed; bottom: max(20px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 5; }
#toast:empty { display: none; }
.saved-list { margin-top: 12px; }
.saved-list button + button { margin-top: 8px; }
.hidden { display: none !important; }
@media (max-width: 820px) {
  .admin-grid { grid-template-columns: minmax(0,1fr); }
  .admin-grid .card { padding: 22px; }
  .admin-head { flex-direction: column; gap: 12px; }
}
@media (max-width: 520px) {
  .top { padding: 16px 20px; justify-content: center; }
  .topnote { display: none; }
  main { padding: 12px 16px 32px; }
  .hero { padding: 26px 20px; border-radius: 20px; }
  .hero-art { width: 92px; height: 92px; margin-bottom: 18px; }
  .admin-grid .card { padding: 20px 16px; border-radius: 18px; }
  .stats { gap: 7px; }
  .stat { padding: 11px 9px; }
  .stat strong { font-size: 1.4rem; }
  .stat span { font-size: .8rem; }
  .person { grid-template-columns: 38px minmax(0,1fr); gap: 8px 10px; }
  .person-actions { grid-column: 2; justify-content: flex-start; }
  footer { padding: 16px 20px; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: .8rem; }
}
@media (max-width: 350px) {
  main { padding-inline: 10px; }
  .hero { padding-inline: 16px; }
  .linkbox { grid-template-columns: minmax(0,1fr); }
  .person-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { select { appearance: auto; background-image: none; padding-right: 15px; } }
