:root {
  --green-950: #073d30;
  --green-900: #0b4a39;
  --green-800: #155f4c;
  --green-700: #2d7965;
  --green-100: #e7f2ee;
  --gold: #ffc62e;
  --gold-deep: #ecab00;
  --red: #df4054;
  --ink: #1f2933;
  --muted: #69747d;
  --line: #dce2e5;
  --surface: #ffffff;
  --surface-soft: #f4f6f7;
  --shadow: 0 14px 34px rgba(12, 52, 43, .12);
  --radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: #eef2f1;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(30, 110, 88, .08), transparent 24rem),
    radial-gradient(circle at 90% 85%, rgba(255, 198, 46, .10), transparent 24rem),
    #f5f7f6;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, select { width: 100%; }

.app-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px minmax(130px, 1fr) auto 44px;
  align-items: center;
  gap: 10px;
  color: white;
  background: linear-gradient(135deg, var(--green-950), var(--green-800));
  box-shadow: 0 8px 24px rgba(7, 61, 48, .2);
  padding: 8px 12px;
}

.icon-button {
  border: 0;
  background: transparent;
  color: white;
  font-size: 29px;
  line-height: 1;
  border-radius: 10px;
  height: 42px;
}
.icon-button:hover { background: rgba(255,255,255,.1); }

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: #f1e7ff;
  color: #14151a;
  padding: 5px 10px 5px 6px;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}
.profile-pill span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  background: white;
  color: var(--green-900);
}

.brand {
  color: var(--gold);
  text-decoration: none;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
  letter-spacing: -.7px;
  white-space: nowrap;
}
.brand-mark { display: inline-block; transform: rotate(-20deg); }
.brand small { font-size: 9px; letter-spacing: .7px; color: white; }


.auth-screen {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 28px 0;
}
.auth-card {
  width: min(720px, 100%);
  border: 1px solid rgba(10, 76, 59, .08);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}
.auth-loading, .auth-error { text-align: center; padding: 30px 12px; }
.auth-loading h1, .auth-error h1, .registration-panel h1 { color: var(--green-950); margin: 10px 0 5px; }
.auth-loading p, .auth-error p { color: var(--muted); margin: 0 0 18px; }
.spinner {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  border: 5px solid var(--green-100); border-top-color: var(--green-700);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; font-size: 30px; font-weight: 900; }
.auth-icon.error { background: #ffe3e7; color: var(--red); }
.registration-heading { margin-bottom: 14px; }
.line-profile-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); padding: 12px;
}
.line-profile-card img {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  background: var(--green-100); border: 2px solid white; box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.line-profile-card small { display: block; color: var(--muted); }
.line-profile-card strong { color: var(--green-950); font-size: 18px; }
.registration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.registration-grid label { color: var(--muted); font-size: 13px; font-weight: 750; }
.registration-grid input, .registration-grid select {
  min-height: 46px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px;
  background: white; padding: 9px 11px; outline: none;
}
.registration-grid input:focus, .registration-grid select:focus {
  border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(45,121,101,.12);
}
.required { color: var(--red); }
.privacy-consent { margin: 17px 0 12px; }
.privacy-consent a { color: var(--green-800); font-weight: 800; }
.register-submit { margin-top: 12px; }
.member-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft);
  margin-bottom: 16px; padding: 12px 14px;
}
.member-summary .member-avatar {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--green-100); color: var(--green-900); font-weight: 900;
  background-size: cover; background-position: center;
}
.member-summary strong { color: var(--green-950); }
.member-summary small { display: block; margin-top: 2px; color: var(--muted); }

