:root {
  color-scheme: light;
  --paper: #fbf6ec;
  --panel: #fffaf2;
  --ink: #3f3428;
  --muted: #776a5a;
  --line: #dfd0bd;
  --field: #fffdf8;
  --accent: #b48a61;
  --accent-dark: #87623f;
  --qr-dark: #8b6845;
  --qr-light: #fff8eb;
  --soft: #efe0ca;
  --shadow: 0 18px 45px rgba(95, 69, 42, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 26px 16px;
}

.card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.stack {
  display: grid;
  gap: 18px;
}

.header {
  display: grid;
  gap: 8px;
  text-align: center;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 12vw, 3.25rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.96;
}

.subtle {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(180, 138, 97, 0.18);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fffaf4;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

button:hover {
  background: #765232;
  box-shadow: 0 10px 22px rgba(95, 69, 42, 0.16);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.result {
  display: none;
  gap: 14px;
  justify-items: center;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.result.is-visible {
  display: grid;
}

.qr-frame {
  width: min(100%, 280px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--qr-light);
  padding: 14px;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.url-output {
  width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--muted);
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.read-grid {
  display: grid;
  gap: 10px;
}

.fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 13px 14px;
}

.fact span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.fact strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.68);
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.link-row {
  display: flex;
  justify-content: center;
}

.plain-link {
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration-color: var(--soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (min-width: 680px) {
  .shell {
    padding: 48px 24px;
  }

  .card {
    padding: 30px;
  }
}
