@charset "UTF-8";
:root {
  --paper: #f7f6f0;
  --surface: #fffef9;
  --ink: #173d32;
  --ink-soft: #456056;
  --muted: #748078;
  --line: #dce2d9;
  --coral: #d66d52;
  --mint: #eaf0e5;
  --danger: #ad4536;
  --shadow: 0 16px 55px #173d3215;
  --font: ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button,input,select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

input,select {
  min-width: 0;
}

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

button {
  color: inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline: 3px solid #d66d5280;
  outline-offset: 3px;
}

input:focus,select:focus {
  outline: none;
  border-color: var(--ink)!important;
  box-shadow: 0 0 0 3px #173d3210;
}

input[aria-invalid=true] {
  border-color: var(--danger)!important;
  background: #fff6f2!important;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1,h2,h3 {
  font-weight: 620;
  letter-spacing: -.04em;
}

h1 {
  font-size: clamp(28px,3.3vw,42px);
  line-height: 1.35;
}

h2 {
  font-size: 25px;
  line-height: 1.45;
}

h3 {
  font-size: 20px;
}

p {
  margin-bottom: 0;
}

small {
  font-size: 14px;
}

[hidden] {
  display: none!important;
}

.muted {
  color: var(--muted);
}

.coral {
  color: var(--coral);
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .21em;
  color: var(--muted);
  margin-bottom: 15px;
}

.eyebrow.light {
  color: #bbd0bd;
}

.small-label {
  font-size: 14px;
  letter-spacing: .08em;
  font-weight: 650;
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 11px 11px 11px 2px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.brand-en {
  display: block;
  font-size: 10px;
  letter-spacing: .17em;
  font-weight: 600;
  margin-top: 5px;
  opacity: .65;
}

.brand-light .brand-mark {
  background: #d4e0cc;
  color: var(--ink);
}

.brand-light {
  color: #f5f5e9;
}

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}

.boot-screen p {
  font-size: 14px;
  color: var(--muted);
}

.loading-dots {
  animation: pulse 1.4s infinite;
}

.button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  line-height: 1.6;
  white-space: normal;
  transition: background .15s,transform .15s,box-shadow .15s;
  min-height: 48px;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--ink);
  color: var(--surface);
}

.button.primary:hover:not(:disabled) {
  background: #255445;
  box-shadow: 0 3px 12px #173d3216;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: #c7d0c5;
}

.button.secondary:hover:not(:disabled) {
  background: var(--mint);
  border-color: #aabda8;
}

.button.small {
  font-size: 16px;
  padding: 8px 13px;
  min-height: 44px;
}

.button-note {
  font-size: 14px;
  font-weight: 400;
  opacity: .65;
}

.text-button {
  border: 0;
  background: none;
  padding: 5px 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.6;
  min-height: 44px;
}

.text-button:hover:not(:disabled) {
  color: var(--coral);
}

.text-button.subtle {
  color: var(--muted);
  font-weight: 450;
}

