:root {
  color-scheme: light;
  --red: #da291c;
  --ink: #27292b;
  --muted: #53565a;
  --line: #d1d3d5;
  --graphite: #414447;
  background: #f2f3f4;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 980px; margin: auto; padding: clamp(16px, 4vw, 48px); }
header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: clamp(18px, 4vw, 32px);
  border-radius: 24px;
  background: linear-gradient(110deg, var(--red), #b72017);
  color: #ffffff;
}
header img { width: clamp(54px, 12vw, 76px); height: auto; border-radius: 18px; border: 1px solid #444649; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(23px, 4.5vw, 39px); line-height: 1.12; letter-spacing: -.035em; }
header p { color: #fff; margin-top: 4px; }
button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--graphite);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#share-feedback { grid-column: 1 / -1; }
#share-feedback:empty { display: none; }
#share-link { grid-column: 1 / -1; margin: 0; }
#share-link input { color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel, .total, details { border-radius: 20px; padding: clamp(18px, 3vw, 30px); }
.panel, details { background: #ffffff; border: 1px solid var(--line); }
label { display: block; font-weight: 650; margin: 14px 0; }
input, select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1px solid #818487;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 18px;
}
input:read-only { background: #e6e7e8; }
:focus-visible { outline: 3px solid #aa2016; outline-offset: 3px; }
header :focus-visible { outline-color: white; }
h2 { font-size: 20px; }
small, #hint { color: var(--muted); font-size: .9rem; }
.total { background: linear-gradient(140deg, #c62519, #a51f15); color: #ffffff; align-self: start; }
.total strong { display: block; background: #fafafa; color: var(--graphite); padding: 4px 12px; border-radius: 9px; font-size: clamp(28px, 5vw, 43px); margin: 4px 0 16px; }
.line { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #ffffff55; padding: 8px 0; }
.line span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
details { margin-top: 18px; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-top: 8px; }
footer { margin-top: 22px; text-align: center; color: var(--muted); font-size: .875rem; }
@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  header { grid-template-columns: auto 1fr; }
  header button { grid-column: 1 / -1; justify-self: start; }
}

[hidden] { display: none !important; }
