:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --ink: #2b2320;
  --muted: #6f625b;
  --line: #eadfd2;
  --accent: #c2553a;
  --accent-ink: #ffffff;
  --accent-soft: #f6e1d8;
  --sage: #5f7a63;
  --danger: #a3322a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(43, 35, 32, .06), 0 8px 24px rgba(43, 35, 32, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(251, 246, 238, .92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.brand-mark span { display: block; width: 3px; background: #fff; border-radius: 2px; margin: 0 1.5px; }
.brand-mark .bars { display: flex; align-items: center; }
.nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--accent); }
.session { display: flex; align-items: center; gap: 10px; min-height: 36px; min-width: 120px; justify-content: flex-end; font-size: .95rem; }
.session a { color: var(--ink); font-weight: 500; }
.session img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; font: 600 .95rem/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #a9462e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-text { background: none; border: none; color: var(--muted); font: 500 .9rem var(--sans); cursor: pointer; padding: 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { color: var(--ink); }
.btn-text.danger:hover { color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 18px; }
.wave { display: flex; align-items: center; gap: 4px; height: 80px; }
.wave i { flex: 1; background: var(--accent); border-radius: 3px; opacity: .85; }
.hero-art .qr-sample { display: flex; gap: 16px; align-items: center; }
.hero-art .qr-sample svg { width: 96px; height: 96px; }
@media (max-width: 800px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

.steps { padding: 24px 0 72px; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 14px; }
@media (max-width: 800px) { .steps ol { grid-template-columns: 1fr; } }

/* Sections and cards */
main { padding: 40px 0 80px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.placeholder { min-height: 240px; border-radius: var(--radius); background: linear-gradient(90deg, #f3ebe0, #f8f2ea, #f3ebe0); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.error { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: 8px 0 0; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: 1rem var(--sans); background: #fff; color: var(--ink); }
input:focus, select:focus, .btn:focus-visible, .btn-text:focus-visible { outline: 3px solid rgba(194, 85, 58, .3); outline-offset: 2px; border-color: var(--accent); }
.field { margin-bottom: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth { max-width: 440px; margin: 0 auto; }
.auth .switch { margin-top: 16px; text-align: center; font-size: .95rem; }
.auth .switch button { background: none; border: none; color: var(--accent); font: 600 .95rem var(--sans); cursor: pointer; padding: 0; }

/* Recorder */
.recorder { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 40px; }
.rec-btn { width: 112px; height: 112px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 8px var(--accent-soft); transition: transform .1s; }
.rec-btn:hover:not(:disabled) { transform: scale(1.03); }
.rec-btn:disabled { opacity: .5; cursor: not-allowed; }
.rec-btn .dot { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.rec-btn.recording { animation: pulse 1.4s infinite; }
.rec-btn.recording .dot { border-radius: 6px; width: 30px; height: 30px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 8px var(--accent-soft); } 50% { box-shadow: 0 0 0 16px rgba(194, 85, 58, .18); } }
.rec-info h2 { margin-bottom: 4px; }
.timer { font: 600 1.6rem/1 var(--sans); font-variant-numeric: tabular-nums; margin: 12px 0 8px; }
.timer small { color: var(--muted); font-size: 1rem; font-weight: 500; }
.meter { height: 8px; background: #f1e7dc; border-radius: 99px; overflow: hidden; max-width: 420px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.preview { margin-top: 18px; display: grid; gap: 12px; max-width: 520px; }
.preview audio { width: 100%; }
.preview .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .recorder { grid-template-columns: 1fr; justify-items: start; } }

/* Collection list */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.seg button { border: none; background: none; padding: 7px 14px; border-radius: 999px; font: 500 .85rem var(--sans); cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.list { display: grid; gap: 14px; }
.list.dim { opacity: .55; }
.rec-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.rec-item .qr svg { width: 96px; height: 96px; display: block; }
.rec-item h3 { margin: 0 0 2px; font-family: var(--sans); font-weight: 600; font-size: 1.05rem; }
.rec-item audio { width: 100%; max-width: 360px; margin-top: 10px; height: 36px; }
.rec-item .side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
@media (max-width: 640px) { .rec-item { grid-template-columns: 72px 1fr; } .rec-item .qr svg { width: 72px; height: 72px; } .rec-item .side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* Print sheet */
.sheet { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 18px; }
.qr-card { background: #fff; border: 1px dashed #cbbfb2; border-radius: 12px; padding: 16px; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.qr-card svg { width: 100%; max-width: var(--qr, 180px); height: auto; display: block; margin: 0 auto 10px; }
.qr-card .t { font-weight: 600; font-size: .95rem; margin: 0; word-break: break-word; }
.qr-card .d { color: var(--muted); font-size: .8rem; margin: 2px 0 0; }
.sheet-title { display: none; }

/* Player */
.player { max-width: 560px; margin: 0 auto; text-align: center; }
.player .big-play { width: 128px; height: 128px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; margin: 28px auto; box-shadow: 0 0 0 10px var(--accent-soft); }
.player .big-play:disabled { opacity: .5; }
.player .big-play svg { width: 48px; height: 48px; }
.player audio { width: 100%; margin-top: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .875rem; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .site-header, .site-footer, .no-print { display: none !important; }
  main { padding: 0; }
  .wrap { width: 100%; }
  .sheet-title { display: block; font-family: var(--serif); font-size: 18pt; margin: 0 0 10mm; }
  .qr-card { border-color: #999; }
}
/* Share row on each recording */
.share-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.share-row[hidden] { display: none; }
.share-label { font-weight: 600; font-size: .9rem; margin-right: 4px; }
.share-row .btn { border-width: 1.5px; }
.share-row .share-wa { border-color: #25d366; }
.share-row .share-wa:hover { background: #e9fbf0; }
.share-row .share-fb { border-color: #1877f2; }
.share-row .share-fb:hover { background: #e8f1fe; }
.share-row .share-ig { border-color: #d6249f; }
.share-row .share-ig:hover { background: #fcebf6; }
.share-row .share-sms { border-color: var(--sage); }
.share-row .share-sms:hover { background: #edf2ee; }
.share-status { flex-basis: 100%; margin: 4px 0 0; min-height: 1.2em; }
@media print { .share-row { display: none !important; } }
/* Plans */
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 24px; margin-top: 32px; }
@media (max-width: 760px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.plan-card.featured { border: 2px solid var(--accent); }
.plan-tag { position: absolute; top: -13px; left: 28px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin: 0; }
.plan-card h2 { margin-bottom: 8px; }
.plan-price { font: 700 2.2rem/1.1 var(--sans); margin: 0 0 12px; }
.plan-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.perks { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 10px; }
.perks li { padding-left: 26px; position: relative; }
.perks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage); transform: rotate(-45deg); }
.plan-cta { margin-top: auto; }
.plan-cta .btn { width: 100%; }
.plan-current { cursor: default; opacity: .8; }
/* Usage bar on My recordings */
.plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 20px; min-height: 58px; }
.plan-bar-info { flex: 1; min-width: 220px; }
.usage { height: 6px; background: #f1e7dc; border-radius: 99px; overflow: hidden; margin-top: 8px; max-width: 360px; }
.usage i { display: block; height: 100%; background: var(--sage); }
#limit-note { margin-top: 12px; }
