:root {
  color-scheme: dark;
  --navy: #020905;
  --navy-2: #06170f;
  --ink: #fff2d5;
  --muted: #d6c7aa;
  --quiet: #9a8f79;
  --paper: #06170f;
  --panel: #082718;
  --line: rgba(211, 156, 55, 0.28);
  --purple: #d69a28;
  --purple-deep: #04130c;
  --green: #1faa68;
  --teal: #167b59;
  --amber: #d69a28;
  --danger: #f27f69;
  --gold: #d69a28;
  --gold-strong: #f2bd56;
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(31, 170, 104, 0.16), transparent 24rem),
    radial-gradient(circle at 72% 6%, rgba(214, 154, 40, 0.15), transparent 22rem),
    linear-gradient(135deg, #020905 0%, #06170f 52%, #010402 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.app-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 36px 20px 22px;
  color: rgba(255, 255, 255, 0.86);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 42px;
}

.brand-block img {
  width: 48px;
  height: 48px;
}

.brand-block h1,
.brand-block p,
.section-toolbar h3,
.section-toolbar p,
.hero-copy h2,
.hero-copy p {
  margin: 0;
}

.brand-block h1 {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.brand-block p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.96rem;
}

.nav-list {
  display: grid;
  gap: 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.03rem;
  font-weight: 650;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(91, 75, 178, 0.72), rgba(91, 75, 178, 0.36));
  color: #fff;
}

.plan-card {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.plan-card strong {
  color: #fff;
  font-size: 1.02rem;
}

.plan-card span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.plan-card small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.8rem;
  line-height: 1.35;
}

.usage-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.usage-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e7d8ff, #7f73cf);
}

.plan-card button {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 800;
}

.plan-card.comp-active {
  border-color: rgba(47, 155, 95, 0.36);
  background: linear-gradient(145deg, rgba(47, 155, 95, 0.18), rgba(255, 255, 255, 0.05));
}

.plan-card.comp-active .usage-bar span {
  background: linear-gradient(90deg, #9be2ae, #2f9b5f);
}

.main-shell {
  padding: 16px 22px 28px 0;
}

.main-card {
  max-width: 1050px;
  min-height: calc(100vh - 44px);
  margin: 0 auto;
  padding: 24px 34px 32px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 11%, rgba(171, 142, 217, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 247, 0.96));
  box-shadow: var(--shadow);
}

.app-page {
  display: none;
}

.app-page.is-active {
  display: grid;
  gap: 22px;
}

.create-page,
.creation-page,
.settings-page,
.history-section.app-page {
  align-content: start;
  margin-top: 0;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.page-heading span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: 0;
  line-height: 0.96;
}

.page-heading p {
  width: min(420px, 100%);
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-page .page-heading + .account-section {
  margin-top: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-shortcut,
.profile-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.api-shortcut {
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 800;
}

.api-shortcut svg {
  width: 20px;
  height: 20px;
}

.profile-button,
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.profile-button {
  border-color: transparent;
  background: #263c60;
  color: #fff;
}

.profile-button svg,
.icon-button svg {
  width: 22px;
  height: 22px;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 430px);
  gap: 20px;
  align-items: center;
  min-height: 360px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 28px 0 20px;
}

.hero-copy h2 {
  color: #101727;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 4.95rem);
  line-height: 0.95;
  max-width: 12ch;
}

.hero-copy h2 span {
  color: var(--purple);
}

.hero-copy p {
  max-width: 470px;
  margin-top: 22px;
  color: #4e5870;
  font-size: 1.12rem;
  line-height: 1.65;
}

.friction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.friction-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(91, 75, 178, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #43358e;
  font-size: 0.82rem;
  font-weight: 850;
}

.hero-image {
  width: min(455px, 100%);
  justify-self: end;
  filter: drop-shadow(0 24px 45px rgba(91, 75, 178, 0.18));
  mix-blend-mode: normal;
}

.guarantee-card {
  display: inline-grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 80px;
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.05);
}

.guarantee-card svg,
.why-card > svg {
  width: 28px;
  height: 28px;
  color: var(--purple);
}

.guarantee-card strong,
.guarantee-card span {
  display: block;
}

.guarantee-card strong {
  color: #30308b;
}

.guarantee-card span {
  margin-top: 3px;
  color: #667085;
  font-size: 0.9rem;
}

.generator-card,
.creation-card,
.why-card,
.api-section,
.history-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 55px rgba(17, 24, 39, 0.06);
}

.generator-card {
  padding: 0;
  overflow: hidden;
}

