:root {
  color-scheme: dark;
  --bg: #0A0A0C;
  --panel: #161619;
  --border: #343438;
  --text: #F7F7F8;
  --muted: #AEAEB2;
  --accent: #E8A87C;
  --green: #70DD8B;
  --red: #FFB4AC;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

button, input, textarea {
  font: inherit;
}

button, a, input, textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .5;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button {
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: #212124;
  font-size: 18px;
  font-weight: 600;
  min-height: 46px;
  padding: 10px 16px;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #17110D;
}

.primary:hover:not(:disabled) {
  background: #F3BA92;
}

.secondary {
  background: #2B2B30;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-header {
  min-height: 74px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -.03em;
}

.brand img {
  border-radius: 9px;
}

.header-actions {
  display: flex;
  gap: 40px;
  align-items: center;
}

.header-actions a {
  font-size: 18px;
  font-weight: 600;
}

.header-actions button {
  min-width: 146px;
}

main {
  padding: 26px 22px 24px;
  max-width: 1600px;
  margin: auto;
}

.intro {
  margin: 0 8px 22px;
}

h1 {
  font-size: clamp(34px,3.5vw,52px);
  line-height: 1.15;
  letter-spacing: -.035em;
  margin: 0 0 2px;
  font-weight: 760;
}

.lead {
  font-size: clamp(20px,1.85vw,28px);
  color: var(--muted);
  margin: 0 0 8px;
}

.local-note {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(245px,.92fr) minmax(300px,1.25fr) minmax(420px,2fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: var(--panel);
  min-width: 0;
}

h2 {
  font-size: 29px;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 740;
}

.section-note {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 14px;
}

.bar-panel {
  padding: 20px 25px;
}

.bar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

#inventory-toggle {
  display: none;
}

.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.inventory-option {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  min-height: 36px;
  cursor: pointer;
}

.inventory-option input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}

.shopping-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.shopping-section h2 {
  font-size: 26px;
}

.shopping-list {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.shopping-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.shopping-item button {
  font-size: 13px;
  padding: 6px 9px;
  min-height: 38px;
  flex-shrink: 0;
}

.recipes-panel h2 {
  margin-bottom: 18px;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1D1D20;
  border: 1px solid #606065;
  border-radius: 10px;
  padding: 0 13px;
  min-height: 47px;
}

.search svg {
  width: 21px;
  height: 21px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.search input {
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  min-width: 0;
  width: 100%;
  padding: 10px 0;
  font-size: 18px;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.search input:focus-visible {
  outline: none;
}

.filters {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.filters button {
  flex: 1;
  font-size: 17px;
  padding: 9px 12px;
  font-weight: 500;
  background: transparent;
}

.filters button[aria-pressed=true] {
  border-color: var(--accent);
  background: #33291F;
  color: #F7CEAE;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
  font-size: 19px;
  padding: 13px 16px;
  min-height: 55px;
  background: #222225;
  border-color: #515156;
}

.recipe-button[aria-current=true] {
  background: #2C2620;
  border: 2px solid var(--accent);
  padding: 12px 15px;
}

.recipe-button .availability {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-align: right;
  flex-shrink: 0;
}

.recipe-button .availability.ready {
  color: var(--green);
  font-weight: 600;
}

.availability svg, .recipe-status svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  vertical-align: -2px;
  margin-right: 4px;
}

.empty-results {
  color: var(--muted);
  font-size: 17px;
}

.empty-results .text-button {
  font-size: 16px;
}

.detail-panel {
  padding: 22px 20px 20px;
}

.recipe-media {
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 10px;
  background: #222226;
  display: flex;
  justify-content: center;
  align-items: center;
}

.recipe-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}

.recipe-media svg {
  width: 80px;
  height: 80px;
  stroke: var(--accent);
  stroke-width: 1.3;
  fill: none;
  opacity: .8;
}

.recipe-heading h2 {
  font-size: 36px;
  margin: 0;
  line-height: 1.15;
}

.recipe-heading .section-note {
  margin: 2px 0;
  font-size: 18px;
}

.recipe-status {
  font-size: 19px;
  color: var(--muted);
  margin: 5px 0 14px;
  min-height: 28px;
}

.recipe-status.ready {
  color: var(--green);
}

.measure-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 18px;
  font-weight: 650;
}

.stepper, .unit-toggle {
  border: 1px solid #505055;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 2px;
  background: #202024;
}

.stepper button {
  width: 44px;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 27px;
  font-weight: 400;
}

.stepper output {
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
}

.unit-toggle button {
  min-height: 44px;
  min-width: 56px;
  border: 0;
  background: transparent;
  padding: 3px 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.unit-toggle button[aria-pressed=true] {
  background: var(--accent);
  color: #17110D;
  font-weight: 650;
  border-radius: 7px;
}

.ingredient-heading {
  font-size: 14px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 1px;
}

.ingredients {
  margin: 0 0 18px;
}

.ingredient-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  font-size: 19px;
}

.ingredient-row dt {
  min-width: 0;
}

.ingredient-row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: 18px;
  white-space: nowrap;
}

