:root {
  color-scheme: light;
  --cream: #fff8ee;
  --paper: #fffdf9;
  --ink: #553c38;
  --muted: #9c766d;
  --peach: #ff9e86;
  --peach-soft: #ffe5db;
  --yellow: #ffe16b;
  --mint: #c0e5d3;
  --line: #f0dfd6;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 9%, rgba(255,225,107,.55) 0 5px, transparent 6px),
    radial-gradient(circle at 91% 15%, rgba(192,229,211,.8) 0 7px, transparent 8px),
    linear-gradient(150deg, #fff8ee 0%, #fff2eb 54%, #f9fff9 100%);
}

.shell {
  width: min(760px, 100%);
  margin: auto;
  padding: max(30px, env(safe-area-inset-top)) 20px 56px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 2px 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--peach);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 { margin: 0; font-size: clamp(28px, 7vw, 42px); letter-spacing: -.04em; }
h1 span { color: var(--peach); }
.subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }

.bear {
  position: relative;
  flex: 0 0 76px;
  height: 76px;
}

.face, .ear {
  position: absolute;
  display: block;
  background: #c4896b;
}

.face { inset: 13px 5px 3px; border-radius: 48% 48% 45% 45%; }
.ear { width: 25px; height: 25px; top: 4px; border-radius: 50%; }
.ear.left { left: 5px; }
.ear.right { right: 5px; }
.face b { position: absolute; width: 5px; height: 6px; top: 23px; border-radius: 50%; background: var(--ink); }
.face b:first-child { left: 18px; }
.face b:nth-child(2) { right: 18px; }
.face em { position: absolute; left: 50%; top: 33px; width: 8px; height: 6px; transform: translateX(-50%); border-radius: 50%; background: var(--ink); }

.card {
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: rgba(255,253,249,.92);
  box-shadow: 0 18px 50px rgba(117,74,62,.09);
}

.login-card { position: relative; padding: 28px; overflow: hidden; }
.login-card h2 { margin: 0 0 8px; font-size: 22px; }
.login-card > p { margin: 0 0 25px; color: var(--muted); }
.stamp { position: absolute; right: 24px; top: 22px; color: var(--yellow); font-size: 38px; transform: rotate(12deg); }
label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.input-row { display: flex; gap: 10px; }

input, button {
  min-height: 48px;
  border: 0;
  border-radius: 17px;
  font: inherit;
}

input {
  min-width: 0;
  flex: 1;
  padding: 0 16px;
  color: var(--ink);
  background: #f8eee8;
  outline: 2px solid transparent;
}
input:focus { outline-color: var(--peach); background: white; }
button { padding: 0 18px; color: white; font-weight: 750; background: var(--peach); cursor: pointer; }
button:active { transform: translateY(1px); }
.error { min-height: 18px; margin: 10px 0 0 !important; color: #c95555 !important; font-size: 12px; }

.summary { display: grid; grid-template-columns: 1fr 170px; gap: 14px; }
.hero-card { padding: 24px; background: var(--peach-soft); }
.hero-card p, .mini-card span { margin: 0; color: var(--muted); font-size: 13px; }
.cell-id { margin: 11px 0 8px; overflow-wrap: anywhere; font-size: clamp(25px, 7vw, 40px); font-weight: 850; letter-spacing: -.04em; }
.meta { color: var(--muted); font-size: 13px; }
.mini-card { display: flex; flex-direction: column; padding: 20px; }
.mini-card strong { margin: 8px 0 auto; font-size: 34px; }
.mini-card button { min-height: 38px; background: var(--ink); }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 4px 12px; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title span { color: var(--muted); font-size: 11px; }
.records { display: grid; gap: 10px; }

.record {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
}

.radio {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--ink);
  background: var(--mint);
  font-size: 12px;
  font-weight: 800;
}

.record h3 { margin: 0 0 5px; font-size: 16px; overflow-wrap: anywhere; }
.record p { margin: 0; color: var(--muted); font-size: 12px; }
.signal { color: var(--peach); font-size: 12px; font-weight: 750; white-space: nowrap; }
.empty { padding: 34px 22px; color: var(--muted); text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 540px) {
  .shell { padding-inline: 16px; }
  .bear { transform: scale(.84); transform-origin: right center; }
  .summary { grid-template-columns: 1fr 118px; }
  .mini-card { padding: 16px; }
  .input-row { flex-direction: column; }
  .record { grid-template-columns: 48px 1fr; }
  .radio { width: 48px; height: 48px; border-radius: 15px; }
  .signal { grid-column: 2; }
}
