@layer base, layout, components;
@layer base {
  :root { --paper:#faf7f2; --ink:#352c2a; --muted:#766963; --wine:#653f4b; --soft:#efe4e4; --line:#dfd6ce; --green:#375c49; font-family:Arial,Helvetica,sans-serif; color:var(--ink); background:var(--paper); font-synthesis:none; }
  * { box-sizing:border-box; }
  body { margin:0; }
  a { color:inherit; text-decoration:none; }
  button,input,select,textarea { font:inherit; }
  button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
  button { cursor:pointer; }
  button:disabled { opacity:.5; cursor:wait; }
  :focus-visible { outline:3px solid #96687a; outline-offset:4px; }
  h1,h2,h3,p { margin:0; }
  h1,h2,.serif { font-family:Georgia,'Times New Roman',serif; font-weight:400; }
  h1 { font-size:clamp(2.6rem,7vw,5.5rem); line-height:1.06; letter-spacing:-.055em; }
  h2 { font-size:clamp(2rem,4vw,3.15rem); line-height:1.13; letter-spacing:-.035em; }
  h3 { font-size:1.12rem; line-height:1.4; }
  p { line-height:1.7; }
  [hidden] { display:none!important; }
  .skip { position:absolute; left:12px; top:-80px; padding:12px; background:white; z-index:20; }
  .skip:focus { top:12px; }
}
@layer layout {
  .wrap { width:min(1200px,calc(100% - 40px)); margin-inline:auto; }
  .lab { padding:9px 20px; display:flex; align-items:center; justify-content:center; gap:8px; font-size:.7rem; letter-spacing:.02em; background:#eee5dc; color:#594d46; text-align:center; line-height:1.5; }
  .demo-banner { background:#352c2a; color:#fff7ef; font-size:.76rem; flex-wrap:wrap; gap:10px; padding:10px 16px; }
  .demo-banner strong { background:#f4d35e; color:#352c2a; padding:3px 9px; border-radius:4px; letter-spacing:.14em; font-size:.72rem; }
  .demo-banner a { text-decoration:underline; text-underline-offset:3px; font-weight:700; white-space:nowrap; }
  .dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#807452; flex:none; }
  .header { padding-block:25px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
  .brand { display:flex; gap:12px; align-items:center; font-family:Georgia,serif; font-size:1.5rem; white-space:nowrap; }
  .brand-mark { color:var(--wine); font-size:2.9rem; line-height:.8; font-style:italic; }
  .brand small { display:block; margin-top:7px; font:8px Arial,sans-serif; letter-spacing:.13em; }
  nav { display:flex; gap:20px; align-items:center; flex-wrap:wrap; font-size:.8rem; }
  nav>a:not(.button):hover { color:var(--wine); text-decoration:underline; text-underline-offset:5px; }
  .hero { display:grid; gap:35px; padding-block:45px; align-items:center; }
  .hero h1 { margin:20px 0; }
  .hero h1 em { color:var(--wine); font-weight:400; }
  .hero-copy>p { max-width:430px; color:var(--muted); font-size:.95rem; }
  .hero-actions { display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:28px; }
  .art { position:relative; min-height:350px; border-radius:170px 170px 10px 10px; background:radial-gradient(ellipse at 70% 10%,#efe0d3,transparent 55%),linear-gradient(135deg,#dcc8b8,#e9d8cc 45%,#c4a69a); overflow:hidden; display:flex; align-items:center; justify-content:center; }
  .art::before { content:''; width:63%; height:75%; position:absolute; border:1px solid #faf7f299; border-radius:180px 180px 0 0; transform:rotate(-13deg); }
  .art::after { content:''; width:52%; height:70%; position:absolute; border:1px solid #faf7f280; border-radius:180px 180px 0 0; transform:rotate(16deg); }
  .bottle { z-index:1; width:98px; height:165px; border-radius:24px 24px 19px 19px; background:linear-gradient(90deg,#815366,#ae7e8b 55%,#7e5262); box-shadow:20px 35px 35px #7d554833; display:flex; justify-content:center; align-items:center; transform:rotate(-9deg); }
  .bottle::before { content:''; width:60px; height:45px; background:linear-gradient(90deg,#a78660,#debd87,#ac875d); position:absolute; top:-38px; border-radius:8px 8px 0 0; }
  .bottle span { font:italic 3.5rem Georgia,serif; color:#fff0e3; }
  .art-note { position:absolute; left:22px; bottom:22px; z-index:2; font-size:.72rem; color:#5c453c; letter-spacing:.1em; }
  .floating-card { position:absolute; right:16px; bottom:42px; z-index:3; padding:17px; background:#fffaf4e8; border:1px solid #fff; border-radius:12px; max-width:190px; box-shadow:0 8px 25px #4e302312; }
  .floating-card strong { display:block; margin:6px 0; font:1.35rem Georgia,serif; }
  .floating-card p { font-size:.7rem; color:var(--muted); }
  .benefits { border-block:1px solid var(--line); display:flex; gap:20px; justify-content:space-between; flex-wrap:wrap; padding-block:20px; font-size:.78rem; color:var(--muted); }
  .benefits span { display:flex; gap:10px; align-items:center; }
  .section { padding-block:50px; }
  .section-head { display:flex; justify-content:space-between; align-items:end; gap:20px; flex-wrap:wrap; margin-bottom:25px; }
  .cards { display:grid; gap:16px; }
  .gift-banner { display:grid; gap:24px; padding:30px; background:var(--soft); border-radius:18px; align-items:center; }
  .gift-banner p { color:var(--muted); margin-block:15px; max-width:480px; }
  .gift-card { aspect-ratio:1.65; max-width:330px; width:100%; margin:auto; padding:25px; border-radius:12px; background:var(--wine); color:#fff3e8; box-shadow:12px 15px 0 #d5bec4; transform:rotate(-5deg); display:flex; flex-direction:column; justify-content:space-between; }
  .gift-card strong { font:italic 2.7rem Georgia,serif; }
  .gift-card span { font-size:.75rem; letter-spacing:.08em; }
  .footer { margin-top:45px; border-top:1px solid var(--line); padding-block:28px; display:flex; gap:20px; justify-content:space-between; align-items:center; flex-wrap:wrap; font-size:.75rem; color:var(--muted); }
  .page-head { padding-block:40px 30px; }
  .page-head h1 { font-size:clamp(2.5rem,5vw,4rem); margin-block:14px; }
  .page-head p { max-width:640px; color:var(--muted); }
  .two-col { display:grid; gap:24px; align-items:start; }
  .stack { display:grid; gap:20px; }
  .admin-grid { display:grid; gap:24px; }
  .stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:25px; }
  .stats strong { display:block; font:2rem Georgia,serif; margin-top:10px; }
  @media(min-width:760px) {
    .hero { grid-template-columns:1.08fr 1fr; gap:70px; padding-block:60px; }
    .art { min-height:480px; }
    .bottle { width:125px; height:205px; }
    .cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .gift-banner { grid-template-columns:1.1fr 1fr; padding:45px; }
    .two-col { grid-template-columns:1.4fr 1fr; }
    .admin-grid { grid-template-columns:1.5fr 1fr; }
    .stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
  }
  @media(max-width:450px) {
    .wrap { width:calc(100% - 32px); }
    .header { gap:22px; }
    nav { gap:15px; width:100%; }
    nav .button { width:100%; }
    .nav-panel { margin-left:auto; }
    .gift-banner { padding:25px; }
    .gift-card { margin-block:15px; }
  }
}
@layer components {
  .eyebrow { display:block; color:var(--wine); font-size:.68rem; letter-spacing:.15em; text-transform:uppercase; font-weight:700; margin-bottom:10px; }
  .button { display:inline-flex; align-items:center; justify-content:center; gap:12px; border:1px solid var(--wine); border-radius:7px; background:var(--wine); color:white; padding:15px 21px; font-size:.85rem; line-height:1.4; font-weight:500; }
  .button:hover { background:#4e2f39; border-color:#4e2f39; }
  .button.secondary { background:transparent; color:var(--wine); }
  .button.secondary:hover { background:var(--soft); }
  .button.small { padding:11px 15px; font-size:.76rem; }
  .text-link { text-decoration:underline; text-underline-offset:5px; font-size:.84rem; padding:12px 0; }
  .fine { font-size:.75rem; color:var(--muted); margin-top:15px; line-height:1.6; }
  .card { background:#fffdfa; border:1px solid var(--line); border-radius:13px; padding:25px; min-width:0; }
  .service-number { width:40px; height:40px; display:grid; place-items:center; font:italic 1.4rem Georgia,serif; border-radius:50%; background:var(--soft); color:var(--wine); margin-bottom:25px; }
  .card h3 { margin-bottom:10px; }
  .card>p { color:var(--muted); font-size:.85rem; }
  .card-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:25px; padding-top:20px; border-top:1px solid var(--line); }
  .card-bottom strong { font-size:.98rem; }
  .card-bottom small { display:block; color:var(--muted); font-weight:400; margin-top:6px; }
  .accent { color:var(--wine); }
  .field { display:grid; gap:8px; font-size:.82rem; margin-bottom:19px; }
  input,select,textarea { width:100%; border:1px solid #cbbdb4; background:white; color:var(--ink); border-radius:7px; padding:13px; min-width:0; }
  textarea { min-height:130px; resize:vertical; }
  .check { display:flex; align-items:start; gap:10px; font-size:.78rem; line-height:1.6; margin:17px 0; }
  .check input { width:18px; height:18px; flex:none; margin-top:2px; accent-color:var(--wine); }
  .slots { display:grid; grid-template-columns:repeat(auto-fill,minmax(83px,1fr)); gap:8px; margin-block:15px 25px; }
  .slot { border:1px solid var(--line); border-radius:7px; padding:12px 8px; background:white; color:var(--ink); }
  .slot[aria-pressed=true] { border-color:var(--wine); color:white; background:var(--wine); }
  .slot:disabled { opacity:.6; }
  .status { display:inline-block; font-size:.68rem; font-weight:700; padding:6px 10px; background:#f4e6cf; color:#785c27; border-radius:20px; }
  .status.paid { background:#e0ebdf; color:var(--green); }
  .status.cancelled,.status.expired { background:#eee7e4; color:#6d6059; }
  .status.payment_review { background:#f7dfdb; color:#913d35; }
  .summary-line { display:flex; justify-content:space-between; gap:20px; padding:15px 0; border-bottom:1px solid var(--line); font-size:.86rem; }
  .summary-line:last-child { border-bottom:0; }
  .summary-line.total { font-size:1.15rem; }
  .alert { border:1px solid #dfceb4; background:#fbf0dd; border-radius:8px; padding:15px; font-size:.8rem; color:#6c5230; line-height:1.6; margin-block:20px; }
  .alert.success { border-color:#c5d9c4; background:#eaf2e7; color:var(--green); }
  .empty { padding:25px; border:1px dashed #cebbb1; border-radius:10px; color:var(--muted); font-size:.85rem; line-height:1.6; }
  .notice { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); background:#352c2a; color:white; padding:16px 24px; border-radius:10px; z-index:10; box-shadow:0 8px 30px #0003; font-size:.85rem; line-height:1.5; }
  .row { border-bottom:1px solid var(--line); padding-block:18px; display:grid; gap:9px; font-size:.85rem; }
  .row:last-child { border-bottom:0; }
  .row-head { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; }
  .row small { color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
  .post-body { white-space:pre-wrap; overflow-wrap:anywhere; }
  .code { display:block; padding:18px; border:1px dashed var(--wine); background:var(--soft); border-radius:7px; font-family:monospace; font-size:1rem; overflow-wrap:anywhere; margin-block:16px; }
  .loading { padding:100px 0; text-align:center; color:var(--muted); }
  .form-error { color:#953c31; font-size:.82rem; line-height:1.5; margin:15px 0; }
  .integration { display:flex; justify-content:space-between; gap:15px; padding-block:15px; border-bottom:1px solid var(--line); font-size:.82rem; }
  .integration span { color:var(--muted); text-align:right; }
}