.ingredient-row.optional {
  color: var(--muted);
  font-size: 15px;
}

.ingredient-row.optional dd {
  font-size: 15px;
}

.optional-label {
  font-size: 12px;
  color: var(--muted);
}

.method h2 {
  font-size: 27px;
  margin-bottom: 4px;
}

.method p {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.method .garnish {
  font-size: 15px;
  margin-top: 7px;
}

.recipe-actions {
  display: flex;
  gap: 18px;
  margin-top: 20px;
}

.recipe-actions button {
  flex: 1;
  font-size: 17px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
}

.recipe-actions svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  flex-shrink: 0;
}

.limits {
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 13px;
  margin: 24px 0 0;
}

.feedback {
  color: var(--accent);
  font-size: 16px;
  margin: 12px 0 0;
  min-height: 24px;
}

.demo-footer {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 0;
}

.demo-footer a {
  color: var(--accent);
}

.manual-copy {
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 12px;
  max-width: 750px;
  margin: 12px 0;
}

.manual-copy label {
  display: block;
  font-weight: 650;
  margin-bottom: 10px;
}

.manual-copy textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 16px;
  margin-bottom: 12px;
}

.notice {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
}

dialog {
  width: min(480px,calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  padding: 28px;
}

dialog::backdrop {
  background: rgba(0,0,0,.75);
}

dialog p {
  font-size: 17px;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.dialog-actions button {
  font-size: 16px;
}

.skip {
  position: fixed;
  left: 14px;
  top: -80px;
  z-index: 20;
  background: var(--accent);
  color: #17110D;
  font-size: 16px;
  font-weight: 650;
  padding: 12px;
  border-radius: 8px;
}

.skip:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none!important;
}

@media (max-width:1200px) {
  .workspace {
    grid-template-columns: minmax(220px,.85fr) minmax(250px,1fr) minmax(360px,1.65fr);
    gap: 12px;
  }
  .panel {
    padding: 18px;
  }
  .recipe-button {
    font-size: 17px;
    padding: 12px;
  }
  .recipe-button[aria-current=true] {
    padding: 11px;
  }
  .recipe-button .availability {
    font-size: 12px;
    max-width: 70px;
  }
  .inventory-option {
    font-size: 16px;
    gap: 9px;
  }
  .recipe-actions {
    gap: 10px;
  }
  .recipe-actions button {
    font-size: 15px;
  }
  .measure-controls {
    gap: 10px;
  }
  .stepper output {
    min-width: 30px;
  }
}

@media (max-width:1000px) {
  .workspace {
    grid-template-columns: minmax(250px,1fr) minmax(350px,1.5fr);
    gap: 16px;
  }
  .bar-panel {
    grid-column: 1/-1;
  }
  .bar-heading {
    margin-bottom: 4px;
  }
  #inventory-toggle {
    display: block;
    font-size: 16px;
  }
  .inventory-list {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 4px 16px;
  }
  .shopping-section {
    margin-top: 18px;
    padding-top: 16px;
  }
  .shopping-section h2 {
    font-size: 23px;
  }
  .shopping-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .shopping-item {
    gap: 12px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .shopping-section .section-note {
    margin-bottom: 0;
  }
  .bar-panel .section-note {
    font-size: 16px;
  }
  .inventory-option {
    min-height: 44px;
  }
  .recipe-button .availability {
    font-size: 13px;
    max-width: 90px;
  }
  .recipe-media {
    height: 180px;
  }
}

@media (max-width:700px) {
  body {
    font-size: 16px;
  }
  .app-header {
    padding: 10px 16px;
    min-height: 68px;
    gap: 12px;
  }
  .brand {
    font-size: 25px;
    gap: 7px;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .header-actions {
    gap: 14px;
  }
  .header-actions a {
    font-size: 13px;
  }
  .header-actions button {
    min-width: 0;
    padding: 8px 10px;
    font-size: 14px;
    min-height: 44px;
  }
  main {
    padding: 24px 14px;
  }
  .intro {
    margin: 0 2px 22px;
  }
  h1 {
    font-size: 36px;
    max-width: 550px;
  }
  .lead {
    font-size: 19px;
    line-height: 1.4;
    margin-top: 9px;
  }
  .local-note {
    font-size: 14px;
    margin-top: 11px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .panel {
    padding: 18px;
    border-radius: 14px;
  }
  h2 {
    font-size: 26px;
  }
  .bar-panel h2 {
    font-size: 25px;
  }
  .inventory-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 3px 12px;
  }
  .inventory-option {
    font-size: 14px;
    gap: 8px;
    min-height: 44px;
  }
  .inventory-option input {
    width: 21px;
    height: 21px;
  }
  .shopping-section h2 {
    font-size: 22px;
  }
  .shopping-item {
    font-size: 14px;
  }
  .search input {
    font-size: 16px;
  }
  .recipes-panel h2 {
    margin-bottom: 13px;
  }
  .recipe-list {
    gap: 8px;
  }
  .recipe-button {
    font-size: 18px;
    min-height: 52px;
    padding: 11px 13px;
  }
  .recipe-button[aria-current=true] {
    padding: 10px 12px;
  }
  .recipe-button .availability {
    max-width: none;
    font-size: 13px;
  }
  .filters {
    margin-bottom: 14px;
  }
  .detail-panel {
    scroll-margin-top: 18px;
  }
  .recipe-media {
    height: 185px;
    margin-bottom: 14px;
  }
  .recipe-heading h2 {
    font-size: 33px;
  }
  .recipe-status {
    font-size: 17px;
  }
  .measure-controls {
    gap: 12px;
    margin-top: 17px;
  }
  .stepper button {
    width: 44px;
    min-height: 44px;
  }
  .unit-toggle button {
    min-height: 44px;
    min-width: 47px;
  }
  .ingredient-row {
    font-size: 17px;
  }
  .ingredient-row dd {
    font-size: 16px;
  }
  .method p {
    font-size: 16px;
  }
  .recipe-actions {
    gap: 10px;
    flex-direction: column;
  }
  .recipe-actions button {
    min-height: 48px;
    font-size: 16px;
  }
  .limits {
    font-size: 13px;
    margin-top: 20px;
  }
  .demo-footer {
    font-size: 13px;
    line-height: 1.6;
  }
  .dialog-actions {
    flex-direction: column;
  }
  .dialog-actions button {
    width: 100%;
  }
}

@media (max-width:360px) {
  .app-header {
    padding: 10px 12px;
  }
  .brand {
    font-size: 23px;
  }
  .header-actions {
    gap: 9px;
  }
  .header-actions a {
    font-size: 12px;
  }
  .header-actions button {
    font-size: 12px;
    padding: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  main {
    padding: 22px 12px;
  }
  .panel {
    padding: 15px;
  }
  .inventory-list {
    grid-template-columns: 1fr;
  }
  .recipe-button {
    font-size: 16px;
  }
  .recipe-button .availability {
    font-size: 11px;
  }
  h1 {
    font-size: 33px;
  }
  .lead {
    font-size: 18px;
  }
  .bar-heading {
    gap: 6px;
  }
  #inventory-toggle {
    font-size: 14px;
  }
  .control-label {
    font-size: 15px;
  }
  .measure-controls {
    gap: 8px;
  }
}

@media (prefers-reduced-motion:no-preference) {
  button, a {
    transition: background-color .15s,border-color .15s;
  }
  html {
    scroll-behavior: smooth;
  }
}
