:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #231a15;
  background: #f7f2e9;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #221611; color: #fff7e7; }
header a { color: inherit; font-weight: 650; }
nav, main { width: min(100% - 2rem, 56rem); margin: auto; }
nav { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; }
nav img { display: block; width: 64px; height: auto; border-radius: .3rem; }
main { padding: 2.5rem 0 4rem; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 3.3rem); margin-top: 0; max-width: 19ch; }
a { color: #86291a; }
p { max-width: 68ch; }
section, .panel {
  background: #fffcf6;
  border: 1px solid #dfd5c7;
  border-radius: 1rem;
  padding: clamp(1rem, 4vw, 1.75rem);
  margin: 1.25rem 0;
}
section > :first-child, .panel > :first-child { margin-top: 0; }
.tiers, .fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
}
.tier { padding: 1rem; background: #f3e8d6; border-radius: .6rem; }
.tier strong { display: block; color: #86291a; font-size: 1.65rem; }
fieldset { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
label { display: block; font-weight: 600; margin: .5rem 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .65rem;
  border: 1px solid #8e8174; border-radius: .35rem; background: white; color: inherit;
  font: inherit;
}
textarea { resize: vertical; }
button, .button {
  display: inline-block; font: inherit; font-weight: 700; text-align: center;
  border: 1px solid #86291a; border-radius: .45rem; cursor: pointer;
  background: #86291a; color: white; padding: .65rem 1rem; text-decoration: none;
}
button.secondary { background: transparent; color: #86291a; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #056794; outline-offset: 3px; }
[hidden] { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
[role="status"] { font-weight: 650; }
#group-qr { display: inline-block; background: white; padding: 20px; }
#group-qr img, #group-qr canvas { max-width: 100%; height: auto; }
.backup { font: bold 1.35rem monospace; letter-spacing: .12em; }
#group-reader { max-width: 28rem; margin: 1rem 0; }
#group-result { font-size: 1.15rem; }
details { overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 700; }
dt { font-weight: 600; }
dd { margin: 0 0 .65rem; white-space: pre-wrap; }
@media print {
  header, button, #renew-panel, #card-message, .card-sharing-note { display: none !important; }
  body, section { background: white; }
  section { break-inside: avoid; }
}
