:root {
  --cream: #f7f0e2;
  --ivory: #fffaf2;
  --olive: #6c7c44;
  --olive-deep: #4f5f31;
  --terracotta: #c86c4b;
  --terracotta-deep: #aa5336;
  --sun: #efd79a;
  --ink: #2f261f;
  --muted: #71645a;
  --line: #e6dccd;
  --blue-chip: #dbe7ff;
  --blue-chip-border: #c4d6ff;
  --ok: #1f6f4a;
  --danger: #8b1e3f;
  --shadow: 0 24px 60px rgba(79, 56, 32, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(239, 215, 154, 0.5), transparent 30%),
    linear-gradient(180deg, #fbf6ed 0%, #f4ecdf 52%, #efe4d2 100%);
}

body.auth-page-plain {
  background: #fff;
}

body.auth-page,
body.admin-page {
  min-height: 100vh;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: 'Libre Baskerville', Georgia, serif;
}

input,
button,
select,
textarea {
  font: inherit;
}

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

.hidden,
.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;
}

.sun-wash {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(239, 215, 154, 0.28), transparent 28%),
    radial-gradient(circle at 90% 22%, rgba(200, 108, 75, 0.12), transparent 26%);
  pointer-events: none;
  z-index: 0;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.bg-shape-a {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 30% 30%, rgba(200, 108, 75, 0.34), rgba(200, 108, 75, 0));
  top: -120px;
  left: -90px;
}

.bg-shape-b {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle at 50% 50%, rgba(108, 124, 68, 0.18), rgba(108, 124, 68, 0));
  right: -120px;
  bottom: -140px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell-plain {
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto;
}

.auth-card {
  width: min(980px, 100%);
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(230, 220, 205, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px;
  backdrop-filter: blur(8px);
}

.auth-card-plain {
  width: min(420px, 100%);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.auth-card-plain input,
.auth-card-plain button {
  border-radius: 0;
}

.eyebrow,
.auth-copy,
.admin-subcopy,
.section-kicker {
  color: var(--muted);
}

.eyebrow,
.section-kicker,
.postcard-kicker {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form,
#loginForm {
  display: grid;
  gap: 12px;
}

.auth-form label,
label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-form input,
#loginForm input,
input[type='text'],
input[type='number'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='file'] {
  width: 100%;
  border: 1px solid #d8cfc2;
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

#loginForm input {
  border-radius: 0;
  border-color: #d9d9d9;
  background: #fff;
}

#loginForm button {
  border: 1px solid #111;
  background: #fff;
  color: #111;
  padding: 13px 14px;
  cursor: pointer;
}

.auth-message,
.result {
  margin-top: 12px;
  min-height: 30px;
}

.invitation-card {
  overflow: hidden;
}

.invitation-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(260px, 1fr);
  gap: 28px;
  align-items: center;
}

.invitation-scene {
  position: relative;
  min-height: 360px;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(239, 215, 154, 0.96) 0%, rgba(247, 233, 193, 0.92) 22%, rgba(244, 223, 193, 0.92) 100%);
}

.scene-sun {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 246, 219, 0.7);
  top: 36px;
  right: 46px;
}

.scene-hill {
  position: absolute;
  border-radius: 999px 999px 0 0;
}

.scene-hill-a {
  width: 340px;
  height: 140px;
  background: #d79f73;
  left: -30px;
  bottom: 0;
}

.scene-hill-b {
  width: 360px;
  height: 180px;
  background: #71824a;
  right: -40px;
  bottom: -12px;
}

.scene-olive-branch {
  position: absolute;
  width: 180px;
  height: 180px;
  border-left: 4px solid rgba(79, 95, 49, 0.75);
  border-radius: 50%;
  left: 46px;
  top: 80px;
  transform: rotate(-24deg);
}

