@media (min-width:761px) {
  :root {
    --rail: clamp(174px,16vw,216px);
    --cream: #fbf8f2;
    --wine: #641b34;
    --wine-dark: #4c192b;
    --muted: #72655f;
    --line: #e8ded5;
    --rose: #f2e7e4;
  }
  body {font:450 1rem/1.48 var(--font)}
  .rail {
    background:linear-gradient(145deg,#f4ece2,#f8f3ea 58%,#f2eadf);
    border-right:1px solid #e9dfd3;
    padding-top:clamp(13px,2.6vh,29px);
  }
  .brand-home {width:fit-content;max-width:100%;text-decoration:none;border-radius:20px}
  .rail .railnav {padding:clamp(26px,4.5vh,48px) 13px 10px;gap:4px}
  .rail .nav-link {
    color:#655b55;gap:10px;min-height:44px;padding:9px 11px;
    border-radius:13px 24px 24px 13px;font:520 1.04rem/1.26 var(--font);
  }
  .rail .nav-link svg {width:21px;height:21px;stroke-width:1.75;flex-shrink:0}
  .rail .nav-link:hover {background:#eee5dc;color:var(--wine)}
  .rail .nav-link[aria-current=page] {color:var(--wine);background:#ebded8;font-weight:700}
  .rail .railnav:has([href="#history"])>[href="#guests"] {margin-top:19px}
  .rail-account {
    margin:auto 18px 18px;
    padding-top:11px;border-top:1px solid #e1d6c9;display:flex;align-items:center;justify-content:space-between;gap:3px;
  }
  .rail-account .profile {margin:0;min-height:44px;padding:2px;color:var(--ink);font:550 1rem/1.25 var(--font)}
  .rail-account .profile svg {box-sizing:content-box;width:17px;height:17px;padding:8px;border:1px solid #d9c3bf;border-radius:50%;color:var(--wine)}
  .rail-search {background:transparent;border:0;color:var(--muted);width:44px;height:44px;border-radius:50%;flex:none}
  .rail-search:hover {background:#ece3d8;color:var(--wine)}
  .app .top {display:none}
  .app main {width:min(100%,1240px);padding:clamp(35px,5.6vh,70px) clamp(30px,4.2vw,76px) 70px}
  .page-head {margin:0 0 25px;gap:14px 18px}
  .page-head h1,.login-card h1 {font:840 clamp(2.15rem,3.1vw,3rem)/1.14 var(--font-headline);letter-spacing:-.025em;color:var(--wine-dark)}
  main h1[tabindex="-1"]:focus,dialog h2[tabindex="-1"]:focus {outline:0}
  .subtitle {font-size:1rem;margin-top:8px}
  .panel,.recipe-cover {border:1px solid var(--line);border-radius:24px;background:#fffdfa}
  .panel:has(.meal-row),.panel:has(.checkrow) {border-top:1px solid var(--line)}
  .panel-head {min-height:54px;padding:13px 20px;border-color:var(--line)}
  .panel-head h2,.recipe-sections h2,.summary-title {font:710 clamp(1.18rem,1.65vw,1.44rem)/1.25 var(--font-title);letter-spacing:-.012em}
  .summary {border-radius:23px 44px 23px 23px}
  .app .btn,.modal .btn,.login .btn,.app .link,.modal .link {font-family:var(--font);font-weight:600;font-size:1rem}
  .app .btn.primary,.modal .btn.primary,.login .btn.primary {font-weight:700}
  .app .btn,.modal .btn,.login .btn {min-height:44px;border-radius:24px;padding:9px 18px}
  .app .link,.modal .link {min-height:44px}
  .periods {border:0;border-radius:28px;background:#f0e9e2}
  .periods button {min-height:42px;border-radius:24px;font:535 1rem/1.25 var(--font)}
  .periods .chosen,.periods [aria-pressed=true] {font-weight:700;background:#fffcf7;color:var(--wine);box-shadow:0 1px 5px #4d283912}
  .app .filter-toggle,.modal .choice-filter-menu summary {font:600 1rem/1.25 var(--font);border-radius:17px;background:#eee5dd;color:var(--wine)}
  .app .filter-toggle[aria-expanded=true] {background:var(--wine);color:white}
  .library-search {margin-bottom:22px}
  .library-filters {background:#fffdfa;border-radius:21px;margin-bottom:22px}
  .library-filters .chip {font:560 1rem/1.25 var(--font)}
  .recipe-gallery {grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 21px}
  .recipe-gallery .recipe-tile {border:0;background:none;border-radius:0;overflow:visible}
  .recipe-gallery .recipe-open {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;border-radius:24px}
  .recipe-gallery .recipe-open:hover .recipe-caption strong {color:var(--wine);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
  .recipe-tile-photo {width:100%;aspect-ratio:1.75;border-radius:24px 48px 24px 24px}
  .recipe-caption {padding:10px 1px 0;gap:3px}
  .recipe-caption strong {font:680 1.15rem/1.27 var(--font-title);letter-spacing:-.008em}
  .recipe-caption small {font:450 1rem/1.35 var(--font)}
  .with-photo .recipe-plus {right:12px;top:11px;background:#fffaf3f2;box-shadow:none}
  .library-list {grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}
  .text-tile {border-width:0 0 1px;border-radius:0;background:transparent;overflow:visible}
  .text-tile .recipe-caption {padding-block:12px}
  .text-tile .recipe-plus {background:transparent}
  .recipe-pager {display:flex;align-items:center;justify-content:center;gap:14px;margin-top:18px;color:var(--muted);font:400 1rem/1 var(--font)}
  .recipe-pager button {width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--wine)}
  .recipe-pager button:enabled:hover,.with-photo .recipe-plus:hover {background:var(--rose)}
  .recipe-pager button:disabled {opacity:.3;cursor:default}
  .library-search>label,.choice-search {border-radius:20px;background:#fffdfa}
  .week-grid .panel {border-radius:26px}
  .week-day {border-radius:14px}
  .recipe-cover .detail-photo {border-radius:21px 54px 21px 21px}
  .kitchen-fold,.recipe-fold,.pantry-list {border-radius:19px}
  .week-grid .mini-photo {border-radius:15px;object-fit:cover}
  .week-day {background:transparent;border-color:transparent}
  .week-day:hover,.week-day.selected {background:var(--rose);color:var(--wine)}
  .history-day:focus-visible,.week-day:focus-visible {outline-offset:-2px}
  .app .chip,.modal .chip,.app .link,.modal .link {border-radius:18px}
  .app .recipe-fold,.app .kitchen-fold,.modal .form-optional {background:#fffdfa}
  .recipe-cover .photo-empty,.modal .ingredient-edit,.modal .dish-form-row {border-radius:17px}
  .modal .notice,#toast:not(:empty) {border-radius:16px}
  .modal input[type=file]::file-selector-button {
    margin-right:9px;padding:6px 12px;border:0;border-radius:18px;
    background:var(--rose);color:var(--wine);font:inherit;cursor:pointer;
  }
  dialog.modal {
    border:1px solid var(--line);border-radius:30px;box-shadow:0 18px 90px #38212826;
    background:#fffcf8;
  }
  dialog::backdrop {background:#30242659}
  .modal .sheet-top {padding:18px 22px 4px}
  .modal .sheet-top h2 {font:730 1.54rem/1.22 var(--font-title);letter-spacing:-.016em}
  .sheet-x {background:#f1e8e0}
  .modal-body {padding:13px 22px 19px}
  .modal-inner .modal-actions {padding:13px 22px;background:#fffcf8}
  .modal-body .field,.app .field,.login .field {font-size:1rem;font-weight:590}
  .modal :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
  :is(.app,.login) .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
    min-height:44px;border-radius:14px;font:450 1rem/1.4 var(--font);
  }
  .modal .choice-card {background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;min-width:0}
  .modal .choice-card:hover,.modal .choice-card:focus-visible {background:#f5eee7;border-radius:14px}
  .modal .choice-types button,.modal .choice-filter-menu summary,.modal .choice-extra summary,.modal .choice-preparation summary {font-weight:585}
  .modal .choice-card b {font-size:1.09rem;font-weight:680}
  .modal .choice-image {border-radius:15px 23px 15px 15px}
  .login-card {padding:36px 38px;border-radius:31px 55px 31px 31px;background:#fffcf8}
  .login-card h1 {font-size:2.15rem}
}
@media (min-width:761px) and (max-width:1000px) {
  .app main {padding-inline:25px}
  .rail .railnav {padding-inline:8px}
  .recipe-gallery {grid-template-columns:repeat(2,minmax(0,1fr))}
  .recipe-tile-photo {aspect-ratio:1.9}
}