.card-title-row,
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-title-row {
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.card-title-row h3,
.section-toolbar h3,
.why-card h3 {
  margin: 0;
  color: #101727;
  font-size: 1.08rem;
  font-weight: 900;
}

.advanced-options {
  position: relative;
}

.advanced-options summary {
  list-style: none;
  color: #565f73;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.advanced-options[open] summary {
  color: var(--purple);
}

.advanced-grid {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 5;
  display: grid;
  gap: 14px;
  width: min(680px, calc(100vw - 80px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.18);
}

.generator-form {
  display: grid;
  gap: 24px;
  padding: 26px 24px 24px;
}

.choice-grid,
.context-grid,
.pantry-grid,
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.pantry-builder,
.restaurant-context {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(91, 75, 178, 0.16);
  border-radius: 12px;
  background: rgba(91, 75, 178, 0.045);
}

.pantry-builder {
  border-color: rgba(34, 124, 121, 0.18);
  background: rgba(34, 124, 121, 0.055);
}

.pantry-ingredients-field,
.reuse-field {
  grid-column: span 2;
}

.field-help-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(47, 155, 95, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.04);
}

.field-help-card h5 {
  margin: 0;
  color: #172033;
  font-size: 0.92rem;
  font-weight: 950;
}

.field-help-card p,
.bar-basics-note {
  margin: 0;
  color: #596275;
  font-size: 0.88rem;
  line-height: 1.48;
}

.reuse-help-card {
  border-color: rgba(91, 75, 178, 0.18);
  background: rgba(255, 255, 255, 0.68);
}

.bar-basics-note {
  margin-top: -4px;
}

.context-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.context-title-row h4 {
  margin: 0;
  color: #172033;
  font-size: 0.96rem;
  font-weight: 950;
}

.context-title-row span {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.restaurant-profile-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1fr);
  gap: 12px 16px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(47, 155, 95, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.profile-select-field {
  gap: 8px;
}

.profile-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-action-row button {
  min-height: 52px;
  border: 1px solid rgba(91, 75, 178, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #43358e;
  font-size: 0.88rem;
  font-weight: 900;
}

.profile-action-row button:hover {
  border-color: rgba(91, 75, 178, 0.48);
}

.profile-action-row button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.restaurant-profile-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: #667085;
  font-size: 0.86rem;
  line-height: 1.45;
}

.restaurant-profile-status[data-tone="success"] {
  color: var(--green);
  font-weight: 800;
}

.restaurant-profile-status[data-tone="warning"] {
  color: #8a5a11;
  font-weight: 800;
}

.liquor-cost-library {
  overflow: hidden;
  border: 1px solid rgba(91, 75, 178, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.liquor-cost-library > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 0 14px;
  list-style: none;
  cursor: pointer;
}

.liquor-cost-library > summary::-webkit-details-marker,
.bulk-cost-tools > summary::-webkit-details-marker {
  display: none;
}

.liquor-cost-library > summary span {
  color: #172033;
  font-weight: 950;
}

.liquor-cost-library > summary small {
  color: #667085;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.liquor-cost-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.liquor-cost-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.liquor-cost-toolbar h5 {
  margin: 0;
  color: #172033;
  font-size: 0.95rem;
}

.liquor-cost-toolbar p,
.liquor-cost-status {
  margin: 3px 0 0;
  color: #667085;
  font-size: 0.86rem;
  line-height: 1.45;
}

.liquor-cost-actions,
.bulk-cost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liquor-cost-actions button,
.bulk-cost-actions button,
.liquor-cost-row button {
  min-height: 42px;
  border: 1px solid rgba(91, 75, 178, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #43358e;
  font-size: 0.84rem;
  font-weight: 900;
}

.liquor-cost-actions button,
.bulk-cost-actions button {
  padding: 0 12px;
}

.liquor-cost-rows {
  display: grid;
  gap: 10px;
}

.liquor-cost-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) repeat(3, minmax(100px, 0.8fr)) 86px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(16, 24, 39, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.liquor-cost-row label {
  gap: 7px;
}

.liquor-cost-row label span,
.profile-select-field > span,
.bulk-cost-grid label > span {
  color: #596275;
  font-size: 0.78rem;
  font-weight: 850;
}

.liquor-cost-row input {
  min-height: 42px;
  padding: 0 10px;
  font-size: 0.92rem;
}

.liquor-cost-row button {
  padding: 0 10px;
}

.liquor-cost-preview {
  grid-column: 1 / -1;
  color: #667085;
  font-size: 0.82rem;
}

.liquor-cost-empty {
  padding: 14px;
  border: 1px dashed rgba(91, 75, 178, 0.28);
  border-radius: 10px;
  color: #667085;
  font-size: 0.9rem;
  line-height: 1.45;
}

.bulk-cost-tools {
  border-top: 1px solid rgba(16, 24, 39, 0.08);
  padding-top: 10px;
}

.bulk-cost-tools > summary {
  color: #43358e;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.bulk-cost-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.bulk-cost-grid textarea {
  min-height: 118px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.liquor-cost-status[data-tone="success"] {
  color: var(--green);
  font-weight: 800;
}

.liquor-cost-status[data-tone="warning"] {
  color: #8a5a11;
  font-weight: 800;
}

label {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: #101727;
  font-weight: 800;
}

.label-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.label-icon svg {
  width: 21px;
  height: 21px;
}

.label-icon.green {
  color: var(--green);
}

.label-icon.teal {
  color: var(--teal);
}

.label-icon.amber {
  color: var(--amber);
}

.label-icon.cranberry {
  color: #b32645;
}

label small {
  color: #667085;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input,
select {
  padding: 0 16px;
}

textarea {
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(91, 75, 178, 0.62);
  box-shadow: 0 0 0 4px rgba(91, 75, 178, 0.13);
}

.slider-control input {
  min-height: 34px;
  padding: 0;
  accent-color: var(--purple);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 800;
}

.slider-control strong {
  color: var(--purple);
  font-size: 0.95rem;
}

.segmented-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend,
.advanced-grid label > span,
.api-card > span,
.toggle-row span {
  margin-bottom: 8px;
  color: #596275;
  font-size: 0.82rem;
  font-weight: 850;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.segmented-control label {
  display: block;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  color: #667085;
  font-size: 0.83rem;
  font-weight: 850;
  text-align: center;
}

.segmented-control input:checked + span {
  background: var(--purple-deep);
  color: #fff;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  background: linear-gradient(135deg, #2e214d, #1f173c);
  color: #fff;
  box-shadow: 0 16px 32px rgba(36, 24, 63, 0.18);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.primary-action svg {
  width: 22px;
  height: 22px;
}

.form-assurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: -4px 0 0;
  color: #8a90a2;
  font-size: 0.9rem;
}

.form-assurance svg {
  width: 20px;
  height: 20px;
}

.examples-section {
  margin-top: 28px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.example-card {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 172px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(17, 24, 39, 0.64)),
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.9), transparent 58px),
    linear-gradient(135deg, #2f9b5f, #227c79);
  color: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
}

.example-card::before {
  content: "";
  position: absolute;
  inset: 18px 26px auto auto;
  width: 58px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 48% 48% 18px 18px;
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(4deg);
}

.example-card::after {
  content: "";
  position: absolute;
  right: 52px;
  top: 110px;
  width: 6px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.example-card strong,
.example-card span,
.example-card small {
  position: relative;
  z-index: 1;
}

.example-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  line-height: 1.05;
}

.example-card span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  line-height: 1.35;
}

.example-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.example-card.smoke {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(17, 24, 39, 0.66)),
    radial-gradient(circle at 68% 22%, rgba(255, 236, 203, 0.86), transparent 58px),
    linear-gradient(135deg, #584537, #c9822b);
}

.example-card.coral {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(17, 24, 39, 0.64)),
    radial-gradient(circle at 70% 18%, rgba(255, 228, 212, 0.88), transparent 60px),
    linear-gradient(135deg, #d66063, #7f5af0);
}

.example-card.frost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(17, 24, 39, 0.62)),
    radial-gradient(circle at 70% 20%, rgba(244, 249, 255, 0.95), transparent 58px),
    linear-gradient(135deg, #263c60, #b8d8d8);
}

.creation-section,
.api-section,
.history-section,
.why-card {
  margin-top: 28px;
}

.section-toolbar {
  margin-bottom: 16px;
}

.section-toolbar h3 {
  font-size: 1.15rem;
}

.section-toolbar h3 span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-left: 8px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(47, 155, 95, 0.11);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  vertical-align: middle;
}

.section-toolbar p {
  margin-top: 4px;
  color: #667085;
  font-size: 0.93rem;
}

.creation-actions {
  display: flex;
  gap: 10px;
}

.icon-button:hover,
.api-shortcut:hover {
  border-color: rgba(91, 75, 178, 0.36);
  color: var(--purple);
}

.creation-card {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 22px;
}

#resultImage {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(47, 155, 95, 0.18);
}

#resultContent {
  min-width: 0;
}

.empty-state,
.message {
  color: #667085;
  line-height: 1.55;
}

.message {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.message.error {
  border-color: rgba(179, 38, 30, 0.28);
  background: rgba(179, 38, 30, 0.06);
  color: var(--danger);
}

.loading {
  display: grid;
  gap: 14px;
}

.loading-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 24, 63, 0.1);
}