.scene-olive-branch::before,
.scene-olive-branch::after {
  content: '';
  position: absolute;
  width: 62px;
  height: 22px;
  border-radius: 999px;
  background: rgba(108, 124, 68, 0.84);
  box-shadow:
    30px -18px 0 rgba(108, 124, 68, 0.84),
    64px -6px 0 rgba(108, 124, 68, 0.84),
    56px 26px 0 rgba(108, 124, 68, 0.84),
    20px 42px 0 rgba(108, 124, 68, 0.84);
}

.scene-olive-branch::before {
  top: 28px;
  left: 18px;
  transform: rotate(28deg);
}

.scene-olive-branch::after {
  top: 84px;
  left: 18px;
  transform: rotate(-18deg);
}

.app,
.admin-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  margin: 28px auto 56px;
}

.app {
  display: grid;
  gap: 18px;
}

.hero,
.panel,
.admin-panel {
  background: rgba(255, 250, 242, 0.84);
  border: 1px solid rgba(230, 220, 205, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.45s ease-out;
}

.hero {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.98) 0%, rgba(251, 235, 214, 0.95) 100%);
}

.hero-topbar,
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.hero-userbox {
  text-align: right;
}

.hero-userbox p,
.admin-subcopy {
  margin: 0;
  color: var(--muted);
}

.admin-subcopy {
  margin-top: 8px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
}

.ghost-button,
.ghost-link {
  border: 1px solid rgba(108, 124, 68, 0.2);
  background: rgba(255, 255, 255, 0.65);
  color: var(--olive-deep);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.hero-kicker {
  margin: 0;
  color: var(--terracotta-deep);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.brand-home-link {
  display: inline-block;
  text-decoration: none;
}

.brand-home-link:visited,
.brand-home-link:hover,
.brand-home-link:active {
  color: var(--terracotta-deep);
}

.hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(1.95rem, 3.2vw, 2.95rem);
}

.hero p {
  margin-top: 0;
}

.hero-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 320px);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 247, 232, 0.66) 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.scene-copy {
  display: grid;
  gap: 10px;
}

.scene-lead {
  margin: 0;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.15rem;
}

.scene-text {
  margin: 0;
  color: var(--muted);
}

.scene-illustration {
  position: relative;
  min-height: 150px;
}