.text-button.subtle:hover:not(:disabled) {
  color: var(--ink);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: var(--muted);
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.icon-button:hover {
  background: #173d320c;
  color: var(--ink);
}

/* The split welcome page shares the same quiet stationery language as the editor. */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-story {
  background: var(--ink);
  color: var(--surface);
  padding: 45px clamp(34px,6vw,92px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-story:after {
  content: "";
  position: absolute;
  right: -220px;
  top: 18%;
  width: 460px;
  height: 460px;
  border: 1px solid #d7e4d115;
  border-radius: 50%;
  pointer-events: none;
}

.auth-story-copy {
  margin: 65px 0 32px;
  position: relative;
  z-index: 1;
}

.auth-story h1 {
  font-size: clamp(36px,4.2vw,62px);
  line-height: 1.24;
  font-weight: 500;
  letter-spacing: -.055em;
  margin-bottom: 24px;
}

.auth-story h1 em {
  font-style: normal;
  color: #d7e4c5;
}

.auth-description {
  font-size: 16px;
  line-height: 1.9;
  color: #bfd0c6;
}

.paper-ticket {
  background: #e8eedb;
  color: var(--ink);
  max-width: 330px;
  padding: 19px 25px 22px;
  margin: 5px 0 42px;
  transform: rotate(-4deg);
  box-shadow: 0 14px 35px #071e291b;
  position: relative;
  border-radius: 2px;
}

.ticket-caption {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
}

.ticket-rule {
  border-top: 1px dashed #83937f;
  margin: 13px 0;
}

.ticket-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  line-height: 2.15;
}

.ticket-line span:last-child {
  font-size: 14px;
  opacity: .6;
}

.ticket-punch {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  top: 45px;
  left: -8px;
}

.ticket-punch:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  left: 330px;
}

.auth-local {
  font-size: 14px;
  letter-spacing: .14em;
  color: #adc3b6;
  margin-top: auto;
}

.auth-local span {
  margin-left: 18px;
  letter-spacing: .05em;
  opacity: .7;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 35px;
}

.login-wrap {
  width: min(100%,365px);
}

.login-wrap h2 {
  font-size: 29px;
  margin-bottom: 13px;
}

.login-intro {
  font-size: 16px;
  margin-bottom: 35px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 12px 14px;
  height: 52px;
  color: var(--ink);
  font-size: 18px;
}

.field input::placeholder {
  color: #9aa399;
}

.login-button {
  width: 100%;
  justify-content: space-between;
  margin-top: 8px;
}

.inline-error {
  color: var(--danger);
  font-size: 14px;
  margin: 0 0 14px;
}

.demo-login {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.demo-login p {
  font-size: 16px;
  line-height: 1.9;
  margin-top: 6px;
  color: var(--ink-soft);
}

code {
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: 1em;
  letter-spacing: 0;
}

.demo-login code {
  background: #e9eddf;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 5px;
}

.login-footnote {
  font-size: 14px;
  color: #929a91;
  line-height: 1.8;
  margin-top: 29px;
}

.app-header {
  height: 89px;
  padding: 0 max(32px,calc((100vw - 1192px)/2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.app-header .brand-mark {
  width: 36px;
  height: 36px;
  font-size: 21px;
}

.app-header .brand {
  font-size: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}

.header-divider {
  height: 17px;
  width: 1px;
  background: var(--line);
  margin: 0 2px;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 6px 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  min-height: 44px;
  text-align: left;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #668165;
  flex-shrink: 0;
}

.save-status[data-status=saving] .status-dot {
  animation: pulse 1s infinite;
  background: var(--coral);
}

.save-status[data-status=dirty] .status-dot,.save-status[data-status=invalid] .status-dot {
  background: var(--coral);
}

.save-status[data-status=error],.save-status[data-status=conflict] {
  color: var(--danger);
}

.save-status[data-status=error] .status-dot,.save-status[data-status=conflict] .status-dot {
  background: var(--danger);
}

.user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.header-right .text-button {
  font-size: 16px;
}

.workspace {
  max-width: 1192px;
  margin: 0 auto;
  padding: 35px 0 20px;
  min-height: calc(100vh - 180px);
}

.workspace-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.workspace-intro .eyebrow {
  margin: 0;
  font-size: 14px;
}

.example-button {
  font-size: 16px;
  gap: 7px;
}

.example-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  margin-left: 8px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 49px;
  background: #edf0e8;
  border-radius: 9px;
  padding: 6px;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  background: none;
  text-align: left;
  padding: 15px 26px;
  color: #7a887c;
  font-weight: 550;
  font-size: 18px;
  border-radius: 5px;
  line-height: 1.5;
  transition: background .2s;
  min-width: 0;
}

.step small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-top: 4px;
  opacity: .78;
  line-height: 1.6;
}

.step-number {
  font-family: Georgia,serif;
  font-size: 24px;
  font-weight: 400;
  opacity: .75;
  line-height: 1;
}

.step-arrow {
  margin-left: auto;
  font-size: 19px;
  opacity: .5;
}

.step.active {
  background: var(--surface);
  box-shadow: 0 2px 6px #173d3209;
  color: var(--ink);
}

.step.active .step-number {
  color: var(--coral);
  opacity: 1;
}

.step:hover:not(.active) {
  background: #e3e9dd;
}

.notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--mint);
  border: 1px solid #d4dfcc;
  font-size: 16px;
  border-radius: 6px;
  margin: -20px 0 27px;
}

.notice.error {
  background: #fff1e9;
  border-color: #ecd0c5;
  color: var(--danger);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 31px;
}

.section-heading .eyebrow {
  margin-bottom: 11px;
}

.section-heading h1 {
  margin-bottom: 11px;
}

.section-heading p:not(.eyebrow) {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.heading-stat {
  display: flex;
  flex-direction: column;
  min-width: 125px;
  text-align: right;
  align-self: flex-end;
  padding-bottom: 3px;
  flex-shrink: 0;
}

.heading-stat strong {
  font-family: Georgia,serif;
  font-weight: 400;
  font-size: 47px;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.heading-stat span {
  font-size: 14px;
  color: var(--muted);
  margin-top: 3px;
}

.section-footer {
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 29px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.section-footer p {
  font-size: 14px;
  line-height: 1.8;
  max-width: 590px;
}

.app-footer {
  max-width: 1192px;
  margin: 12px auto 0;
  padding: 26px 0 28px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #8a958a;
  letter-spacing: .02em;
}

/* Account tabs and both coupon families remain directly editable on one surface. */
.account-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.account-tabs {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
}

.account-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 1px 14px;
  background: none;
  white-space: nowrap;
  font-size: 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  flex-shrink: 0;
}

.account-tab.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 650;
}

.tab-count {
  font-size: 14px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e9ede3;
  min-width: 18px;
  text-align: center;
}

.account-nav>.button {
  margin-bottom: 10px;
  flex-shrink: 0;
}

.account-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.account-name-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-name-field label {
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
}

.account-name-field input {
  font-size: 18px;
  max-width: 245px;
  width: 245px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
  min-height: 48px;
}

.remove-account {
  font-size: 16px;
}

.coupon-columns {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.1fr);
  gap: 36px;
}

.coupon-family-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.coupon-family-header h2 {
  font-size: 24px;
  margin: 0;
  display: flex;
  gap: 11px;
  align-items: center;
}

.family-icon {
  font-family: Georgia,serif;
  font-size: 19px;
  font-weight: 400;
  width: 27px;
  height: 27px;
  border: 1px solid #a2b29d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -.02em;
}

.vip-family .family-icon {
  border-color: #c1ae89;
  color: #8b7751;
  font-size: 14px;
}

.coupon-family-header>span {
  font-size: 14px;
  color: var(--muted);
}

.coupon-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  min-height: 108px;
  padding: 20px 0;
}