.lottery-selector-card {
  margin: 22px 0 10px;
  border: 1px solid rgba(10, 76, 59, .08);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 15px;
}
.lottery-selector-heading {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px;
}
.lottery-selector-heading h1 { margin: 3px 0 0; color: var(--green-950); font-size: 20px; }
.lottery-count { border-radius: 999px; background: var(--green-100); color: var(--green-900); padding: 6px 10px; font-size: 12px; font-weight: 850; }
.lottery-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lottery-option {
  min-height: 62px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px;
  border: 1.5px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--ink);
  padding: 9px 11px; text-align: left; font-weight: 850;
}
.lottery-option .flag { font-size: 24px; }
.lottery-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 650; }
.lottery-option.active { border-color: var(--green-700); background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: white; }
.lottery-option.active small { color: rgba(255,255,255,.72); }
.selector-help { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.lottery-banner {
  margin: 22px 0 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}
.lottery-banner strong { font-size: 22px; }
.lottery-banner small {
  color: rgba(255,255,255,.75);
  border-left: 1px solid rgba(255,255,255,.3);
  padding-left: 10px;
}

.demo-notice {
  margin-bottom: 12px;
  border: 1px solid #f2d471;
  background: #fff8dd;
  color: #654d00;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
}

.step-panel { display: none; }
.step-panel.active { display: block; }

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

.main-card, .cart-card, .summary-card, .success-card {
  background: var(--surface);
  border: 1px solid rgba(10, 76, 59, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.main-card { padding: 14px; }
.cart-card {
  position: sticky;
  top: 82px;
  overflow: hidden;
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
}
.tab {
  min-height: 44px;
  border: 0;
  background: transparent;
  font-weight: 750;
}
.tab.active { background: var(--gold); color: #fff; }

.bet-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.bet-type-button {
  position: relative;
  min-height: 48px;
  border: 1.5px solid var(--green-700);
  border-radius: 11px;
  background: white;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}
.bet-type-button.active {
  background: var(--green-700);
  color: white;
}
.rate-chip {
  position: absolute;
  right: 6px;
  top: -8px;
  border-radius: 999px;
  background: var(--green-700);
  color: white;
  font-size: 12px;
  padding: 2px 7px;
}
.bet-type-button.active .rate-chip { background: #f8fdff; color: var(--green-900); }

.number-entry {
  padding: 8px 0 4px;
  text-align: center;
}
.digit-boxes {
  min-height: 58px;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.digit-box {
  width: 50px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--green-900);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 25px;
  font-weight: 900;
}
.entry-help { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

.number-tools {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin: 8px 0;
}
.tool-button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: #e5e9eb;
  font-weight: 800;
}
.tool-button.primary { background: var(--green-800); color: white; }

.quick-number-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}
.quick-number-grid button {
  min-height: 39px;
  border: 1px solid var(--gold-deep);
  border-radius: 7px;
  background: white;
  font-weight: 750;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.keypad button {
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: white;
  font-size: 24px;
  font-weight: 900;
}
.keypad button:active { transform: translateY(1px); }
.keypad .key-secondary { background: #e6eaec; color: #111; font-size: 16px; }

.cart-header {
  background: var(--green-700);
  color: white;
  padding: 15px;
}
.cart-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header strong {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 28px;
  border-radius: 8px;
  background: white;
  color: var(--green-950);
}
.danger-link {
  display: block;
  margin: 10px auto 0;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
}

.cart-list {
  max-height: 470px;
  overflow-y: auto;
  padding: 10px;
}
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 40px 10px;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 8px;
}
.cart-item-title {
  font-weight: 800;
  color: var(--green-900);
}
.cart-item-number {
  font-size: 21px;
  font-weight: 900;
  color: #4234d6;
}
.cart-item button {
  align-self: center;
  border: 0;
  border-radius: 7px;
  background: #ffe0e4;
  color: var(--red);
  width: 34px;
  height: 34px;
}
.cart-footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px;
}

.primary-button, .secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  font-weight: 900;
}
.primary-button {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: white;
}
.secondary-button {
  background: var(--gold);
  color: white;
}
.primary-button.full { width: 100%; }

.summary-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading h1 {
  margin: 4px 0;
  color: var(--green-950);
}
.section-heading p { margin: 0; color: var(--muted); }
.eyebrow {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .5px;
}
.status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}
.status-badge.warning { background: #fff1c2; color: #7b5700; }

.customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.customer-grid label, .equal-price-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.customer-grid input, .equal-price-row input {
  margin-top: 6px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
}
.field-note {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 11px 13px;
}
.field-note strong {
  display: block;
  color: var(--green-900);
  margin-bottom: 3px;
}
.field-note span {
  color: var(--muted);
  font-size: 13px;
}
.full-width {
  grid-column: 1 / -1;
}

.customer-grid input:focus, .equal-price-row input:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(45,121,101,.12);
}

.price-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}
.price-table th, .price-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.price-table th {
  color: var(--muted);
  font-size: 13px;
  background: var(--surface-soft);
}
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-number {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.price-number strong {
  border-radius: 6px;
  background: var(--green-700);
  color: white;
  padding: 6px 12px;
  min-width: 72px;
}
.amount-input {
  width: 100px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  text-align: center;
}
.table-delete {
  border: 0;
  border-radius: 7px;
  background: #ffe2e5;
  color: var(--red);
  width: 36px;
  height: 36px;
}

.equal-price-row {
  display: grid;
  grid-template-columns: minmax(160px, 260px) auto;
  justify-content: end;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
}
.totals-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
  gap: 8px;
}
.totals-box > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px;
}
.totals-box span { color: var(--muted); font-size: 13px; }
.totals-box strong { color: var(--green-900); font-size: 18px; }
.totals-box.emphasis {
  grid-template-columns: 1fr 1fr;
  background: #eef7f3;
  margin-top: 16px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 20px;
}