.loading-bar::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), #2f9b5f, #c9822b);
  animation: loadingSlide 1.1s ease-in-out infinite alternate;
}

@keyframes loadingSlide {
  from { transform: translateX(0); }
  to { transform: translateX(140%); }
}

.recipe-card {
  display: grid;
  gap: 16px;
}

.recipe-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.recipe-title-row h3 {
  margin: 0;
  color: #172033;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.score-badge,
.cost-badge {
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 155, 95, 0.22);
  border-radius: 14px;
  background: rgba(47, 155, 95, 0.08);
  color: var(--green);
  font-weight: 950;
}

.score-badge {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}

.score-badge span {
  display: block;
  color: #667085;
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cost-badge {
  align-content: center;
  justify-items: start;
  min-width: 170px;
  min-height: 88px;
  padding: 14px;
}

.cost-badge span,
.cost-badge small {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cost-badge strong {
  margin-top: 4px;
  color: var(--green);
  font-size: 1.45rem;
}

.cost-badge small {
  margin-top: 2px;
  text-transform: none;
}

.recipe-concept {
  margin: 0;
  color: #596275;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(91, 75, 178, 0.09);
  color: #43358e;
  font-size: 0.78rem;
  font-weight: 850;
}

.recipe-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1.1fr);
  gap: 20px;
}

.detail-grid {
  align-items: start;
}

.subsection {
  min-width: 0;
}

.subsection h4,
.guard-box h4 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ingredient-list,
.method-list,
.plain-list,
.attempt-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredient-list {
  display: grid;
  gap: 7px;
}

.ingredient-list li {
  display: grid;
  grid-template-columns: minmax(64px, 90px) 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.amount {
  color: var(--green);
  font-weight: 900;
}

.ingredient-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-weight: 750;
}

.role {
  display: block;
  margin-top: 3px;
  color: #8a90a2;
  font-size: 0.8rem;
  font-weight: 650;
}