.coupon-value {
  font-size: 16px;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.coupon-value strong {
  font-family: Georgia,serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -.04em;
}

.coupon-value .discount-number {
  color: var(--coral);
}

.coupon-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
  display: block;
  line-height: 1.5;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quantity-control select {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 62px;
  padding: 7px 18px 7px 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  background-image: linear-gradient(45deg,transparent 50%,#6e8275 50%),linear-gradient(135deg,#6e8275 50%,transparent 50%);
  background-position: calc(100% - 12px) 50%,calc(100% - 8px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
  height: 48px;
  padding-left: 13px;
}

.quantity-control>span {
  font-size: 16px;
  color: var(--muted);
}

.vip-family .coupon-row {
  grid-template-columns: minmax(0,1fr) minmax(205px,1.1fr) auto;
  gap: 14px;
  min-height: 104px;
  padding: 19px 0;
}

.vip-family .coupon-value strong {
  font-size: 28px;
}

.tier-select {
  appearance: none;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 16px;
  padding: 10px 24px 10px 12px;
  background-image: linear-gradient(45deg,transparent 50%,#6e8275 50%),linear-gradient(135deg,#6e8275 50%,transparent 50%);
  background-position: calc(100% - 12px) 50%,calc(100% - 8px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
  min-height: 48px;
}

.tier-select.fixed {
  font-size: 16px;
  border: 0;
  color: var(--muted);
  background: none;
  padding-left: 0;
  cursor: default;
  min-height: 0;
}

.coupon-family-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  padding-top: 20px;
  max-width: 380px;
}

.beauty-family-note {
  margin-top: 24px;
  padding: 22px;
  background: #eef1e8;
  border-radius: 5px;
  display: flex;
  gap: 15px;
}

.beauty-family-note .note-symbol {
  font-size: 28px;
  font-family: Georgia,serif;
  font-style: italic;
  line-height: 1.1;
  color: #8ca17e;
}

.beauty-family-note strong {
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
  font-weight: 550;
}

.beauty-family-note p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

.no-accounts {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.no-accounts h2 {
  font-size: 21px;
  margin-bottom: 8px;
}

.no-accounts p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.table-scroll {
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}

.product-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  min-width: 680px;
}

.product-name-col {
  width: 40%;
}

.product-table col:not(.product-name-col) {
  width: 15%;
}

.product-table thead {
  background: #eef1e9;
}

.product-table th {
  text-align: left;
  font-weight: 550;
  font-size: 16px;
  color: var(--ink-soft);
  padding: 17px 14px;
  white-space: normal;
}

.product-table th:first-child {
  padding-left: 17px;
}

.product-table th small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  margin-left: 3px;
}

.product-table th:nth-child(n+4),.product-table td:nth-child(n+4) {
  text-align: center;
}

.product-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  height: 76px;
}

.product-table tr:focus-within {
  background: #fffdf6;
}

.product-table input[type=text] {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--surface);
  font-size: 18px;
  color: var(--ink);
  height: 48px;
  padding: 6px 8px;
  border-color: var(--line);
}

.product-table input[type=text]:hover {
  border-color: var(--line);
}

.product-table input[type=text]::placeholder {
  color: #a0a89e;
}

.product-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-index {
  font-family: Georgia,serif;
  font-size: 14px;
  color: #9aa898;
  flex-shrink: 0;
  min-width: 19px;
  align-self: center;
}

.product-name-cell input {
  flex: 1;
}

.delete-product {
  color: #a0ab9e;
  font-size: 24px;
  flex-shrink: 0;
  opacity: 1;
  width: 44px;
  height: 44px;
}

.product-table tr:hover .delete-product,.delete-product:focus-visible {
  opacity: 1;
}

.delete-product:hover {
  color: var(--danger);
  background: #f5e8e2;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 1px;
  color: #8a9689;
  position: relative;
  min-width: 0;
}

.money-input>span {
  font-size: 16px;
}

.money-input input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.eligibility-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

.eligibility-label input {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 1px solid #b7c7b1;
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  place-content: center;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.eligibility-label input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.eligibility-label input:checked:after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.5px solid white;
  border-bottom: 1.5px solid white;
  transform: rotate(-45deg) translate(0,-1px);
}

.eligibility-label:has(input:checked) {
  color: var(--ink-soft);
}

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 1px;
}

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