.olive-bowl {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 20px;
  height: 54px;
  border-radius: 0 0 70px 70px;
  background: linear-gradient(180deg, #e3d4bf 0%, #c7b193 100%);
}

.olive-bowl::before {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  top: -26px;
  height: 50px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 45%, #73854d 0 11px, transparent 12px),
    radial-gradient(circle at 38% 60%, #60703d 0 12px, transparent 13px),
    radial-gradient(circle at 57% 40%, #70814a 0 12px, transparent 13px),
    radial-gradient(circle at 76% 58%, #566737 0 11px, transparent 12px),
    radial-gradient(circle at 65% 74%, #7b8c55 0 10px, transparent 11px);
}

.olive-leaf {
  position: absolute;
  width: 110px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a8b52 0%, #5f703d 100%);
}

.olive-leaf-a {
  top: 18px;
  right: 48px;
  transform: rotate(26deg);
}

.olive-leaf-b {
  top: 52px;
  left: 26px;
  transform: rotate(-24deg);
}

.stats {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.stats article {
  min-width: 150px;
  padding: 12px 15px;
  border-radius: 16px;
  background: rgba(108, 124, 68, 0.08);
  border: 1px solid rgba(108, 124, 68, 0.16);
}

.stats span {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--olive-deep);
}

.stats p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.postcard {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(230, 220, 205, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.88) 0%, rgba(253, 245, 234, 0.96) 100%);
  box-shadow: var(--shadow);
}

.postcard h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.postcard p:last-child {
  margin: 0;
  color: var(--muted);
}

.postcard-kicker {
  color: var(--terracotta-deep);
}

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

.quick-actions button {
  border: 0;
  border-radius: 999px;
  padding: 13px 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #fffdf8 0%, #f6efe1 100%);
  color: var(--terracotta-deep);
  box-shadow: 0 10px 22px rgba(79, 56, 32, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(79, 56, 32, 0.18);
}

.panel {
  padding: 22px;
}

.panel > p {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 10px;
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-deep) 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--olive) 0%, var(--olive-deep) 100%);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.quantity-stepper button:disabled,
.quantity-stepper input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.message {
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 0.94rem;
  line-height: 1.45;
}

.message.ok {
  background: rgba(31, 111, 74, 0.1);
  border: 1px solid rgba(31, 111, 74, 0.26);
}

.message.error {
  background: rgba(139, 30, 63, 0.1);
  border: 1px solid rgba(139, 30, 63, 0.28);
}

.message.info {
  background: rgba(200, 108, 75, 0.08);
  border: 1px solid rgba(200, 108, 75, 0.24);
}

.wine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.wine-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 174px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #eadfd4;
  background: rgba(255, 255, 255, 0.92);
}

.wine-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f1e7dd;
}

.wine-info {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.wine-name,
.match-box h3 {
  margin: 0;
  font-size: 1rem;
}

.wine-meta,
.wine-description,
.wine-stock,
.match-box p {
  margin: 0;
  font-size: 0.87rem;
}

.wine-meta,
.wine-description,
.match-box p {
  color: var(--muted);
}

.wine-stock {
  color: var(--olive-deep);
  font-weight: 800;
}

.taste-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.taste-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(200, 108, 75, 0.12);
  color: var(--terracotta-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

.quick-remove-form,
.match-accept {
  display: grid;
  gap: 8px;
}

.quick-remove-form {
  grid-template-columns: 62px 1fr;
}

.match-accept {
  grid-template-columns: 70px 1fr;
}

.quick-remove-form button,
.match-accept button {
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  padding: 9px;
  cursor: pointer;
}

.quick-remove-form button {
  background: var(--terracotta-deep);
}

.match-accept button {
  background: var(--olive-deep);
}

.match-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e7dbcf;
  background: rgba(255, 255, 255, 0.92);
}

.admin-header {
  margin-bottom: 18px;
}

.admin-panel {
  padding: 24px;
}

.admin-panel-reference {
  background: rgba(255, 255, 255, 0.74);
}

.admin-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-refresh-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid rgba(47, 107, 240, 0.16);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.82);
}

.admin-refresh-actions {
  display: grid;
  gap: 12px;
}

