@layer base, layout, components, responsive;
@layer base {
  :root { color-scheme: dark; --bg:#0c0c0e; --panel:#151518; --panel-2:#1c1b1b; --ink:#f3f0e9; --muted:#aaa69e; --gold:#f3bb46; --line:#343234; --warm:#ffe0a0; font-family:Arial,Helvetica,sans-serif; }
  * { box-sizing:border-box; }
  html { scroll-behavior:smooth; scroll-padding-top:0; }
  body { margin:0; background:var(--bg); color:var(--ink); font-size:16px; line-height:1.5; }
  a { color:inherit; text-decoration:none; }
  button,input,select { font:inherit; }
  button,a,input { -webkit-tap-highlight-color:transparent; }
  button { cursor:pointer; }
  :focus-visible { outline:3px solid var(--gold); outline-offset:5px; }
  img { display:block; max-width:100%; }
  h1,h2,h3,p { margin:0; }
  [hidden] { display:none !important; }
  ::selection { background:var(--gold); color:#171005; }
  .skip { position:fixed; top:-80px; left:24px; z-index:100; background:var(--gold); color:#171005; padding:12px 20px; }
  .skip:focus { top:12px; }
}
@layer layout {
  .wrap { width:min(1240px,calc(100% - 80px)); margin-inline:auto; }
  .header { border-bottom:1px solid var(--line); }
  .header-inner { height:100px; display:flex; align-items:center; justify-content:space-between; gap:32px; }
  .brand img { width:142px; height:71px; object-fit:contain; }
  .header-label { color:var(--muted); text-transform:uppercase; font-size:12px; letter-spacing:.2em; padding-left:28px; border-left:1px solid var(--line); margin-right:auto; }
  .header-link { font-size:14px; color:var(--warm); padding:10px 0; border-bottom:1px solid #8e6c29; }
  .hero { display:grid; grid-template-columns:1.2fr .8fr; align-items:center; gap:60px; min-height:350px; padding-block:46px; }
  .eyebrow { color:var(--gold); font-size:12px; font-weight:700; letter-spacing:.18em; text-transform:uppercase; display:flex; align-items:center; gap:12px; }
  .eyebrow::before { content:''; width:24px; height:2px; background:var(--gold); }
  h1 { font-size:clamp(46px,6.6vw,82px); line-height:.99; letter-spacing:-.065em; font-weight:800; margin:20px 0; }
  h1 span { color:var(--gold); }
  .hero-copy { color:var(--muted); max-width:430px; font-size:17px; }
  .hero-art { width:280px; height:280px; justify-self:center; object-fit:contain; filter:drop-shadow(0 0 36px #f3bb4610); }
  .catalog-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:48px; align-items:start; margin:38px 0 84px; }
  .catalog-nav { position:sticky; top:28px; max-height:calc(100vh - 56px); overflow-y:auto; padding-right:10px; scrollbar-width:thin; scrollbar-color:#5c4b2d transparent; }
  .catalog-nav h2 { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin:4px 0 18px; }
  .catalog-nav a { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; margin-left:-12px; border-radius:6px; font-size:14px; color:var(--muted); }
  .catalog-nav a:hover,.catalog-nav a[aria-current] { background:#f3bb4610; color:var(--gold); }
  .nav-count { font-size:12px; opacity:.6; font-variant-numeric:tabular-nums; }
  .category { padding-top:5px; margin-bottom:48px; scroll-margin-top:26px; }
  .category-head { display:flex; align-items:baseline; justify-content:space-between; gap:20px; margin-bottom:20px; }
  .category-head h2 { font-size:28px; letter-spacing:-.035em; }
  .category-index { font-family:Consolas,monospace; color:var(--gold); font-size:13px; margin-right:12px; }
  .category-count { color:var(--muted); font-size:13px; white-space:nowrap; }
  .footer { border-top:1px solid var(--line); padding-block:30px; }
  .footer-inner { display:flex; justify-content:space-between; align-items:center; gap:20px; color:var(--muted); font-size:13px; }
  .footer-logo { width:84px; height:42px; object-fit:contain; }
}
@layer components {
  .main-nav { display:flex; align-items:center; gap:8px; }
  .main-nav a { font-size:14px; color:var(--muted); border-radius:6px; padding:10px 17px; }
  .main-nav a[aria-current] { color:var(--gold); background:#f3bb4610; }
  .main-nav a:hover { color:var(--ink); }
  .price-table { width:100%; border-collapse:collapse; text-align:left; }
  .price-table th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; font-weight:400; background:#ffffff03; padding:13px 22px; }
  .price-table th:not(:first-child),.price-table td:not(:first-child) { text-align:right; width:24%; }
  .price-table td { padding:17px 22px; border-top:1px solid #ffffff0b; }
  .price-table .price { font-size:17px; }
  .price-table tr:hover td { background:#ffffff02; }
  .capacity-head { display:flex; align-items:center; gap:12px; }
  .vip-tag { font-size:10px; font-weight:700; letter-spacing:.15em; padding:3px 7px; border:1px solid #806229; border-radius:3px; color:var(--gold); }
  .catalog-toolbar { display:flex; gap:24px; align-items:center; justify-content:space-between; border-block:1px solid var(--line); padding-block:22px; }
  .catalog-label { font-size:14px; color:var(--muted); }
  .catalog-label strong { color:var(--ink); }
  .search { position:relative; width:min(370px,100%); }
  .search svg { position:absolute; left:15px; top:14px; pointer-events:none; color:var(--muted); }
  .search input { width:100%; height:48px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:var(--panel); padding:10px 14px 10px 44px; outline-offset:3px; }
  .search input::placeholder { color:#a7a39a; }
  .price-list { border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--panel); }
  .price-row { display:flex; justify-content:space-between; align-items:center; gap:28px; padding:20px 24px; }
  .price-row + .price-row { border-top:1px solid #ffffff0b; }
  .price-row:hover { background:#ffffff02; }
  .item-name { font-size:16px; font-weight:600; }
  .item-note { color:var(--muted); font-size:14px; line-height:1.5; margin-top:5px; max-width:560px; white-space:pre-line; }
  .price { font-size:22px; font-weight:700; color:var(--warm); letter-spacing:-.03em; white-space:nowrap; font-variant-numeric:tabular-nums; }
  .price small { font-size:14px; color:var(--muted); font-weight:400; letter-spacing:0; }
  .price.missing { white-space:normal; text-align:right; font-size:14px; color:var(--muted); letter-spacing:0; }
  .category-note { color:var(--muted); padding:15px 18px; border-left:2px solid #977331; background:#f3bb4606; font-size:14px; margin-top:16px; white-space:pre-line; }
  .tier-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  .tier { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:24px; position:relative; min-width:0; }
  .tier:last-child { border-color:#98722f; background:linear-gradient(140deg,#30251770,var(--panel) 65%); }
  .tier h3 { font-size:17px; margin-bottom:20px; }
  .tier .price { font-size:34px; }
  .tier .item-note { border-top:1px solid var(--line); padding-top:18px; margin-top:22px; }
  .empty { padding:60px 20px; border:1px dashed var(--line); border-radius:10px; text-align:center; }
  .empty h2 { font-size:24px; margin-bottom:8px; }
  .empty p { color:var(--muted); }
  .empty button { background:var(--gold); color:#171005; border:0; border-radius:6px; padding:11px 18px; margin-top:24px; font-weight:700; }
  .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .editor-bar { display:flex; align-items:center; justify-content:flex-end; gap:16px; font-size:13px; color:var(--muted); padding-top:14px; min-height:38px; }
  .editor-bar:has(#login[hidden]):has(#logout[hidden]):has(#new-category[hidden]):has(#retry-session[hidden]) { display:none; }
  .editor-bar a,.editor-bar button { color:var(--warm); border:1px solid var(--line); border-radius:6px; padding:8px 12px; background:var(--panel); }
  .notice { margin-top:20px; padding:14px 18px; background:#f3bb4610; border:1px solid #8e6c29; border-radius:6px; color:var(--warm); font-size:14px; }
  .edit-item { display:block; color:var(--gold); border:0; padding:3px 0; margin-top:4px; background:transparent; font-size:12px; text-decoration:underline; text-underline-offset:3px; }
  dialog { color:var(--ink); background:var(--panel); border:1px solid #645034; border-radius:14px; padding:28px; width:min(540px,calc(100% - 32px)); max-height:calc(100dvh - 40px); overflow:auto; box-shadow:0 24px 100px #0009; }
  dialog::backdrop { background:#000b; backdrop-filter:blur(4px); }
  .dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
  .dialog-head h2 { font-size:28px; line-height:1.2; margin-top:12px; }
  .dialog-head .eyebrow { font-size:10px; }
  .dialog-head button { border:0; background:none; color:var(--muted); font-size:28px; padding:0 5px; line-height:1; }
  .dialog-copy { color:var(--muted); font-size:14px; margin:20px 0; }
  .edit-fields { display:flex; gap:16px; }
  .item-name-field { margin-bottom:18px; }
  .edit-fields label { flex:1; min-width:0; color:var(--muted); font-size:13px; }
  .edit-fields input { margin-top:8px; width:100%; padding:12px; border:1px solid #686053; border-radius:6px; background:var(--bg); color:var(--ink); font-size:19px; }
  .edit-message { color:var(--warm); font-size:14px; margin-top:16px; }
  .edit-message:empty { display:none; }
  .dialog-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; flex-wrap:wrap; }
  .dialog-actions button { border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); padding:11px 16px; font-size:14px; }
  .dialog-actions .primary { color:#171005; background:var(--gold); border-color:var(--gold); font-weight:700; }
  button:disabled { opacity:.55; cursor:wait; }
  dialog details { border-top:1px solid var(--line); margin-top:24px; padding-top:18px; color:var(--muted); font-size:13px; }
  dialog summary { cursor:pointer; }
  dialog ol { padding-left:18px; margin-bottom:0; }
  dialog li { margin-top:12px; }
}
@layer responsive {
  @media (min-width:1440px) { .hero { min-height:390px; } }
  @media (max-width:1000px) { .wrap { width:calc(100% - 48px); } .catalog-layout { grid-template-columns:180px minmax(0,1fr); gap:26px; } .tier-grid { grid-template-columns:1fr; } .tier { display:grid; grid-template-columns:1fr auto; gap:12px; } .tier h3 { margin:0; } .tier .item-note { grid-column:1/-1; margin-top:0; } }
  @media (max-width:700px) {
    html { scroll-padding-top:20px; }
    .wrap { width:calc(100% - 36px); }
    .header-inner { height:83px; gap:16px; }
    .brand img { width:113px; height:57px; }
    .header-label { display:none; }
    .header-link { font-size:13px; }
    .hero { grid-template-columns:1fr; gap:0; padding:38px 0 30px; min-height:0; position:relative; }
    .hero-art { position:absolute; width:144px; height:144px; top:28px; right:-5px; opacity:.28; z-index:-1; }
    h1 { font-size:58px; margin:18px 0; }
    .hero-copy { font-size:16px; max-width:320px; }
    .catalog-toolbar { align-items:stretch; flex-direction:column; gap:14px; padding:20px 0; }
    .search { width:100%; }
    .catalog-layout { grid-template-columns:1fr; gap:28px; margin-top:22px; margin-bottom:48px; }
    .catalog-nav { position:static; max-height:none; padding:0; overflow:visible; }
    .catalog-nav h2 { display:none; }
    .catalog-nav nav { display:flex; overflow-x:auto; gap:8px; padding:2px 2px 12px; scrollbar-color:#5c4b2d transparent; }
    .catalog-nav a { flex:0 0 auto; margin:0; border:1px solid var(--line); padding:9px 13px; white-space:nowrap; }
    .nav-count { display:none; }
    .category { margin-bottom:34px; }
    .category-head { gap:10px; margin-bottom:14px; }
    .category-head h2 { font-size:24px; }
    .category-index { margin-right:8px; }
    .category-count { font-size:12px; }
    .price-row { padding:18px 16px; gap:16px; }
    .price-table th,.price-table td { padding:14px 12px; }
    .price-table th { font-size:11px; letter-spacing:0; }
    .price-table .price { font-size:14px; }
    .price-table .item-name { font-size:14px; }
    .main-nav a { font-size:13px; padding:8px 10px; }
    .item-name { font-size:15px; }
    .price { font-size:20px; }
    .footer-inner { align-items:flex-start; flex-wrap:wrap; }
    .footer-copy { max-width:235px; text-align:right; }
  }
  @media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
  @media print { :root { color-scheme:light; --bg:#fff; --ink:#171717; --panel:#fff; --warm:#171717; --muted:#555; --line:#ccc; } .header,.hero-art,.search,.catalog-nav,.footer,.skip { display:none; } .wrap { width:100%; } .hero { min-height:0; display:block; padding:0 0 24px; } h1 { font-size:36px; } .catalog-layout { display:block; } .category,.price-row { break-inside:avoid; } .price { color:#171717; } }
}

@layer layout {
  .header { position:sticky; top:0; z-index:20; background:var(--bg); }
  .header-inner { height:80px; }
  .brand img { width:124px; height:62px; }
  .hero { min-height:235px; grid-template-columns:minmax(0,1fr) 190px; padding-block:24px; gap:28px; }
  h1 { font-size:clamp(36px,4.4vw,60px); line-height:1.05; margin:14px 0; letter-spacing:-.055em; }
  .hero-copy { max-width:600px; font-size:16px; }
  .hero-art { width:180px; height:180px; }
  .catalog-layout { margin-top:26px; }
  .catalog-nav { top:184px; max-height:calc(100dvh - 206px); }
  .category,.catalog-layout #catalogo { scroll-margin-top:184px; }
  .category-heading { min-width:0; }
  .category-heading h2 { overflow-wrap:anywhere; }
}
@layer components {
  .catalog-toolbar { position:sticky; top:80px; z-index:15; background:var(--bg); padding-block:15px; min-height:82px; }
  .catalog-label { min-width:0; }
  .catalog-unit { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
  #reset-filters { border:0; background:none; padding:5px 0 0; color:var(--gold); font-size:12px; }
  .search { flex-shrink:0; }
  .mobile-category { display:none; }
  .notice { position:fixed; bottom:22px; right:22px; z-index:40; width:min(430px,calc(100% - 44px)); margin:0; background:#292216; box-shadow:0 8px 30px #0008; }
  .edit-category { border:0; background:transparent; color:var(--muted); text-decoration:underline; text-underline-offset:3px; padding:5px 0; font-size:12px; }
  .edit-category:hover { color:var(--gold); }
}
@layer responsive {
  .is-filtered .hero { display:none; }
  @media (min-width:1440px) { .hero { min-height:250px; } }
  @media (max-width:700px) {
    .header-inner { height:72px; }
    .brand img { width:104px; height:52px; }
    .hero { display:block; min-height:0; padding:24px 0; }
    h1 { font-size:42px; margin:12px 0; max-width:330px; }
    .hero-art { width:120px; height:120px; top:14px; right:0; opacity:.12; }
    .hero-copy { max-width:350px; font-size:14px; }
    .catalog-toolbar { top:72px; display:grid; grid-template-columns:1fr; gap:10px; padding-block:12px; }
    .catalog-label { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; }
    .catalog-unit { display:none; }
    #reset-filters { margin-left:auto; padding:0; }
    .search input { height:44px; font-size:14px; }
    .search svg { top:12px; }
    .mobile-category { display:block; }
    .mobile-category select { width:100%; background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:7px; padding:10px 12px; font-size:14px; }
    .catalog-nav { display:none; }
    .catalog-layout { margin-top:22px; }
    .category,.catalog-layout #catalogo { scroll-margin-top:246px; }
    .category-head h2 { font-size:22px; }
    .editor-bar { padding-top:10px; }
    .notice { bottom:14px; right:14px; width:calc(100% - 28px); }
  }
  @media print { .catalog-toolbar,.editor-bar,.edit-item,.edit-category,.notice { display:none; } .hero { min-height:0; } }
}

@layer components {
  .editor-bar { gap:14px; flex-wrap:wrap; }
  #new-category { color:var(--gold); border:1px solid #66502c; background:#221d13; border-radius:7px; padding:9px 13px; }
  .item-group + .item-group { margin-top:24px; }
  .group-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; padding:6px 0; }
  .group-heading h3 { margin:0; color:var(--gold); font-size:17px; font-weight:600; }
  .group-heading span { color:var(--muted); font-size:12px; }
  .category-empty { border:1px dashed var(--line); border-radius:10px; padding:22px; color:var(--muted); }
  .category-empty p { margin:0; }
  .add-item { display:block; margin-top:14px; border:1px dashed #61502f; background:#1a1813; border-radius:7px; padding:11px 16px; color:var(--gold); }
  .add-item:hover,#new-category:hover { background:#302819; }
  .edit-fields select { width:100%; min-width:0; border:1px solid var(--line); background:var(--panel); color:var(--ink); border-radius:7px; padding:12px; font:inherit; }
  .full-field { grid-column:1 / -1; }
  #item-create .edit-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 16px; }
  #category-create .edit-fields { display:grid; grid-template-columns:1fr; gap:18px; }
  .edit-fields select { margin-top:8px; }
}
@layer responsive {
  @media (max-width:700px) { .group-heading h3 { font-size:16px; } #new-category { margin-left:auto; } }
  @media print { .add-item { display:none; } }
}
@layer components {
  .category-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
  .category-tools .add-item { margin:0; padding:8px 10px; font-size:12px; }
}