.method-list {
  counter-reset: method;
  display: grid;
  gap: 10px;
}

.method-list li {
  counter-increment: method;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: #596275;
  line-height: 1.5;
}

.method-list li::before {
  content: counter(method);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0edf7;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 950;
}

.plain-list {
  display: grid;
  gap: 9px;
  color: #596275;
  line-height: 1.48;
}

.plain-list li {
  padding-left: 13px;
  border-left: 3px solid rgba(91, 75, 178, 0.2);
}

.detail-copy {
  margin: 0;
  color: #596275;
  line-height: 1.58;
}

.brand-panel,
.pantry-panel,
.cost-panel,
.margin-panel,
.reuse-panel,
.menu-panel,
.batch-panel,
.restaurant-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(47, 155, 95, 0.2);
  border-radius: 12px;
  background: rgba(47, 155, 95, 0.07);
}

.menu-panel {
  border-color: rgba(91, 75, 178, 0.2);
  background: rgba(91, 75, 178, 0.06);
}

.brand-panel {
  border-color: rgba(91, 75, 178, 0.22);
  background: linear-gradient(135deg, rgba(91, 75, 178, 0.08), rgba(255, 255, 255, 0.58));
}

.pantry-panel {
  border-color: rgba(34, 124, 121, 0.22);
  background: rgba(34, 124, 121, 0.065);
}

.margin-panel {
  border-color: rgba(34, 124, 121, 0.22);
  background: rgba(34, 124, 121, 0.07);
}

.reuse-panel {
  border-color: rgba(47, 155, 95, 0.2);
  background: rgba(47, 155, 95, 0.055);
}

.batch-panel {
  border-color: rgba(36, 24, 63, 0.16);
  background: rgba(36, 24, 63, 0.045);
}

.restaurant-panel {
  border-color: rgba(201, 130, 43, 0.24);
  background: rgba(201, 130, 43, 0.07);
}