.admin-model-bar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-model-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-model-form input {
  min-height: 56px;
  border-radius: 16px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.admin-pricing-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.admin-field input {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.admin-searchbar input {
  min-height: 68px;
  border-radius: 18px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.admin-search-button,
.admin-reset-button {
  min-width: 98px;
  min-height: 68px;
  border-radius: 18px;
  font-weight: 800;
  cursor: pointer;
}

.admin-search-button:disabled,
.admin-reset-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.admin-search-button {
  border: 1px solid var(--blue-chip-border);
  background: var(--blue-chip);
  color: #2566dc;
}

.admin-reset-button {
  border: 1px solid #2f6bf0;
  background: #fff;
  color: #2f6bf0;
}

.user-table-wrap {
  overflow-x: auto;
  border-radius: 0 0 22px 22px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.user-table-reference {
  border: 1px solid #dce3ee;
}

.user-table th,
.user-table td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid #e8edf5;
  vertical-align: top;
}

.user-table th {
  font-size: 0.96rem;
  font-weight: 800;
  color: #2f4364;
  background: #f8fbff;
}

.user-name {
  display: grid;
  gap: 6px;
}

.user-name strong {
  font-size: 0.98rem;
}

.user-name span,
.status-copy,
.metric-copy {
  color: var(--muted);
  font-size: 0.86rem;
}

.role-badge,
.status-badge,
.metric-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 800;
}

.role-admin {
  background: rgba(200, 108, 75, 0.12);
  color: var(--terracotta-deep);
}

.role-user {
  background: rgba(108, 124, 68, 0.12);
  color: var(--olive-deep);
}

.status-badge {
  background: rgba(52, 123, 233, 0.12);
  color: #2b67df;
}

.metric-pill {
  background: #f1f6ff;
  color: #275dcb;
}

.metric-cell,
.status-cell {
  display: grid;
  gap: 8px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .hero-scene,
  .invitation-layout,
  .postcard-grid {
    grid-template-columns: 1fr;
  }

  .scene-illustration {
    min-height: 130px;
  }
}

@media (max-width: 800px) {
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wine-card {
    grid-template-columns: 82px 1fr;
  }

  .hero-topbar,
  .admin-header {
    flex-direction: column;
  }

  .hero-userbox {
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .admin-searchbar {
    grid-template-columns: 1fr;
  }

  .admin-refresh-card {
    grid-template-columns: 1fr;
  }

  .admin-refresh-actions {
    grid-template-columns: 1fr;
  }

  .admin-model-form,
  .admin-pricing-form {
    grid-template-columns: 1fr;
  }

  .admin-search-button,
  .admin-reset-button {
    min-height: 54px;
  }
}

.app-body {
  padding-bottom: 40px;
}

.mobile-menu-shell,
.app-shell {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 24px));
  margin: 0 auto;
}

.mobile-menu-shell {
  padding-top: 16px;
}

.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(230, 220, 205, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.mobile-user {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-toggle {
  border: 1px solid rgba(108, 124, 68, 0.2);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--olive-deep);
  font-weight: 800;
  cursor: pointer;
}

.mobile-menu {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.96);
  border: 1px solid rgba(230, 220, 205, 0.94);
  box-shadow: var(--shadow);
}

.mobile-menu button,
.mobile-menu-link {
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-link {
  display: block;
}

.app-shell {
  margin-top: 14px;
}

.app-view[hidden] {
  display: none;
}

.screen-card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(230, 220, 205, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.screen-card-hero {
  background:
    radial-gradient(circle at top right, rgba(239, 215, 154, 0.55), transparent 28%),
    rgba(255, 250, 242, 0.9);
}

.screen-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.screen-head h1 {
  margin-bottom: 8px;
}

.screen-copy {
  margin: 0;
  color: var(--muted);
}

.inline-icon-button {
  border: 0;
  background: transparent;
  color: var(--olive-deep);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0 0 6px;
}

.detail-inline-value {
  display: inline-flex;
  align-items: center;
}

.back-link {
  border: 0;
  background: transparent;
  color: var(--olive-deep);
  cursor: pointer;
  font-weight: 800;
}

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

.choice-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(248, 238, 222, 0.98));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 32px rgba(79, 56, 32, 0.12);
  cursor: pointer;
}

.choice-card span {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.2rem;
}

.choice-card small {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.usage-summary-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(230, 220, 205, 0.94);
  background: rgba(255, 255, 255, 0.78);
}

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

.usage-summary-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.94);
  border: 1px solid rgba(230, 220, 205, 0.94);
}

.usage-summary-item strong {
  font-size: 1.1rem;
}

.usage-summary-item span {
  font-size: 0.85rem;
  color: var(--muted);
}

.shortcut-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(108, 124, 68, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.shortcut-card strong {
  font-size: 0.98rem;
}

.shortcut-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  border: 1px solid #d8cfc2;
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
}

.camera-dropzone {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px dashed rgba(108, 124, 68, 0.45);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
}

.camera-dropzone span {
  font-weight: 700;
  color: var(--olive-deep);
}

.add-queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.add-task-list {
  display: grid;
  gap: 16px;
}

.add-task-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(108, 124, 68, 0.12);
}

.add-task-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.add-task-head strong {
  font-size: 1.02rem;
}

.add-task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.add-task-status-queued,
.add-task-status-processing {
  background: rgba(200, 108, 75, 0.1);
  color: #9f4d32;
}

.add-task-status-ready {
  background: rgba(31, 111, 74, 0.1);
  color: #1f6f4a;
}

.add-task-status-saving {
  background: rgba(47, 107, 240, 0.12);
  color: #2f6bf0;
}