.confirm-customer {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-soft);
}
.confirm-customer strong { color: var(--green-900); }
.confirm-list { display: grid; gap: 8px; }
.confirm-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 90px 90px 130px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
}
.confirm-item .number {
  color: #4234d6;
  font-size: 22px;
  font-weight: 900;
}
.confirm-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #ebca62;
  border-radius: 10px;
  background: #fff8dd;
  margin-top: 18px;
  padding: 13px;
  cursor: pointer;
}
.confirm-checkbox input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--green-800);
}

.error-box {
  margin-top: 12px;
  border: 1px solid #ef9da8;
  background: #fff0f2;
  color: #8e1e2d;
  border-radius: 9px;
  padding: 10px 12px;
}

.success-card {
  width: min(620px, 100%);
  margin: 25px auto;
  padding: 34px;
  text-align: center;
}
.success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 38px;
  font-weight: 900;
}
.success-card h1 { color: var(--green-950); margin: 6px 0; }
.success-card p { color: var(--muted); }
.order-id-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 18px;
}
.order-id-row code {
  border: 1px dashed var(--green-700);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  font-size: 16px;
}
.order-id-row button {
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  font-weight: 800;
}
.success-summary {
  border-radius: 12px;
  background: var(--surface-soft);
  margin-bottom: 18px;
  padding: 15px;
  text-align: left;
}
.success-summary div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 5px 0;
}

.success-items-section {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  text-align: left;
}
.success-items-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
  color: white;
}
.success-items-heading h2 {
  margin: 0;
  font-size: 17px;
}
.success-items-heading span {
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}
.success-items-list {
  display: grid;
  gap: 0;
}
.success-lottery-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.success-lottery-item:last-child { border-bottom: 0; }
.success-lottery-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 900;
}
.success-lottery-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.success-lottery-main strong {
  color: var(--green-950);
  font-size: 14px;
}
.success-lottery-number {
  min-width: 64px;
  border-radius: 7px;
  background: var(--green-700);
  color: white;
  padding: 5px 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
}
.success-lottery-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}
.success-lottery-meta span {
  color: var(--ink);
  font-weight: 850;
}
.success-lottery-meta small { color: var(--muted); }
.privacy-note {
  margin: 0 0 18px;
  border-radius: 10px;
  background: #eef7f3;
  color: var(--green-900);
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #17211e;
  color: white;
  border-radius: 999px;
  padding: 10px 16px;
  transition: .2s ease;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .layout-grid { grid-template-columns: 1fr; }
  .cart-card { position: static; }
  .cart-list { max-height: 260px; }
  .lottery-banner small { display: none; }
}