.brand-panel h4,
.pantry-panel h4,
.cost-panel h4,
.margin-panel h4,
.reuse-panel h4,
.menu-panel h4,
.batch-panel h4,
.restaurant-panel h4 {
  margin: 0;
  color: #172033;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cost-grid div {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 11px;
  border: 1px solid rgba(47, 155, 95, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.cost-grid span {
  color: #667085;
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cost-grid strong {
  color: #207448;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.brand-panel p,
.pantry-panel p,
.cost-panel p,
.margin-panel p,
.reuse-panel p,
.menu-panel p,
.batch-panel p,
.restaurant-panel p {
  margin: 0;
  color: #596275;
  font-size: 0.9rem;
  line-height: 1.45;
}

.brand-lockup {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(91, 75, 178, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
}

.brand-lockup strong {
  color: #172033;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.brand-lockup span {
  color: #596275;
  line-height: 1.4;
}

.ingredient-cost-table {
  display: grid;
  gap: 7px;
}

.ingredient-cost-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(47, 155, 95, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
}

.ingredient-cost-table span {
  min-width: 0;
  color: #596275;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.ingredient-cost-table span small {
  display: block;
  margin-top: 3px;
  color: #8a90a2;
  font-size: 0.76rem;
  font-weight: 750;
}

.ingredient-cost-table strong {
  flex: 0 0 auto;
  color: #207448;
}

.compact-list {
  gap: 7px;
  margin-top: 2px;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.batch-grid section {
  min-width: 0;
}

.batch-grid h5 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.batch-grid li span {
  display: block;
  margin-top: 3px;
  color: #8a90a2;
  font-size: 0.8rem;
}

.grade-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(201, 130, 43, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.grade-row strong {
  color: #7f4b18;
}

.grade-row span {
  color: #596275;
  line-height: 1.4;
}

.guard-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(91, 75, 178, 0.18);
  border-radius: 12px;
  background: rgba(91, 75, 178, 0.055);
}

.guard-box.compact {
  padding: 12px 14px;
  background: rgba(91, 75, 178, 0.04);
}

.guard-box.warning {
  border-color: rgba(179, 38, 30, 0.28);
  background: rgba(179, 38, 30, 0.06);
}

.guard-box p {
  margin: 0;
  color: #596275;
  line-height: 1.45;
}

.attempt-list {
  display: grid;
  gap: 8px;
}

.attempt-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  color: #667085;
  font-size: 0.9rem;
}

.attempt-name {
  color: #172033;
  font-weight: 850;
}

.why-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
}

.why-card p {
  margin: 6px 0 0;
  color: #596275;
  line-height: 1.45;
}

.settings-menu {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 55px rgba(17, 24, 39, 0.06);
}

.settings-menu > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 0 24px;
  list-style: none;
  color: #101727;
  cursor: pointer;
}

.settings-menu > summary::-webkit-details-marker {
  display: none;
}

.settings-menu > summary span {
  font-size: 1.15rem;
  font-weight: 950;
}

.settings-menu > summary small {
  color: #667085;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: right;
}

.settings-menu > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.settings-menu[open] > summary {
  border-bottom: 1px solid var(--line);
}

.settings-menu[open] > summary::after {
  transform: rotate(225deg);
}

.settings-menu .account-section,
.settings-menu .managed-section,
.settings-menu .api-section,
.settings-menu .api-help-section {
  padding: 24px;
}

.managed-section {
  border-bottom: 1px solid var(--line);
}

.managed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.credit-packages {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.compact-toolbar {
  margin-bottom: 0;
}

.credit-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.credit-package-card {
  display: grid;
  gap: 8px;
  min-height: 174px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.credit-package-card.featured {
  border-color: rgba(91, 75, 178, 0.28);
  background: linear-gradient(135deg, rgba(91, 75, 178, 0.1), rgba(47, 155, 95, 0.08));
}

.credit-package-card span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(91, 75, 178, 0.08);
  color: #43358e;
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credit-package-card strong {
  color: #172033;
  font-size: 1rem;
}

.credit-package-card b {
  color: #207448;
  font-size: 1.75rem;
  line-height: 1;
}

.credit-package-card small,
.credit-package-card p,
.credit-note {
  margin: 0;
  color: #596275;
  line-height: 1.45;
}

.credit-package-card small {
  font-size: 0.82rem;
  font-weight: 800;
}

.credit-package-card p,
.credit-note {
  font-size: 0.9rem;
}

.managed-card {
  display: grid;
  gap: 9px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.managed-card.primary {
  border-color: rgba(91, 75, 178, 0.22);
  background: linear-gradient(135deg, rgba(91, 75, 178, 0.11), rgba(47, 155, 95, 0.08));
}

.managed-card span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(91, 75, 178, 0.08);
  color: #43358e;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.managed-card strong {
  color: #172033;
  font-size: 1.05rem;
}

.managed-card p {
  margin: 0;
  color: #596275;
  line-height: 1.48;
}

.comp-access-panel,
.plan-access-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.plan-access-panel {
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.6fr);
  background: linear-gradient(135deg, rgba(91, 75, 178, 0.08), rgba(255, 255, 255, 0.78));
}

.comp-access-panel.is-active {
  border-color: rgba(47, 155, 95, 0.26);
  background: linear-gradient(135deg, rgba(47, 155, 95, 0.1), rgba(255, 255, 255, 0.78));
}

.comp-access-panel.is-disabled {
  background: rgba(255, 255, 255, 0.52);
}

.comp-access-copy,
.plan-access-copy {
  display: grid;
  gap: 8px;
}

.comp-access-copy span,
.plan-access-copy span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(47, 155, 95, 0.1);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-access-copy span {
  background: rgba(91, 75, 178, 0.1);
  color: #43358e;
}

.comp-access-copy h3,
.plan-access-copy h3 {
  margin: 0;
  color: #172033;
  font-size: 1.08rem;
}

.comp-access-copy p,
.plan-access-copy p,
.comp-access-status,
.plan-access-status,
#accountStatus {
  margin: 0;
  color: #596275;
  line-height: 1.48;
}

.comp-access-form,
.plan-access-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 12px;
}

.plan-access-form {
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.comp-access-form label,
.plan-access-form label {
  display: grid;
  gap: 7px;
}

.comp-access-form label span,
.plan-access-form label span {
  color: #31394c;
  font-size: 0.82rem;
  font-weight: 850;
}

.comp-access-form input,
.plan-access-form input,
.plan-access-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(16, 24, 39, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #172033;
  outline: none;
}

.comp-access-form button,
.plan-access-form button {
  min-height: 46px;
}

.secondary-action.quiet {
  background: rgba(255, 255, 255, 0.78);
  color: #596275;
}

.comp-access-status,
.plan-access-status,
#accountStatus {
  grid-column: 1 / -1;
  padding-top: 2px;
  font-size: 0.9rem;
}

.comp-access-status[data-tone="success"],
.plan-access-status[data-tone="success"],
#accountStatus[data-tone="success"] {
  color: var(--green);
  font-weight: 800;
}

.comp-access-status[data-tone="warning"],
.plan-access-status[data-tone="warning"],
#accountStatus[data-tone="warning"] {
  color: #8a5a11;
}

.comp-access-status[data-tone="error"],
.plan-access-status[data-tone="error"],
#accountStatus[data-tone="error"] {
  color: var(--danger);
  font-weight: 800;
}

.byo-settings {
  padding: 0 24px 24px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.byo-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  list-style: none;
  color: #101727;
  cursor: pointer;
}

.byo-settings > summary::-webkit-details-marker {
  display: none;
}

.byo-settings > summary span {
  font-size: 1rem;
  font-weight: 950;
}

.byo-settings > summary small {
  color: #667085;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: right;
}

.byo-settings > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.byo-settings[open] > summary {
  border-bottom: 1px solid var(--line);
}

.byo-settings[open] > summary::after {
  transform: rotate(225deg);
}

.settings-menu .byo-settings .api-section,
.settings-menu .byo-settings .api-help-section {
  padding: 24px 0 0;
}

.api-section,
.api-help-section,
.history-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.api-grid {
  gap: 18px;
}

.api-card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.api-card input,
.api-card select {
  min-height: 44px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--purple);
}

.secondary-action {
  flex: 1 1 280px;
  min-height: 52px;
  border: 1px solid rgba(91, 75, 178, 0.45);
  background: rgba(255, 255, 255, 0.54);
  color: #43358e;
}

.help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--purple);
  font-size: 0.92rem;
  font-weight: 850;
}

