:root {
  color-scheme: light;
  --brand-50: #fff8dc;
  --brand-100: #fff0ad;
  --brand-600: #ffc100;
  --brand-700: #e6ae00;
  --brand-800: #8a6800;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --red-800: #991b1b;
  --amber-50: #fffbeb;
  --amber-800: #92400e;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}
a { color: var(--brand-800); }
button, input, textarea { color: inherit; font: inherit; }
button, [role="button"] { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 56px;
  padding: 0 1rem;
  background: var(--brand-600);
  color: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}
.site-header a, .link-button { color: var(--gray-900); text-decoration: none; }
.brand { font-size: 1.125rem; font-weight: 700; }
.site-header nav { display: flex; align-items: center; gap: 1rem; font-size: .875rem; }
.language-switcher { display: flex; align-items: center; gap: .375rem; }
.language-switcher form { margin: 0; }
.language-switcher button { min-width: 0; padding: .15rem; border: 2px solid transparent; border-radius: .3rem; background: transparent; }
.language-switcher button[aria-current="true"] { border-color: var(--gray-900); }
.language-switcher img { width: 28px; height: 18px; object-fit: contain; box-shadow: 0 0 0 1px rgb(17 24 39 / 25%); }
.inline-form { display: inline; }
.link-button { border: 0; padding: 0; background: none; }

.page-shell { width: min(100% - 2rem, 64rem); margin: 0 auto; padding: 1.5rem 0 5rem; }
.hero { max-width: 48rem; padding: .5rem 0 1rem; }
.hero.compact { padding-bottom: .5rem; }
.hero h1 { margin: 0 0 .5rem; font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.2; font-weight: 700; }
.hero p:last-child { color: var(--gray-600); }
.eyebrow { margin: 0 0 .25rem; color: var(--brand-800); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.uuid { color: var(--gray-500); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; overflow-wrap: anywhere; }

.card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--gray-100);
  border-radius: .75rem;
  background: white;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}
.card.narrow { max-width: 28rem; margin-inline: auto; }
.card h2 { margin: 0 0 .75rem; font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.summary-grid div { padding: .75rem; border-radius: .5rem; background: var(--gray-50); }
.summary-grid span { display: block; color: var(--gray-500); font-size: .75rem; }
.summary-grid strong { display: block; margin-top: .125rem; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }

.form-row { margin-bottom: 1rem; }
label { display: block; margin-bottom: .25rem; font-size: .875rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: .625rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: .5rem;
  background: white;
}
input:focus, textarea:focus { border-color: var(--brand-600); outline: 2px solid rgb(255 193 0 / 35%); outline-offset: 1px; }
input[type="file"] { width: 100%; }
small { display: block; margin-top: .5rem; color: var(--gray-500); font-size: .75rem; }
button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-weight: 600;
  transition: background-color .15s, border-color .15s;
  text-decoration: none;
}
.primary { background: var(--brand-600); color: var(--gray-900); }
.primary:hover { background: var(--brand-700); }
.primary:disabled { cursor: not-allowed; opacity: .5; }
.secondary { background: var(--gray-200); color: #1f2937; }
.secondary:hover { background: var(--gray-300); }
.danger { background: var(--red-600); color: white; }
.danger:hover { background: var(--red-800); }
.text-action { padding: .25rem 0; background: none; color: var(--brand-800); font-size: .75rem; }
.file-picker {
  min-height: 6rem;
  margin-bottom: 1rem;
  border: 2px dashed var(--gray-300);
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: border-color .15s;
}
.file-picker:hover { border-color: var(--brand-600); }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker span { color: var(--brand-800); font-weight: 600; }

.error-box, .warning-box { margin: 1rem 0; padding: .75rem 1rem; border-radius: .5rem; font-size: .875rem; }
.error-box { border: 1px solid #fca5a5; background: var(--red-50); color: var(--red-800); }
.warning-box { border: 1px solid #fde68a; background: var(--amber-50); color: var(--amber-800); }
.error-box h3, .warning-box h3 { margin: 0 0 .5rem; }
.push-panel { margin: 1rem 0; padding: .75rem; border-radius: .5rem; background: var(--brand-50); color: var(--gray-900); }
.push-panel h3 { margin: 0 0 .5rem; font-size: 1rem; }
.push-panel .secondary, .push-panel .primary { margin: .75rem 0; width: 100%; }
.push-panel p { margin-bottom: .25rem; }
.push-panel.is-ready { border: 1px solid #86efac; background: #f0fdf4; color: #166534; }
.reviewer-push { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .625rem .5rem; border-bottom: 1px solid var(--gray-200); text-align: left; white-space: nowrap; }
th { color: var(--gray-500); font-size: .75rem; font-weight: 600; }
.qso-details { margin-top: 1rem; }
.qso-details summary { color: var(--brand-800); cursor: pointer; font-weight: 600; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.image-grid img { width: 100%; max-height: 430px; border-radius: .75rem; object-fit: cover; }
.contact { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; }
.contact dt { color: var(--gray-500); }
.contact dd { margin: 0; }
.actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
.actions form { min-width: min(100%, 20rem); }
.count { display: inline-flex; min-width: 1.5rem; height: 1.5rem; align-items: center; justify-content: center; border-radius: 9999px; background: var(--brand-100); color: var(--gray-900); font-size: .75rem; }
.muted { color: var(--gray-500); }
.message { padding: .75rem 1rem; border-radius: .5rem; background: var(--brand-100); color: var(--gray-900); }

@media (min-width: 700px) {
  .page-shell { padding-top: 2rem; }
  .card { padding: 1.5rem; }
}
@media (max-width: 650px) {
  .site-header { position: static; padding-block: .75rem; align-items: flex-start; flex-direction: column; gap: .375rem; }
  .site-header nav { width: 100%; justify-content: space-between; }
  .actions { display: block; }
  .actions form, .actions .button-link { width: 100%; margin-bottom: .75rem; }
}