.add-task-status-error {
  background: rgba(139, 30, 63, 0.1);
  color: #8b1e3f;
}

.upload-source-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1px solid rgba(108, 124, 68, 0.18);
  color: var(--olive-deep);
  font-weight: 800;
  cursor: pointer;
}

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

.selected-file-copy {
  color: var(--muted);
  font-size: 0.88rem;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-card,
.detail-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.review-image,
.detail-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.review-info p,
.detail-copy p {
  margin: 0 0 10px;
  color: var(--muted);
}

.merge-candidate-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(108, 124, 68, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.merge-candidate-card h3 {
  margin: 0;
}

.merge-candidate-layout {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.merge-candidate-layout img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.merge-candidate-layout p {
  margin: 0 0 6px;
}

.merge-candidate-copy {
  color: var(--muted);
}

.quantity-card,
.detail-adjuster {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.review-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.review-head {
  margin-bottom: 0;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-tag-groups {
  display: grid;
  gap: 14px;
}

.review-tag-group {
  display: grid;
  gap: 8px;
}

.review-tag-heading {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.review-tag {
  border: 1px solid rgba(108, 124, 68, 0.18);
  border-radius: 999px;
  padding: 10px 12px;
  background: #fff;
  color: var(--olive-deep);
  cursor: pointer;
  font-weight: 700;
}

.review-tag.is-active {
  border-color: transparent;
  background: rgba(108, 124, 68, 0.14);
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 56px minmax(80px, 120px) 56px;
  gap: 10px;
  align-items: center;
}

.quantity-stepper button {
  border: 0;
  border-radius: 16px;
  min-height: 54px;
  background: var(--olive-deep);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
}

.quantity-stepper input {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.quantity-hint {
  margin: 0;
  color: var(--muted);
}

.cellar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.search-field {
  display: block;
}

.search-field input {
  min-height: 52px;
}

.cellar-list {
  display: grid;
  gap: 12px;
}

.cellar-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
}

.cellar-item-copy {
  min-width: 0;
}

.cellar-item img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}

.cellar-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.cellar-item p,
.cellar-item span {
  margin: 0;
  color: var(--muted);
}

.cellar-delete-button {
  align-self: center;
  min-width: 46px;
  height: 46px;
  border: 1px solid rgba(139, 30, 63, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #8b1e3f;
  font-size: 1rem;
  cursor: pointer;
}

.detail-delete-button {
  margin-left: auto;
}

.cellar-inline-message {
  margin-bottom: 4px;
}

.cellar-tastes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.cellar-tastes-label {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(63, 78, 52, 0.8);
}

.cellar-tastes span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(200, 108, 75, 0.12);
  color: var(--terracotta-deep);
  font-size: 0.75rem;
  font-weight: 800;
}

.match-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.match-result-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.match-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.match-result-head h2 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}

.match-result-head p,
.match-result-card p {
  margin: 0;
  color: var(--muted);
}

.match-preference {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(108, 124, 68, 0.1);
  border: 1px solid rgba(108, 124, 68, 0.18);
}

.match-rank,
.match-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(200, 108, 75, 0.12);
  color: var(--terracotta-deep);
  font-weight: 800;
}

.match-score {
  background: rgba(108, 124, 68, 0.12);
  color: var(--olive-deep);
}

.match-choice {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.shop-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.drink-now-list {
  display: grid;
  gap: 12px;
}

.drink-now-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
}

.drink-now-card img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}

.drink-now-card strong {
  display: block;
  margin-bottom: 6px;
}

.drink-now-card p {
  margin: 0 0 6px;
  color: var(--muted);
}

.compact-stepper {
  grid-template-columns: 46px 80px 46px;
}

@media (max-width: 800px) {
  .shortcut-grid,
  .choice-grid,
  .review-card,
  .detail-card {
    grid-template-columns: 1fr;
  }

  .screen-head,
  .match-result-head {
    flex-direction: column;
  }

  .cellar-toolbar {
    grid-template-columns: 1fr;
  }
}