.api-help-section {
  margin-top: 32px;
}

.help-steps,
.provider-help-grid {
  display: grid;
  gap: 16px;
}

.help-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.help-steps article,
.provider-help-card,
.security-note {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.help-steps article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
}

.help-steps article span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0edf7;
  color: var(--purple);
  font-weight: 950;
}

.help-steps strong,
.security-note strong {
  color: #172033;
  font-size: 1rem;
}

.help-steps p,
.security-note p,
.provider-help-card p {
  margin: 0;
  color: #596275;
  line-height: 1.48;
}

.provider-help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-help-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.provider-help-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.provider-help-head h4 {
  margin: 0 0 4px;
  color: #172033;
  font-size: 1.05rem;
}

.provider-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  color: #fff;
  font-weight: 950;
}

.openai-mark {
  background: #111827;
}

.anthropic-mark {
  background: #8d6e52;
}

.google-mark {
  background: linear-gradient(135deg, #4285f4, #34a853 48%, #fbbc05);
}

.xai-mark {
  background: #05070b;
  font-size: 1.2rem;
}

.help-picture {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(91, 75, 178, 0.16);
  border-radius: 12px;
  background: #f8f7fb;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(91, 75, 178, 0.12);
  background: #ffffff;
}

.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9d5e8;
}

.browser-bar strong {
  margin-left: 8px;
  color: #667085;
  font-size: 0.76rem;
}

.picture-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  min-height: 150px;
}

