:root {
  color-scheme: light;
  --paper: #f5f7f4;
  --ink: #17221c;
  --muted: #788078;
  --line: #e6eae4;
  --green: #237a52;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
  font-feature-settings: "ss01" on;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(35 122 82 / 35%);
  outline-offset: 3px;
}

.brand-logo-wrapper {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 12px;
  background: #d8ffc4;
}

.app-favicon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #e6eae4;
  border-radius: 15px;
  background: #fff;
  color: #506056;
  transition: background-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: #f0f3ef;
}

.icon-button:active,
.primary-button:active {
  transform: scale(0.98);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.wallet-settings-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  max-height: min(680px, calc(100dvh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(22 38 27 / 22%);
}

.wallet-settings-dialog::backdrop {
  background: rgb(17 30 22 / 48%);
  backdrop-filter: blur(3px);
}

.wallet-settings-content {
  padding: 20px;
}

.wallet-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wallet-settings-heading .icon-button {
  font-size: 24px;
}

.wallet-settings-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.wallet-setting-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.wallet-setting-row.is-dragging {
  position: relative;
  z-index: 3;
  background: #fff;
  box-shadow: 0 12px 28px rgb(22 38 27 / 20%);
  cursor: grabbing;
  transition: box-shadow 180ms ease;
  will-change: transform;
}

.wallet-drag-handle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 34px;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -1px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.wallet-drag-handle:focus-visible {
  outline: 3px solid rgb(35 122 82 / 35%);
  outline-offset: 1px;
}

body.is-wallet-reordering {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.wallet-setting-label {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.wallet-setting-name {
  font-size: 14px;
  font-weight: 700;
}

.wallet-setting-code {
  color: var(--muted);
  font-size: 11px;
}

.wallet-setting-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #d7ddd7;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.wallet-setting-toggle::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 18%);
  content: "";
  transition: transform 160ms ease;
}

.wallet-setting-toggle:checked {
  background: var(--green);
}

.wallet-setting-toggle:checked::before {
  transform: translateX(20px);
}

.wallet-setting-toggle:focus-visible {
  outline: 3px solid rgb(35 122 82 / 35%);
  outline-offset: 3px;
}

.wallet-action-checkbox {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.wallet-action-checkbox:focus-visible {
  outline: 3px solid rgb(35 122 82 / 35%);
  outline-offset: 3px;
}

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

.coupon-choice-button {
  display: flex;
  min-width: 0;
  min-height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.coupon-choice-button:hover:not(:disabled):not(.is-selected) {
  border-color: #9ca3af;
  background: #f9fafb;
}

.coupon-choice-button.is-selected {
  border-color: #1b4d3e;
  background: #1b4d3e;
  color: #fff;
}

.coupon-choice-button.is-selected:hover,
.coupon-choice-button.is-selected:focus-visible {
  border-color: #1b4d3e;
  background: #1b4d3e;
  color: #fff;
  outline: none;
  box-shadow: none;
}

.coupon-choice-button:focus-visible:not(.is-selected) {
  outline: 3px solid rgb(35 122 82 / 35%);
  outline-offset: 3px;
}

.coupon-choice-button:disabled:not(.is-selected) {
  cursor: not-allowed;
  opacity: 0.45;
}

.coupon-choice-button.is-locked,
.coupon-choice-button.is-locked:hover,
.coupon-choice-button.is-locked:focus-visible {
  border-color: #1b4d3e;
  background: #1b4d3e;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.78;
  outline: none;
  box-shadow: none;
}

.coupon-choice-button.is-locked.is-selected {
  border-style: dashed;
}

.coupon-choice-button.is-locked.is-used,
.coupon-choice-button.is-locked.is-used:hover,
.coupon-choice-button.is-locked.is-used:focus-visible {
  border: 1px solid #f2b8bd;
  background: #ffebee;
  color: #8f1d2c;
  opacity: 1;
}

.coupon-choice-button.is-locked.is-used.is-selected {
  border-style: solid;
}

.coupon-choice-button.is-locked.is-expired,
.coupon-choice-button.is-locked.is-expired:hover,
.coupon-choice-button.is-locked.is-expired:focus-visible {
  border-color: #d7dcd8;
  background: #edf0ed;
  color: #66716a;
  opacity: 1;
}

.coupon-choice-lock-label {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.coupon-selection-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
}

.coupon-required-spend {
  color: #526457;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.coupon-required-spend strong {
  color: #183c2b;
  font-size: 13px;
  font-weight: 800;
}

.coupon-selection-status {
  color: #526457;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.coupon-selection-status.is-warning {
  color: #8d342f;
}

.dev-time-panel {
  overflow: hidden;
  border: 1px solid #e8dfb8;
  border-radius: 17px;
  background: #fffdf4;
}

.dev-time-panel[hidden] {
  display: none;
}

.dev-time-summary {
  display: flex;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  color: #66572c;
  font-size: 13px;
  font-weight: 700;
}

.dev-time-summary::-webkit-details-marker {
  display: none;
}

.dev-time-summary::after {
  margin-left: auto;
  content: "+";
  font-size: 18px;
}

.dev-time-panel[open] .dev-time-summary::after {
  content: "−";
}

.dev-time-status {
  border-radius: 999px;
  background: #f4edcf;
  padding: 4px 8px;
  color: #756638;
  font-size: 10px;
  font-weight: 600;
}

.dev-time-content {
  border-top: 1px solid #f0ead4;
  padding: 13px 15px 15px;
}

.dev-time-description {
  color: #827a61;
  font-size: 11px;
  line-height: 1.6;
}

.dev-time-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dev-time-button,
.dev-time-reset {
  min-height: 44px;
  border: 1px solid #dfd6b7;
  border-radius: 12px;
  background: #fff;
  padding: 9px 12px;
  color: #514829;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.dev-time-button[aria-pressed="true"] {
  border-color: #597440;
  background: #eef5e5;
  color: #355526;
}

.dev-time-reset {
  border-color: transparent;
  background: transparent;
  color: #777361;
}

.state-pill,
.count-pill {
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgb(255 255 255 / 75%);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: end;
  gap: 12px;
}

.eyebrow {
  color: #929b91;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section-title {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.section-copy {
  color: #778078;
  font-size: 13px;
  line-height: 1.65;
}

.count-pill {
  margin-bottom: 2px;
  background: #e9eee8;
  color: #566157;
}

.panel,
.wallet-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 3px 15px rgb(22 38 27 / 3%);
}

.wallet-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  transition: transform 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .wallet-card {
    transition: none;
  }
}

.wallet-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.wallet-action-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 12px;
  background: #183c2b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms ease;
}

.wallet-action-button:hover:not(:disabled) {
  background: #237a52;
}

.wallet-action-button:active:not(:disabled) {
  transform: scale(0.98);
}

.wallet-action-button:disabled {
  cursor: not-allowed;
  background: #edf0ed;
  color: #9aa29a;
}

.wallet-action-button.is-secondary {
  border-color: #dfe7dd;
  background: #f7faf6;
  color: #355342;
}

.wallet-action-button.is-secondary:hover:not(:disabled) {
  background: #edf5e9;
}

.wallet-card.is-placeholder {
  border-style: dashed;
  background: rgb(255 255 255 / 55%);
  box-shadow: none;
}

.wallet-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-identity {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.wallet-labels {
  min-width: 0;
}

.wallet-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #edf5e9;
  color: #3e7145;
  font-size: 11px;
  font-weight: 800;
}

.wallet-name {
  overflow: hidden;
  margin-top: 1px;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-subtitle {
  margin-top: 3px;
  color: #8a938b;
  font-size: 11px;
}

.wallet-status {
  margin-top: 0;
  color: #617067;
  font-size: 12px;
  line-height: 1.5;
}

.wallet-status strong {
  color: var(--ink);
}

.wallet-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wallet-coupon-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.4;
}

.wallet-coupon-status.is-available {
  border-color: #2f8a58;
  background: #e0f5e7;
  color: #14532d;
  font-size: 12px;
  font-weight: 800;
}

.wallet-coupon-status.is-used {
  border-color: #f2b8bd;
  background: #ffebee;
  color: #8f1d2c;
  font-weight: 700;
}

.wallet-coupon-status.is-expired {
  border-color: #d7dcd8;
  background: #edf0ed;
  color: #66716a;
}

.wallet-coupon-tag {
  border: 1px solid #e8a4ab;
  border-radius: 999px;
  padding: 1px 5px;
  background: #fee2e2;
  color: #8f1d2c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: #1b5038;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #237a52;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.wallet-coupon-status.is-used .wallet-coupon-tag {
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  width: fit-content;
  max-width: min(440px, calc(100vw - 32px));
  margin: 0 auto;
  border-radius: 14px;
  background: #1c3025;
  padding: 13px 17px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #8d342f;
}

@media (min-width: 640px) {
  .dev-time-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
