@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Lora:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --ink: #201f1d;
  --gold: #b68235;
  --gold-strong: #9c6d27;
  --gold-soft: rgba(182, 130, 53, 0.12);
  --gold-line: rgba(182, 130, 53, 0.45);
  --paper: #f3f2f2;
  --surface: #ffffff;
  --surface-2: #fbfaf9;
  --ink-90: rgba(32, 31, 29, 0.9);
  --ink-62: rgba(32, 31, 29, 0.62);
  --ink-45: rgba(32, 31, 29, 0.45);
  --ink-16: rgba(32, 31, 29, 0.16);
  --ink-10: rgba(32, 31, 29, 0.1);
  --ink-06: rgba(32, 31, 29, 0.06);
  --success: #5f7a4f;
  --warning: #b07d2e;
  --danger: #a8443a;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --shadow-focus: 0 0 0 3px var(--gold-soft);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0;
}

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

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.view,
.view[hidden] {
  display: none !important;
}

.view.active {
  display: grid !important;
}

.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--ink-16);
  border-radius: 4px;
  padding: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.view-tab {
  min-height: 42px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-62);
  font-weight: 600;
  cursor: pointer;
}

.view-tab.active {
  background: var(--gold-soft);
  color: var(--gold-strong);
}

.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.price {
  min-width: 92px;
  border: 1px solid var(--ink-16);
  border-radius: 4px;
  padding: 10px 12px;
  text-align: right;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.price span,
.summary span,
.field span,
legend,
.status {
  color: var(--ink-62);
}

.price strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.studio {
  display: grid;
  gap: 12px;
}

.account {
  display: grid;
  gap: 12px;
}

.note {
  border: 1px solid var(--ink-16);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  padding: 14px 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.note span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
}

.note p {
  margin: 0;
  color: var(--ink-62);
  font-size: 14.5px;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel {
  border: 1px solid var(--ink-16);
  border-radius: 4px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

fieldset {
  margin: 0;
}

legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  font-weight: 500;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--ink-16);
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 132px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.42;
}

textarea::placeholder {
  color: var(--ink-45);
}

select {
  height: 44px;
  padding: 0 12px;
}

input {
  height: 44px;
  padding: 0 12px;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  background: var(--ink-06);
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-focus);
}

.segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}

.segments[data-group="duration"] {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segments label {
  cursor: pointer;
}

.segments input,
.swatches input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segments span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid var(--ink-16);
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--ink-62);
  font-weight: 500;
}

.segments input:checked + span {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--gold);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(40px, 1fr));
  gap: 8px;
}

.swatch {
  display: block;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 4px;
}

.swatch.gold {
  background: linear-gradient(135deg, #201f1d 45%, #b68235 45%);
}

.swatch.blue {
  background: linear-gradient(135deg, #201f1d 45%, #6d7f9c 45%);
}

.swatch.red {
  background: linear-gradient(135deg, #ffffff 45%, #a8443a 45%);
}

.swatch.green {
  background: linear-gradient(135deg, #201f1d 45%, #5f7a4f 45%);
}

.swatch.silver {
  background: linear-gradient(135deg, #111111 45%, #d6d3cc 45%);
}

.swatch.teal {
  background: linear-gradient(135deg, #162222 45%, #3e9c91 45%);
}

.swatch.burgundy {
  background: linear-gradient(135deg, #efe7da 45%, #712c3c 45%);
}

.swatch.mono {
  background: linear-gradient(135deg, #f7f7f4 45%, #202020 45%);
}

.swatches input:checked + .swatch {
  border-color: var(--gold);
  box-shadow: var(--shadow-focus);
}

.visual-words {
  margin-top: 12px;
}

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

.panel-head span {
  display: block;
  color: var(--ink-62);
  font-size: 13px;
  font-weight: 500;
}

.panel-head strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.ghost {
  min-height: 40px;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 0 14px;
  background: var(--gold-soft);
  color: var(--gold-strong);
  cursor: pointer;
}

.ghost:disabled {
  cursor: default;
  opacity: 0.55;
}

.audio-mode {
  max-width: 280px;
  margin-bottom: 12px;
}

.audio-controls {
  display: grid;
  gap: 12px;
}

.audio-controls.is-disabled {
  opacity: 0.72;
}

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

.audio-grid .wide {
  grid-column: 1 / -1;
}

.audio-results {
  display: grid;
  gap: 10px;
}

.audio-results p {
  margin: 0;
  color: var(--ink-62);
  font-size: 13px;
}

.audio-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--ink-16);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface-2);
}

.audio-card.selected {
  border-color: var(--gold);
  box-shadow: var(--shadow-focus);
}

.audio-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.audio-card strong {
  font-weight: 600;
}

.audio-card small {
  color: var(--ink-62);
}

.audio-card audio {
  width: 100%;
  height: 34px;
}

.audio-tags {
  color: var(--ink-62);
  font-size: 12px;
  line-height: 1.35;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.flow div {
  display: grid;
  gap: 6px;
  min-height: 70px;
  align-content: start;
  border-left: 1px solid var(--gold-line);
  padding-left: 10px;
}

.flow strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
}

.flow span {
  color: var(--ink-62);
  font-size: 12.5px;
  line-height: 1.35;
}

.summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 14px;
  background: var(--gold-soft);
}

.summary strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.account-status {
  display: grid;
  gap: 10px;
}

.topup-actions {
  display: grid;
  gap: 8px;
}

.topup-actions > span {
  color: var(--muted);
  font-size: 13px;
}

.topup-actions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.account-status div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ink-10);
  padding-bottom: 10px;
}

.account-status div:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-status span,
.section-title span {
  color: var(--ink-62);
  font-size: 13px;
  font-weight: 500;
}

.account-status strong,
.section-title strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  text-align: right;
}

.registration-form {
  display: grid;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-62);
  font-size: 12.5px;
  line-height: 1.45;
}

.consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 2px;
}

.consent a {
  color: var(--gold-strong);
}

.secondary {
  min-height: 46px;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--gold-strong);
  font-weight: 600;
  cursor: pointer;
}

.secondary:hover,
.secondary:focus {
  border-color: var(--gold);
  background: var(--gold-soft);
  outline: none;
}

.primary {
  height: 52px;
  border: 0;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.primary:hover,
.primary:focus {
  background: var(--gold-strong);
  outline: none;
}

.status {
  margin: 0;
  min-height: 20px;
  font-size: 13px;
  text-align: center;
}

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

  .flow {
    grid-template-columns: repeat(2, 1fr);
  }

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

  h1 {
    font-size: 25px;
  }
}