.product-actions>span {
  font-size: 14px;
}

.validation-message {
  font-size: 16px;
  color: var(--danger);
  padding: 12px 15px;
  background: #fcf0e9;
  border: 1px solid #eddbce;
  border-radius: 5px;
  margin: 0 0 17px;
}

.shopping-summary {
  display: flex;
  align-items: center;
  gap: 36px;
  background: #eef1e6;
  border-radius: 5px;
  padding: 22px 27px;
  margin-top: 4px;
}

.shopping-summary>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 165px;
}

.shopping-summary>div span {
  font-size: 14px;
  color: var(--muted);
}

.shopping-summary strong {
  font-family: Georgia,serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.shopping-summary>p {
  margin-left: auto;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.assumption {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.assumption p {
  max-width: 990px;
}

.assumption strong {
  font-weight: 600;
  color: var(--ink-soft);
  margin-right: 8px;
}

.assumption-mark {
  border: 1px solid #a7b3a3;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: Georgia,serif;
  font-style: italic;
  line-height: 1;
  margin-top: 3px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border-bottom: 1px solid var(--line);
}

.empty-state h2 {
  font-size: 20px;
  margin: 12px 0 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

.empty-glyph {
  font-size: 26px;
  font-weight: 300;
  color: var(--coral);
}

.plan-empty {
  text-align: center;
  padding: 36px 20px 50px;
  background: radial-gradient(ellipse at center,#edf1e5 0%,transparent 65%);
}

.plan-empty h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.plan-empty>p:not(.eyebrow) {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 25px;
}

.plan-empty .eyebrow {
  font-size: 14px;
  margin: 26px 0 10px;
}

.plan-illustration {
  background: #fdfdf6;
  border: 1px solid #d7dfd1;
  border-radius: 6px;
  width: 90px;
  height: 112px;
  margin: auto;
  transform: rotate(-7deg);
  box-shadow: 9px 8px 0 #dde5d7;
  padding: 14px 17px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.plan-illustration>span {
  font-family: Georgia,serif;
  font-size: 28px;
  color: var(--coral);
  line-height: 1.3;
  margin-bottom: 9px;
}

.plan-illustration i {
  border-top: 1px solid #c4cfbc;
  width: 100%;
  height: 10px;
}

.plan-illustration i:last-child {
  width: 65%;
}

.solve-progress {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: #e8eee0;
  border: 1px solid #d3ddc9;
  border-radius: 7px;
  margin-bottom: 28px;
}

.solve-progress h2 {
  font-size: 20px;
  margin-bottom: 3px;
}

.solve-progress p {
  font-size: 14px;
  color: var(--muted);
}

.solve-spinner {
  width: 27px;
  height: 27px;
  border: 2px solid #c6d4c0;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}

.solve-progress>span {
  margin-left: auto;
  font-size: 14px;
  white-space: nowrap;
  color: var(--ink-soft);
}

.plan-stale {
  font-size: 16px;
  background: #fcf0df;
  border: 1px solid #e9d7b5;
  color: #86642a;
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.plan-result-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #e4edda;
  padding: 5px 10px;
  border-radius: 4px;
  color: #42683f;
  font-weight: 600;
  font-size: 14px;
}

.proof-badge.feasible {
  background: #f5e8d0;
  color: #8a6e31;
}

.proof-badge>span {
  font-size: 14px;
}

.plan-hero {
  background: var(--ink);
  border-radius: 9px;
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
  overflow: hidden;
  color: var(--surface);
  margin-bottom: 18px;
  position: relative;
}

.plan-hero-main {
  padding: 31px 35px;
  border-right: 1px solid #bcd0b824;
}

.plan-hero-main .small-label {
  color: #b9ceb9;
  letter-spacing: .06em;
}

.savings-amount {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: Georgia,serif;
  font-size: 58px;
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.3;
  margin: 7px 0;
}

.savings-amount small {
  font-size: 25px;
  margin-right: 1px;
}

.plan-hero-main>p {
  font-size: 14px;
  color: #adbfaf;
  line-height: 1.85;
}

.plan-hero-breakdown {
  padding: 31px 35px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.plan-hero-breakdown>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  font-size: 16px;
  color: #b9c9bc;
}

.plan-hero-breakdown strong {
  font-family: Georgia,serif;
  font-size: 20px;
  font-weight: 400;
  color: #f4f4e5;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.plan-hero-breakdown>.hero-tail {
  margin-top: 7px;
  border-top: 1px solid #bcd0b830;
  padding-top: 12px;
  color: #e8eedf;
  font-size: 18px;
}

.hero-tail strong {
  font-size: 30px;
  color: #dce8c7;
}

.plan-proof {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 23px;
  margin-bottom: 25px;
}

.plan-proof p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 750px;
}

.plan-proof strong {
  font-weight: 600;
  color: var(--ink-soft);
}

.plan-proof .button {
  font-size: 16px;
  padding: 10px 15px;
  flex-shrink: 0;
}

.orders-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.orders-heading h2 {
  font-size: 24px;
  margin: 0;
}

.orders-heading>span {
  font-size: 14px;
  color: var(--muted);
}

.order {
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  background: #edf1e7;
  gap: 15px;
}

.order-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.order-number {
  font-family: Georgia,serif;
  font-size: 20px;
  font-weight: 400;
  color: #739069;
}

.order-title h3 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.order-header>span {
  font-size: 14px;
  color: var(--muted);
}

.order-body {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  gap: 30px;
  padding: 22px;
}

.order-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.order-items li {
  display: grid;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  line-height: 1.65;
  grid-template-columns: minmax(0,1fr) auto;
}

.order-items .item-price {
  font-family: Georgia,serif;
  font-size: 18px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

.item-deposit {
  font-size: 14px;
  color: var(--muted);
  margin-top: 1px;
}

.order-coupons {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.used-coupon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.8;
  min-width: 0;
}

.coupon-type {
  padding: 1px 6px;
  border: 1px solid #cfdbc6;
  border-radius: 3px;
  color: #55714d;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

.coupon-type.vip {
  color: #8c7352;
  border-color: #e1d6bd;
}

.used-coupon strong {
  font-weight: 600;
  font-size: 18px;
}

.used-coupon p {
  font-size: 14px;
  color: var(--muted);
}

.expansion-required {
  color: #b55a41!important;
  font-weight: 600;
}

.coupon-unused {
  font-size: 14px;
  color: var(--muted);
  padding-top: 1px;
}

.order-totals {
  border-top: 1px dashed var(--line);
  margin: 0 22px;
  padding: 14px 0;
  display: grid;
  align-items: center;
  gap: 18px 24px;
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.order-totals>div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  flex-direction: column;
}

.order-totals strong {
  font-family: Georgia,serif;
  font-size: 18px;
  letter-spacing: .01em;
  font-weight: 400;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-totals>.order-tail {
  margin-left: 0;
  color: var(--ink);
  grid-column: 1/-1;
  flex-direction: row;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 18px;
}

.order-tail strong {
  font-size: 28px;
  color: var(--ink);
}

.plan-notes {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.95;
  border-left: 2px solid #ccd6c3;
  padding-left: 14px;
  margin-top: 25px;
}

.plan-notes strong {
  font-weight: 600;
  color: var(--ink-soft);
}

.modal {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 11px;
  padding: 30px;
  width: calc(100% - 36px);
  max-width: 440px;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: #102b245e;
  backdrop-filter: blur(3px);
}

.modal h2 {
  font-size: 22px;
  margin: 12px 0 12px;
}

.modal p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.9;
}

.modal-symbol {
  color: var(--coral);
  font-size: 26px;
  line-height: 1;
}

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

.modal-actions .button {
  font-size: 16px;
  padding: 10px 18px;
}

.conflict-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 17px 0;
  font-size: 16px;
}

.conflict-details>div {
  background: var(--mint);
  border-radius: 5px;
  padding: 12px;
}

.conflict-details strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  font-weight: 600;
}

.conflict-details span {
  font-size: 14px;
  color: var(--muted);
}

.conflict-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.conflict-actions .button {
  font-size: 16px;
  padding: 10px;
}

.conflict-hint {
  font-size: 14px!important;
}

.noscript {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #fff1e9;
  color: var(--danger);
  padding: 20px;
  border: 1px solid #dbbaa9;
  z-index: 100;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,100% {
    opacity: .4;
  }
  50% {
    opacity: 1;
  }
}

/* Content is allowed to wrap before the page itself ever needs to scroll sideways. */
.section-heading > div,
.coupon-family-header > *,
.coupon-row > div,
.used-coupon > div {
  min-width: 0;
}

.account-tab > span:first-child {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile labels share each table cell with its original input. */
.mobile-field-label {
  display: none;
}

@media (min-width: 1600px) {
  .auth-story {
    padding-left: calc((100vw - 1340px) / 2);
  }
  .auth-story-copy {
    margin-top: 85px;
  }
  .auth-form-side {
    padding-right: calc((100vw - 1340px) / 2);
  }
}

@media (max-width: 1280px) {
  .workspace,
  .app-footer {
    margin-left: 32px;
    margin-right: 32px;
  }
  .app-header {
    padding-left: 32px;
    padding-right: 32px;
  }
  .coupon-columns {
    gap: 32px;
  }
  .section-heading h1 {
    font-size: 36px;
  }
  .vip-family .coupon-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
  }
  .vip-family .tier-select {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }
  .vip-family .quantity-control {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 1000px) {
  .workspace,
  .app-footer {
    margin-left: 24px;
    margin-right: 24px;
  }
  .app-header {
    padding-left: 24px;
    padding-right: 24px;
  }
  .header-right {
    gap: 12px;
  }
  .step {
    padding: 16px;
    gap: 12px;
  }
  .step-arrow,
  .example-count {
    display: none;
  }
  .section-heading h1 {
    font-size: 32px;
  }
  .heading-stat {
    min-width: 110px;
  }
  .heading-stat strong {
    font-size: 42px;
  }
  .coupon-columns {
    gap: 28px;
  }
  .coupon-family-header > span {
    flex-basis: 100%;
  }
  .product-table th,
  .product-table td {
    padding-left: 8px;
    padding-right: 8px;
  }
  .row-index {
    display: none;
  }
  .product-name-cell {
    gap: 4px;
  }
  .plan-hero-main,
  .plan-hero-breakdown {
    padding: 26px;
  }
  .plan-proof {
    flex-wrap: wrap;
  }
  .order-body {
    gap: 20px;
  }
  .order-coupons {
    padding-left: 20px;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-story h1 {
    font-size: 47px;
  }
  .auth-form-side {
    padding: 35px;
  }
}

/* Below tablet width, each product becomes a card without cloning any form controls. */
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .eyebrow,
  .small-label,
  small,
  .button-note,
  .boot-screen p,
  .inline-error,
  .login-footnote,
  .header-right,
  .save-status,
  .workspace-intro .eyebrow,
  .example-count,
  .step small,
  .heading-stat span,
  .section-footer p,
  .app-footer,
  .tab-count,
  .coupon-family-header > span,
  .coupon-subtitle,
  .coupon-family-note,
  .beauty-family-note p,
  .no-accounts p,
  .empty-state p,
  .row-index,
  .product-table th small,
  .product-actions > span,
  .shopping-summary > div span,
  .shopping-summary > p,
  .assumption,
  .plan-empty .eyebrow,
  .solve-progress p,
  .solve-progress > span,
  .plan-result-topline,
  .proof-badge,
  .proof-badge > span,
  .plan-hero-main > p,
  .plan-proof p,
  .orders-heading > span,
  .order-header > span,
  .item-deposit,
  .coupon-type,
  .used-coupon p,
  .coupon-unused,
  .order-totals > div,
  .plan-notes,
  .conflict-details span,
  .conflict-hint {
    font-size: 16px;
  }
  .conflict-hint {
    font-size: 16px !important;
  }
  .eyebrow {
    letter-spacing: .12em;
  }
  .auth-screen {
    grid-template-columns: minmax(0,1fr);
  }
  .auth-story {
    padding: 24px;
  }
  .auth-story-copy {
    margin: 28px 0 0;
  }
  .auth-story h1 {
    font-size: 34px;
    line-height: 1.4;
    margin-bottom: 0;
  }
  .auth-story h1 br {
    display: none;
  }
  .auth-description,
  .paper-ticket {
    display: none;
  }
  .auth-local {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.8;
  }
  .auth-form-side {
    padding: 32px 24px 40px;
  }
  .login-wrap {
    width: min(100%,440px);
  }
  .login-wrap h2 {
    font-size: 28px;
  }
  .login-wrap > .eyebrow {
    display: none;
  }
  .login-intro {
    margin-bottom: 28px;
  }
  .demo-login {
    flex-wrap: wrap;
    gap: 14px;
  }
  .demo-login .text-button {
    margin-left: auto;
  }
  .app-header {
    height: auto;
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 2px 12px;
    padding: 16px 20px 8px;
  }
  .app-header .brand {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
    font-size: 22px;
    gap: 9px;
  }
  .app-header .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }
  .header-right {
    display: contents;
  }
  .header-divider {
    display: none;
  }
  .user-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
    max-width: 100px;
  }
  #logout {
    grid-column: 3;
    grid-row: 1;
    min-width: 44px;
  }
  .save-status {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    white-space: normal;
  }
  .status-dot {
    width: 6px;
    height: 6px;
  }
  .workspace,
  .app-footer {
    margin-left: 20px;
    margin-right: 20px;
  }
  .workspace {
    padding-top: 20px;
  }
  .workspace-intro {
    margin-bottom: 22px;
    gap: 8px;
  }
  .workspace-intro > .eyebrow {
    display: none;
  }
  .example-button {
    justify-content: flex-start;
    min-height: 44px;
  }
  .steps {
    margin-bottom: 32px;
    gap: 4px;
    padding: 5px;
  }
  .step {
    min-height: 82px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 10px 5px;
    font-size: 16px;
    line-height: 1.5;
  }
  .step-number {
    font-size: 22px;
  }
  .step small {
    display: none;
  }
  .section-heading {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
  }
  .section-heading > div:first-child {
    flex-basis: 100%;
  }
  .section-heading h1 {
    font-size: 30px;
    line-height: 1.4;
  }
  .section-heading p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.8;
  }
  .heading-stat {
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    gap: 10px;
    padding: 0;
  }
  .heading-stat strong {
    font-size: 34px;
  }
  .heading-stat span {
    margin: 0;
  }
  .account-nav {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-start;
  }
  .account-tabs {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    gap: 20px;
  }
  .account-tab {
    min-height: 52px;
    gap: 8px;
    padding: 10px 2px 13px;
  }
  .account-tab > span:first-child {
    max-width: 210px;
  }
  .account-nav > .button {
    margin: 0 0 14px auto;
  }
  .account-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 26px;
  }
  .account-name-field {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .account-name-field input {
    width: 100%;
    max-width: none;
  }
  .remove-account {
    align-self: flex-end;
  }
  .coupon-columns {
    grid-template-columns: minmax(0,1fr);
    gap: 36px;
  }
  .coupon-family-header {
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 16px;
  }
  .coupon-family-header h2 {
    font-size: 25px;
  }
  .coupon-row {
    min-height: 112px;
    gap: 12px;
    padding: 20px 0;
  }
  .coupon-value strong,
  .vip-family .coupon-value strong {
    font-size: 30px;
  }
  .coupon-subtitle {
    margin-top: 9px;
    overflow-wrap: anywhere;
  }
  .vip-family .coupon-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 15px 12px;
    padding: 20px 0;
  }
  .vip-family .tier-select {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    width: 100%;
    font-size: 16px;
    min-height: 48px;
  }
  .vip-family .tier-select.fixed {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .vip-family .quantity-control {
    grid-column: 2;
    grid-row: 1;
  }
  .quantity-control {
    gap: 7px;
  }
  .quantity-control select {
    width: 64px;
    height: 48px;
    font-size: 18px;
  }
  .beauty-family-note {
    padding: 19px;
    margin-top: 20px;
  }
  .coupon-family-note {
    max-width: none;
  }
  .table-scroll {
    overflow: visible;
    border-top: 0;
  }
  .product-table,
  .product-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .product-table colgroup {
    display: none;
  }
  .product-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .product-table tbody {
    display: grid;
    gap: 18px;
  }
  .product-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px 12px;
    min-width: 0;
    padding: 18px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
  }
  .product-table td,
  .product-table td:nth-child(n+4) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    text-align: left;
  }
  .product-table td:first-child {
    grid-column: 1 / -1;
  }
  .mobile-field-label {
    display: block;
    font-size: 16px;
    font-weight: 550;
    line-height: 1.5;
    color: var(--ink-soft);
  }
  .product-name-cell {
    gap: 6px;
  }
  .product-table input[type=text] {
    font-size: 18px;
    height: 50px;
    padding: 10px;
    border: 1px solid #cbd5c7;
    border-radius: 6px;
    background: #fffefb;
  }
  .product-name-cell input {
    min-width: 0;
  }
  .delete-product {
    width: 44px;
    height: 44px;
    color: var(--danger);
  }
  .money-input {
    padding-left: 0;
    gap: 5px;
  }
  .money-input input {
    text-align: left;
    padding-left: 8px;
    padding-right: 4px;
  }
  .eligibility-label {
    display: flex;
    min-height: 48px;
    width: 100%;
    border: 1px solid #cbd5c7;
    border-radius: 6px;
    padding: 9px 10px;
    gap: 9px;
    font-size: 16px;
  }
  .eligibility-label:has(input:checked) {
    background: #eff4e8;
    border-color: #a9bfa0;
  }
  .product-actions {
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 0;
  }
  .product-actions > span {
    margin-left: auto;
  }
  .shopping-summary {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 18px;
    padding: 22px;
  }
  .shopping-summary > div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
    gap: 16px;
  }
  .shopping-summary strong {
    font-size: 28px;
    white-space: nowrap;
  }
  .shopping-summary > p {
    margin: 0;
    line-height: 1.8;
  }
  .shopping-summary > p br {
    display: none;
  }
  .assumption {
    gap: 10px;
    margin-top: 24px;
    line-height: 1.85;
  }
  .assumption-mark {
    width: 20px;
    height: 20px;
    margin-top: 4px;
  }
  .section-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding-top: 22px;
  }
  .section-footer > .button {
    width: 100%;
    margin-left: 0;
    min-height: 52px;
    font-size: 16px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .section-footer > .text-button {
    align-self: flex-start;
  }
  .section-footer p {
    max-width: none;
  }
  .app-footer {
    flex-direction: column;
    gap: 8px;
    padding: 25px 0 30px;
    margin-top: 4px;
  }
  .notice {
    align-items: flex-start;
    margin: 0 0 24px;
    padding: 12px 12px 12px 16px;
    font-size: 16px;
  }
  .notice > span {
    padding-top: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .plan-empty {
    padding: 30px 16px 44px;
  }
  .plan-empty h2 {
    font-size: 28px;
  }
  .plan-result-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .proof-badge {
    padding: 7px 10px;
    line-height: 1.6;
  }
  .plan-hero {
    grid-template-columns: minmax(0,1fr);
  }
  .plan-hero-main {
    padding: 26px 22px;
    border-right: 0;
    border-bottom: 1px solid #bcd0b824;
  }
  .savings-amount {
    font-size: 46px;
  }
  .plan-hero-breakdown {
    padding: 24px 22px;
    gap: 14px;
  }
  .plan-hero-breakdown > div {
    gap: 15px;
    font-size: 16px;
  }
  .plan-hero-breakdown strong {
    font-size: 20px;
    white-space: nowrap;
  }
  .hero-tail strong {
    font-size: 30px;
  }
  .plan-proof {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 25px;
  }
  .plan-proof .button {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
  .orders-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .orders-heading h2 {
    font-size: 25px;
  }
  .order {
    border-radius: 9px;
    margin-bottom: 24px;
  }
  .order-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 17px 18px;
  }
  .order-title {
    align-items: baseline;
    gap: 10px;
  }
  .order-title h3 {
    font-size: 20px;
  }
  .order-number {
    font-size: 24px;
    flex-shrink: 0;
  }
  .order-body {
    grid-template-columns: minmax(0,1fr);
    padding: 20px 18px;
    gap: 22px;
  }
  .order-items {
    gap: 18px;
  }
  .order-items li {
    gap: 12px;
    font-size: 16px;
  }
  .item-deposit {
    margin-top: 5px;
  }
  .order-coupons {
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    gap: 18px;
  }
  .used-coupon {
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .used-coupon > div {
    flex: 1 1 180px;
  }
  .used-coupon p {
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
  .coupon-type {
    padding: 2px 7px;
  }
  .order-totals {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin: 0 18px;
    padding: 18px 0;
  }
  .order-totals > div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }
  .order-totals strong {
    font-size: 18px;
  }
  .order-totals > .order-tail {
    margin: 4px 0 0;
    padding-top: 16px;
    font-size: 16px;
  }
  .order-tail strong {
    font-size: 26px;
  }
  .plan-notes {
    line-height: 1.85;
    padding-left: 12px;
  }
  .plan-notes p + p {
    margin-top: 12px;
  }
  .solve-progress {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: flex-start;
    padding: 20px 18px;
    gap: 12px;
  }
  .solve-progress h2 {
    font-size: 18px;
  }
  .solve-progress > span {
    grid-column: 2;
    margin-left: 0;
  }
  .solve-spinner {
    margin-top: 4px;
  }
  .section-heading > #recalculate {
    width: 100%;
    font-size: 16px;
    min-height: 48px;
  }
  .modal {
    padding: 25px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
  .modal h2 {
    font-size: 25px;
  }
  .modal p {
    font-size: 16px;
  }
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .modal-actions .button {
    min-height: 48px;
    font-size: 16px;
    padding: 10px;
  }
  .conflict-details {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 430px) {
  .workspace,
  .app-footer {
    margin-left: 16px;
    margin-right: 16px;
  }
  .app-header {
    padding-left: 16px;
    padding-right: 16px;
    column-gap: 10px;
  }
  .user-name {
    max-width: 72px;
  }
  .auth-story,
  .auth-form-side {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section-heading h1 {
    font-size: 28px;
  }
  .coupon-value,
  .vip-family .coupon-value {
    gap: 4px;
  }
  .coupon-value strong,
  .vip-family .coupon-value strong {
    font-size: 28px;
  }
  .quantity-control select {
    width: 58px;
  }
  .product-table tbody tr {
    padding: 17px 14px;
    column-gap: 12px;
  }
  .shopping-summary {
    padding: 20px 18px;
  }
  .shopping-summary > div {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .shopping-summary strong {
    font-size: 27px;
    margin-left: auto;
  }
  .savings-amount {
    font-size: 42px;
  }
  .plan-hero-breakdown strong {
    font-size: 18px;
  }
  .hero-tail strong {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
