:root {
  --paper: #fbf5e9;
  --paper-warm: #f5eddd;
  --ink: #102a43;
  --ink-soft: #294663;
  --line: #173653;
  --gold: #b58b4a;
  --sage: #8b9c82;
  --rose: #b78378;
  --shadow: rgba(16, 42, 67, .12);
}

* {
  box-sizing: border-box;
}

html {
  background: #ece4d7;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 255, 255, .7), transparent 18rem),
    linear-gradient(135deg, var(--paper), var(--paper-warm));
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--ink-soft);
}

.experience {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 42px;
}

.hero {
  min-height: 34vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 36px;
  align-items: end;
  padding: 30px 0 34px;
  border-bottom: 1px solid rgba(16, 42, 67, .25);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: 72px;
  font-weight: 400;
  line-height: .98;
}

h2 {
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}

.intro {
  max-width: 640px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.45;
}

.script {
  font-family: "Apple Chancery", "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
  font-weight: 400;
}

.keepsake-note {
  border: 1px solid var(--line);
  padding: 28px 24px;
  background: rgba(255, 255, 255, .24);
  text-align: center;
}

.keepsake-note .script {
  font-size: 38px;
  line-height: 1;
}

.keepsake-note span {
  display: block;
  margin-top: 14px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: start;
  padding-top: 34px;
}

.quote-panel,
.card-panel,
.closing {
  border: 1px solid rgba(16, 42, 67, .36);
  background: rgba(255, 255, 255, .22);
  box-shadow: 0 16px 40px var(--shadow);
}

.quote-panel,
.card-panel {
  padding: 24px;
}

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

.quote-list {
  display: grid;
  gap: 10px;
}

.quote-option {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 13px;
  border: 1px solid rgba(16, 42, 67, .24);
  background: rgba(251, 245, 233, .72);
}

.quote-option input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--ink);
}

.quote-option p {
  font-size: 18px;
  line-height: 1.34;
}

.quote-option span {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.add-quote {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(16, 42, 67, .22);
}

.add-quote label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.identity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.identity-row label {
  margin: 0;
}

.identity-row span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.password-control {
  position: relative;
  display: block;
  margin: 0;
}

.password-control input {
  min-width: 0;
  padding-right: 46px;
}

.password-control .icon-button {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(16, 42, 67, .2);
  background: transparent;
  color: var(--ink);
}

.password-control .icon-button:hover,
.password-control .icon-button:focus-visible,
.password-control .icon-button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input,
textarea {
  border: 1px solid rgba(16, 42, 67, .35);
  background: rgba(255, 255, 255, .42);
  color: var(--ink);
}

input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
}

.add-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 12px;
  line-height: 1.35;
}

.form-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 5px;
}

.quote-meta span {
  margin: 0;
}

.remove-quote {
  min-height: 28px;
  padding: 3px 8px;
  border-color: rgba(16, 42, 67, .42);
  background: transparent;
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
}

.remove-quote:hover,
.remove-quote:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.card-preview {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1.5px solid var(--line);
  background: linear-gradient(135deg, #fff9ee, #f4ead9);
  padding: 28px;
}

.card-preview header {
  text-align: center;
}

.card-preview .small {
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.card-preview header .script {
  margin-top: 8px;
  font-size: 42px;
  line-height: 1;
}

.selected-quotes {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.selected-quote {
  padding: 13px 0;
  border-top: 1px solid rgba(16, 42, 67, .2);
  font-size: 20px;
  line-height: 1.38;
}

.selected-quote:first-child {
  border-top: 0;
}

.selected-quote::before {
  content: "♥";
  display: block;
  margin-bottom: 4px;
  color: var(--rose);
  font-size: 13px;
}

.empty-state {
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.card-preview footer {
  color: var(--ink-soft);
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.actions button,
.add-row button {
  min-height: 44px;
  padding: 9px 12px;
}

.closing {
  margin-top: 34px;
  padding: 26px;
  text-align: center;
}

.closing .script {
  font-size: 31px;
  line-height: 1.2;
}

.closing p:last-child {
  max-width: 700px;
  margin: 10px auto 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.45;
}

.site-date {
  margin-top: 22px;
  color: var(--ink-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-align: center;
}

@media (max-width: 920px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 48px;
  }

  .keepsake-note {
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .experience {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  h1 {
    font-size: 40px;
  }

  .intro {
    font-size: 18px;
  }

  .quote-panel,
  .card-panel {
    padding: 16px;
  }

  .section-heading,
  .identity-row,
  .add-row,
  .actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .card-preview {
    min-height: 480px;
    padding: 22px;
  }
}

@media print {
  body {
    background: white;
  }

  .hero,
  .quote-panel,
  .actions,
  .closing {
    display: none;
  }

  .experience {
    width: 8.5in;
    padding: 0;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .card-panel {
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .card-panel > .section-heading {
    display: none;
  }

  .card-preview {
    width: 8.5in;
    height: 11in;
    min-height: 11in;
    border: 1.5px solid var(--line);
    box-shadow: none;
    padding: .72in;
  }
}