@media (max-width: 760px) {
  .lottery-selector { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .registration-grid { grid-template-columns: 1fr; }
  .app-shell { padding-inline: 0; }
  .topbar { grid-template-columns: 38px minmax(90px, 1fr) auto 38px; }
  .profile-pill { font-size: 11px; padding-right: 7px; }
  .brand { font-size: 18px; }
  main { padding: 0 10px 28px; }
  .lottery-banner { margin-top: 12px; }
  .main-card { padding: 10px; }
  .bet-type-grid { gap: 6px; }
  .bet-type-button { font-size: 16px; min-height: 45px; }
  .keypad button { min-height: 53px; }
  .customer-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .status-badge { display: inline-block; margin-top: 10px; }
  .equal-price-row { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .totals-box { grid-template-columns: 1fr; }
  .totals-box.emphasis { grid-template-columns: 1fr; }
  .confirm-item {
    grid-template-columns: 1fr 1fr;
  }
  .confirm-item .number { text-align: right; }
  .action-row { grid-template-columns: 1fr; }
  .success-card { padding: 24px 16px; }
  .success-lottery-item { grid-template-columns: 30px minmax(0, 1fr); }
  .success-lottery-main { justify-content: space-between; }
  .success-lottery-meta {
    grid-column: 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}


/* Multi-page website membership */
[hidden] { display: none !important; }
body { padding-bottom: 76px; }
.page-shell { padding-bottom: 34px; }
.site-topbar { border-radius: 0 0 14px 14px; }
.home-link { display: grid; place-items: center; text-decoration: none; }
.dashboard-page, .form-page, .member-page { padding-top: 22px; }
.hero-card, .form-card, .member-profile-card, .page-loading-card {
  background: var(--surface); border: 1px solid rgba(10,76,59,.08); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-card { padding: clamp(24px,5vw,46px); background: linear-gradient(145deg,#ffffff,#edf7f3); overflow: hidden; position: relative; }
.hero-card::after { content:"◒"; position:absolute; right:-24px; bottom:-78px; font-size:210px; color:rgba(21,95,76,.06); transform:rotate(-18deg); }
.hero-card h1 { max-width: 680px; margin: 8px 0 10px; color: var(--green-950); font-size: clamp(28px,5vw,46px); line-height:1.15; }
.hero-card p { max-width: 680px; color: var(--muted); font-size: 16px; line-height:1.7; }
.hero-actions { position:relative; z-index:1; display:flex; gap:10px; flex-wrap:wrap; margin-top:22px; }
.hero-actions a { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.menu-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:18px 0; }
.dashboard-menu-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:13px; min-height:98px; padding:16px; color:var(--ink); text-decoration:none; background:white; border:1px solid var(--line); border-radius:14px; box-shadow:0 8px 22px rgba(12,52,43,.07); }
.dashboard-menu-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.dashboard-menu-card strong { display:block; color:var(--green-950); font-size:17px; }
.dashboard-menu-card small { display:block; margin-top:4px; color:var(--muted); line-height:1.45; }
.dashboard-menu-card b { font-size:28px; color:var(--green-700); }
.menu-card-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; font-size:25px; font-weight:900; }
.accent-green .menu-card-icon { background:#e1f4ed; color:#13634e; }
.accent-gold .menu-card-icon { background:#fff3c8; color:#9b7000; }
.accent-blue .menu-card-icon { background:#e3f0ff; color:#235f9c; }
.accent-purple .menu-card-icon { background:#eee6ff; color:#6745a5; }
.dashboard-notice { margin-top:6px; }
.form-page { display:grid; place-items:start center; }
.form-card { width:min(760px,100%); padding:clamp(20px,4vw,34px); }
.compact-form-page .form-card { width:min(480px,100%); }
.center-heading { text-align:center; margin-bottom:20px; }
.center-heading h1 { margin:5px 0; color:var(--green-950); }
.center-heading p { margin:0; color:var(--muted); }
.login-icon { margin-bottom:12px; background:var(--green-100); color:var(--green-900); }
.stack-label { display:block; margin-bottom:14px; color:var(--muted); font-size:13px; font-weight:750; }
.stack-label input { min-height:48px; margin-top:6px; border:1px solid var(--line); border-radius:9px; padding:10px 12px; outline:none; }
.stack-label input:focus { border-color:var(--green-700); box-shadow:0 0 0 3px rgba(45,121,101,.12); }
.security-note { background:#edf7f3; color:#315f52; border-radius:10px; padding:10px 12px; font-size:12px; }
.form-switch { text-align:center; color:var(--muted); margin:16px 0 0; }
.form-switch a { color:var(--green-800); font-weight:800; }
.page-loading-card { min-height:220px; display:grid; place-items:center; align-content:center; margin-top:22px; padding:30px; color:var(--muted); }
.member-profile-card { margin-top:22px; padding:clamp(20px,4vw,32px); }
.member-profile-head { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:15px; }
.member-profile-head h1 { color:var(--green-950); margin:3px 0; }
.member-profile-head p { color:var(--muted); margin:0; }
.large-avatar { width:66px; height:66px; display:grid; place-items:center; border-radius:50%; background:var(--green-100); color:var(--green-900); font-size:28px; font-weight:900; }
.masked-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:22px 0 14px; }
.masked-info-grid > div { border:1px solid var(--line); border-radius:11px; background:var(--surface-soft); padding:13px; }
.masked-info-grid small { display:block; color:var(--muted); margin-bottom:4px; }
.masked-info-grid strong { color:var(--green-950); }
.member-actions { display:flex; gap:10px; margin-top:16px; }
.member-actions a { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.bottom-nav { position:fixed; left:50%; bottom:0; z-index:35; transform:translateX(-50%); width:min(1120px,100%); height:66px; display:grid; grid-template-columns:repeat(3,1fr); background:white; border-top:1px solid var(--line); box-shadow:0 -8px 24px rgba(12,52,43,.1); padding-bottom:env(safe-area-inset-bottom); }
.bottom-nav a { display:grid; place-items:center; align-content:center; gap:2px; color:var(--muted); text-decoration:none; font-weight:750; }
.bottom-nav a span { font-size:23px; line-height:1; }
.bottom-nav a small { font-size:11px; }
.bottom-nav a.active { color:var(--green-800); background:#edf7f3; }
.drawer-backdrop { position:fixed; inset:0; z-index:49; background:rgba(4,25,19,.45); }
.site-drawer { position:fixed; top:0; right:0; bottom:0; z-index:50; width:min(330px,88vw); transform:translateX(105%); transition:transform .22s ease; background:white; box-shadow:-16px 0 44px rgba(0,0,0,.18); padding:18px; }
.site-drawer.open { transform:translateX(0); }
.drawer-heading { display:flex; justify-content:space-between; align-items:center; padding-bottom:13px; border-bottom:1px solid var(--line); }
.drawer-heading strong { color:var(--green-950); font-size:19px; }
.drawer-heading button { border:0; background:var(--surface-soft); border-radius:9px; width:38px; height:38px; font-size:25px; }
.site-drawer nav { display:grid; gap:6px; margin-top:14px; }
.site-drawer nav a { color:var(--ink); text-decoration:none; padding:12px; border-radius:10px; font-weight:750; }
.site-drawer nav a:hover { background:var(--green-100); color:var(--green-900); }
.drawer-logout { width:100%; margin-top:18px; border:1px solid #efb8bf; background:#fff1f3; color:#a52c3b; border-radius:10px; padding:11px; font-weight:800; }

@media (max-width: 680px) {
  .menu-card-grid { grid-template-columns:1fr; }
  .registration-grid { grid-template-columns:1fr; }
  .member-profile-head { grid-template-columns:auto 1fr; }
  .member-profile-head .status-badge { grid-column:1/-1; width:fit-content; }
  .masked-info-grid { grid-template-columns:1fr; }
  .member-actions { display:grid; }
  .hero-actions { display:grid; }
  .hero-actions a { width:100%; }
  .dashboard-menu-card { min-height:88px; }
}

.line-delivery-note {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  border: 1px solid transparent;
}
.line-delivery-note.success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.line-delivery-note.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

/* LINE-first registration flow */
.register-flow-card { width: min(820px, 100%); }
.registration-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.registration-step {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}
.registration-step b {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 50%;
  background: #e2e8ea;
  color: #52606a;
}
.registration-step.active { border-color: #7cc6b1; background: #edf9f5; color: var(--green-900); }
.registration-step.active b { background: var(--green-800); color: white; }
.registration-step.complete { border-color: #7cc6b1; background: #e5f7f0; color: var(--green-900); }
.registration-step.complete b { font-size: 0; background: var(--green-800); color: white; }
.registration-step.complete b::after { content: "✓"; font-size: 16px; }
.line-link-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px 15px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #b8e7d4;
  border-radius: 14px;
  background: linear-gradient(145deg, #f5fffb, #e7f8f1);
}
.line-link-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #06c755;
  color: white;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.5px;
  box-shadow: 0 10px 24px rgba(6, 199, 85, .2);
}
.line-link-copy h2, .registration-form-heading h2 { margin: 0 0 4px; color: var(--green-950); }
.line-link-copy p, .registration-form-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.linked-profile { grid-column: 1 / -1; margin: 2px 0 0; background: white; }
.line-ready-label { display: block; margin-top: 3px; color: #08783e; font-size: 12px; font-weight: 800; }
.line-action-grid { grid-column: 1 / -1; display: flex; gap: 9px; flex-wrap: wrap; }
.line-connect-button {
  min-height: 48px;
  flex: 1 1 230px;
  border: 0;
  border-radius: 10px;
  background: #06c755;
  color: white;
  padding: 11px 16px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(6, 199, 85, .2);
}
.line-connect-button:hover { background: #05b64d; }
.line-action-grid .secondary-button { flex: 1 1 190px; }
.line-link-message {
  grid-column: 1 / -1;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.line-link-message.success { color: #08783e; font-weight: 750; }
.line-link-message.warning { color: #a54a00; font-weight: 750; }
#registrationFields {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
#registrationFields:disabled { background: #f5f7f7; }
#registrationFields:disabled > * { opacity: .55; }
.registration-form-heading { margin-bottom: 16px; }
.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;
}

@media (max-width: 620px) {
  .registration-steps { gap: 7px; }
  .registration-step { padding: 9px; font-size: 12px; }
  .line-link-panel { grid-template-columns: 52px minmax(0, 1fr); padding: 14px; }
  .line-link-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 14px; }
  .line-action-grid { display: grid; }
  #registrationFields { padding: 15px; }
}

.privacy-card h1 { color: var(--green-950); margin: 7px 0 16px; }
.privacy-card p { color: var(--muted); line-height: 1.75; }
.privacy-back-button { display: grid; place-items: center; margin-top: 20px; text-decoration: none; }