.picture-sidebar {
  background:
    linear-gradient(#ded9f1 0 0) 16px 20px / 44px 8px no-repeat,
    linear-gradient(#ded9f1 0 0) 16px 44px / 34px 8px no-repeat,
    linear-gradient(#ded9f1 0 0) 16px 68px / 46px 8px no-repeat,
    #f0eef8;
}

.picture-panel {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.picture-panel b,
.picture-panel em,
.picture-panel i {
  display: block;
  border-radius: 8px;
  font-style: normal;
}

.picture-panel b {
  color: #172033;
  font-size: 1rem;
}

.picture-panel em {
  width: min(220px, 100%);
  padding: 11px 14px;
  background: var(--purple-deep);
  color: #fff;
  font-weight: 850;
}

.picture-panel i {
  width: min(240px, 100%);
  padding: 9px 12px;
  background: rgba(47, 155, 95, 0.1);
  color: #207448;
  font-weight: 750;
}

.provider-help-card ol {
  margin: 0;
  padding-left: 20px;
  color: #596275;
  line-height: 1.55;
}

.provider-help-card code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(91, 75, 178, 0.08);
  color: #43358e;
}

.provider-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(91, 75, 178, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #43358e;
  font-size: 0.88rem;
  font-weight: 850;
}

.security-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 18px;
  border-color: rgba(194, 125, 40, 0.22);
  background: rgba(194, 125, 40, 0.07);
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.history-card {
  width: 100%;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.05);
}

.history-card:hover {
  border-color: rgba(91, 75, 178, 0.38);
}

.history-card strong,
.history-card span {
  display: block;
}

.history-card strong {
  margin-bottom: 6px;
  color: #172033;
}

.history-card span {
  color: #667085;
  font-size: 0.86rem;
  line-height: 1.4;
}

/* Luxury emerald-and-gold theme layer */
.sidebar {
  background:
    radial-gradient(circle at 18% 10%, rgba(214, 154, 40, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(1, 10, 6, 0.98), rgba(2, 9, 5, 0.9));
}

.brand-block h1,
.brand-block p {
  color: var(--gold-strong);
}

.brand-block p {
  color: rgba(255, 242, 213, 0.7);
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(214, 154, 40, 0.3);
  background: linear-gradient(135deg, rgba(31, 170, 104, 0.72), rgba(214, 154, 40, 0.18));
}

.plan-card {
  border-color: rgba(214, 154, 40, 0.3);
  background: linear-gradient(145deg, rgba(8, 39, 24, 0.84), rgba(2, 13, 8, 0.72));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.usage-bar span,
.plan-card.comp-active .usage-bar span {
  background: linear-gradient(90deg, var(--gold-strong), var(--green));
}

.plan-card button {
  border-color: rgba(214, 154, 40, 0.34);
  color: var(--gold-strong);
}

.main-card {
  border-color: rgba(214, 154, 40, 0.34);
  background:
    radial-gradient(circle at 78% 8%, rgba(214, 154, 40, 0.12), transparent 18rem),
    radial-gradient(circle at 10% 28%, rgba(31, 170, 104, 0.1), transparent 22rem),
    linear-gradient(135deg, rgba(3, 18, 11, 0.98), rgba(2, 9, 5, 0.96));
  box-shadow: var(--shadow);
}

.topbar,
.card-title-row,
.settings-menu[open] > summary,
.byo-settings[open] > summary,
.managed-section,
.liquor-cost-library > summary,
.credit-packages {
  border-color: var(--line);
}

.api-shortcut,
.profile-button,
.icon-button {
  border-color: rgba(214, 154, 40, 0.28);
  background: rgba(5, 27, 16, 0.76);
  color: var(--ink);
}

.profile-button {
  background: linear-gradient(135deg, rgba(31, 170, 104, 0.88), rgba(6, 23, 15, 0.84));
}

.hero-copy h2,
.card-title-row h3,
.section-toolbar h3,
.why-card h3,
.context-title-row h4,
.liquor-cost-toolbar h5,
.recipe-title-row h3,
.subsection h4,
.guard-box h4,
.brand-panel h4,
.pantry-panel h4,
.cost-panel h4,
.margin-panel h4,
.reuse-panel h4,
.menu-panel h4,
.batch-panel h4,
.restaurant-panel h4,
.managed-card strong,
.comp-access-copy h3,
.plan-access-copy h3,
.help-steps strong,
.security-note strong,
.provider-help-head h4,
.history-card strong {
  color: var(--ink);
}

.hero-copy h2,
.recipe-title-row h3,
.brand-lockup strong,
.example-card strong {
  font-family: Georgia, "Times New Roman", serif;
}

.hero-copy h2 span,
.slider-control strong,
.help-link,
.bulk-cost-tools > summary,
.history-card:hover,
.advanced-options[open] summary {
  color: var(--green);
}

.hero-copy p,
.section-toolbar p,
.context-title-row span,
.liquor-cost-toolbar p,
.liquor-cost-status,
label small,
.empty-state,
.message,
.recipe-concept,
.method-list li,
.plain-list,
.detail-copy,
.brand-panel p,
.pantry-panel p,
.cost-panel p,
.margin-panel p,
.reuse-panel p,
.menu-panel p,
.batch-panel p,
.restaurant-panel p,
.guard-box p,
.why-card p,
.managed-card p,
.credit-package-card small,
.credit-package-card p,
.credit-note,
.comp-access-copy p,
.plan-access-copy p,
.comp-access-status,
.plan-access-status,
#accountStatus,
.help-steps p,
.security-note p,
.provider-help-card p,
.provider-help-card ol,
.history-card span,
.field-help-card p,
.bar-basics-note,
.restaurant-profile-status,
.liquor-cost-preview,
.liquor-cost-empty,
.role,
.grade-row span,
.ingredient-cost-table span,
.batch-grid li span {
  color: var(--muted);
}

label,
.segmented-field legend,
.advanced-grid label > span,
.api-card > span,
.toggle-row span,
.comp-access-form label span,
.plan-access-form label span,
.liquor-cost-row label span,
.profile-select-field > span,
.bulk-cost-grid label > span {
  color: var(--ink);
}

.hero-section {
  isolation: isolate;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 30px -22px 18px;
  z-index: -1;
  border: 1px solid rgba(214, 154, 40, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 35%, rgba(214, 154, 40, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(8, 39, 24, 0.72), rgba(2, 13, 8, 0.36));
}

.hero-image {
  border: 1px solid rgba(214, 154, 40, 0.34);
  border-radius: 22px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38), 0 0 60px rgba(214, 154, 40, 0.12);
  filter: saturate(1.08) contrast(1.08);
}

.friction-row span,
.tag,
.managed-card span,
.credit-package-card span,
.comp-access-copy span,
.plan-access-copy span,
.section-toolbar h3 span {
  border-color: rgba(214, 154, 40, 0.22);
  background: rgba(214, 154, 40, 0.12);
  color: var(--gold-strong);
}

.guarantee-card,
.generator-card,
.creation-card,
.why-card,
.settings-menu,
.api-section,
.history-section,
.advanced-grid,
.pantry-builder,
.restaurant-context,
.field-help-card,
.restaurant-profile-tools,
.liquor-cost-library,
.liquor-cost-row,
.managed-card,
.account-card,
.credit-package-card,
.comp-access-panel,
.plan-access-panel,
.api-card,
.help-steps article,
.provider-help-card,
.security-note,
.history-card,
.message,
.brand-lockup,
.cost-grid div,
.ingredient-cost-table div,
.grade-row,
.guard-box {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(8, 39, 24, 0.88), rgba(2, 13, 8, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 236, 181, 0.06), 0 18px 55px rgba(0, 0, 0, 0.22);
}

.managed-card.primary,
.account-card.account-status-card,
.plan-access-panel,
.brand-panel,
.menu-panel {
  border-color: rgba(214, 154, 40, 0.36);
  background: linear-gradient(135deg, rgba(11, 63, 38, 0.86), rgba(214, 154, 40, 0.07));
}

.comp-access-panel.is-active,
.pantry-panel,
.margin-panel,
.reuse-panel,
.cost-panel {
  border-color: rgba(31, 170, 104, 0.32);
  background: linear-gradient(135deg, rgba(11, 63, 38, 0.82), rgba(2, 13, 8, 0.72));
}

.restaurant-panel,
.security-note {
  border-color: rgba(214, 154, 40, 0.36);
  background: rgba(72, 47, 12, 0.22);
}

.profile-action-row button,
.liquor-cost-actions button,
.bulk-cost-actions button,
.liquor-cost-row button,
.secondary-action,
.provider-links a,
.secondary-action.quiet {
  border-color: rgba(214, 154, 40, 0.34);
  background: rgba(5, 27, 16, 0.76);
  color: var(--gold-strong);
}

.primary-action {
  background: linear-gradient(135deg, #22b66b, #0f7d49);
  color: #fff;
  box-shadow: 0 18px 42px rgba(9, 113, 65, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

input,
select,
textarea,
.comp-access-form input,
.plan-access-form input,
.plan-access-form select,
.api-card input,
.api-card select {
  border-color: rgba(214, 154, 40, 0.24);
  background: rgba(1, 10, 6, 0.62);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: rgba(214, 199, 170, 0.54);
}

select option {
  background: #06170f;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(214, 154, 40, 0.78);
  box-shadow: 0 0 0 4px rgba(214, 154, 40, 0.13);
}

.segmented-control {
  border-color: rgba(214, 154, 40, 0.24);
  background: rgba(1, 10, 6, 0.54);
}

.segmented-control span {
  color: var(--muted);
}

.segmented-control input:checked + span,
.picture-panel em {
  background: linear-gradient(135deg, var(--green), #0f7d49);
  color: #fff;
}

.slider-control input,
.toggle-row input {
  accent-color: var(--green);
}

.guarantee-card svg,
.why-card > svg,
.amount,
.cost-badge strong,
.cost-grid strong,
.ingredient-cost-table strong,
.form-status[data-tone="success"],
.restaurant-profile-status[data-tone="success"],
.liquor-cost-status[data-tone="success"],
.comp-access-status[data-tone="success"],
.plan-access-status[data-tone="success"],
#accountStatus[data-tone="success"] {
  color: var(--green);
}

.score-badge,
.cost-badge,
.help-steps article span {
  border-color: rgba(31, 170, 104, 0.32);
  background: rgba(31, 170, 104, 0.12);
  color: var(--green);
}

.ingredient-name,
.attempt-name,
.brand-lockup strong,
.picture-panel b,
.field-help-card h5,
.grade-row strong,
.credit-package-card strong,
.credit-package-card b {
  color: var(--ink);
}

.method-list li::before {
  background: rgba(214, 154, 40, 0.14);
  color: var(--gold-strong);
}

.plain-list li {
  border-left-color: rgba(214, 154, 40, 0.42);
}

.loading-bar {
  background: rgba(255, 242, 213, 0.12);
}

.loading-bar::before {
  background: linear-gradient(90deg, var(--gold-strong), var(--green), var(--gold));
}

.example-card {
  border-color: rgba(214, 154, 40, 0.28);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.browser-bar,
.help-picture,
.picture-sidebar,
.picture-panel i {
  border-color: rgba(214, 154, 40, 0.22);
  background: rgba(1, 10, 6, 0.56);
}

.picture-panel i,
.provider-help-card code {
  background: rgba(31, 170, 104, 0.13);
  color: #75e0a5;
}

.openai-mark,
.xai-mark {
  background: #020905;
  color: var(--gold-strong);
  border: 1px solid rgba(214, 154, 40, 0.32);
}

.google-mark,
.anthropic-mark {
  background: linear-gradient(135deg, var(--gold), var(--green));
}

.account-section {
  margin-top: 22px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.25fr) minmax(220px, 1fr);
  gap: 14px;
}

.account-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.account-card span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.account-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-auth-form label {
  display: grid;
  gap: 7px;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.icon-button.is-active {
  color: var(--gold-strong);
  border-color: rgba(214, 154, 40, 0.55);
  background: rgba(214, 154, 40, 0.16);
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .sidebar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-card {
    padding-left: 26px;
    padding-right: 26px;
  }
}

@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 18px;
  }

  .brand-block {
    margin-bottom: 18px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-item {
    justify-content: center;
    min-height: 50px;
    padding: 0 10px;
  }

  .nav-item span {
    display: none;
  }

  .plan-card {
    display: none;
  }

  .main-shell {
    padding: 0 12px 20px;
  }

  .main-card {
    min-height: auto;
    padding: 20px;
  }

  .hero-section,
  .creation-card {
    grid-template-columns: 1fr;
  }

  .hero-image {
    width: min(440px, 100%);
    justify-self: center;
  }

  .choice-grid,
  .context-grid,
  .restaurant-profile-tools,
  .liquor-cost-row,
  .bulk-cost-grid,
  .pantry-grid,
  .api-grid,
  .help-steps,
  .provider-help-grid,
  .managed-grid,
  .account-grid,
  .plan-access-panel,
  .plan-access-form,
  .comp-access-panel,
  .comp-access-form,
  .credit-package-grid,
  .examples-grid,
  .batch-grid,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .reuse-field {
    grid-column: auto;
  }

  .pantry-ingredients-field {
    grid-column: auto;
  }

  .advanced-grid {
    right: auto;
    left: 0;
  }

  .liquor-cost-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .main-card {
    padding: 16px;
    border-radius: 14px;
  }

  .topbar,
  .card-title-row,
  .section-toolbar,
  .page-heading,
  .recipe-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .creation-actions {
    justify-content: space-between;
  }

  .hero-copy h2 {
    font-size: 3rem;
  }

  .generator-form,
  .creation-card {
    padding: 18px;
  }

  .card-title-row {
    padding: 18px;
  }

  .advanced-grid {
    position: static;
    width: 100%;
    margin-top: 12px;
    box-shadow: none;
  }

  .score-badge {
    width: 100%;
    height: 56px;
  }

  .cost-badge {
    width: 100%;
    min-height: 68px;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .cost-grid {
    grid-template-columns: 1fr;
  }

  .picture-body {
    grid-template-columns: 54px 1fr;
  }
}
