* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #fff8ef, #f4f6f1 42%, #edf8ff);
}
header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem; border-bottom: 3px solid #f59e0b;
  background: linear-gradient(90deg, #f8e0bb, #dce2dc 45%, #d8edf8);
  color: #1b56b8; font-weight: 700;
}
header img { width: min(155px, 40vw); height: 36px; object-fit: contain; }
main { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; }
h1 { color: #1b56b8; margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { color: #1b56b8; margin-top: 0; font-size: 1.2rem; }
p { line-height: 1.55; }
.layout, .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.25rem; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px #24384912; }
.result { border-top: 3px solid #f59e0b; }
label { color: #1b56b8; font-weight: 600; }
input, select {
  display: block; width: 100%; margin-top: .5rem; padding: .75rem;
  border: 1px solid #ddd; border-radius: 6px; font: inherit; color: #333; background: white;
}
:focus-visible { outline: 2px solid #b46700; outline-offset: 2px; }
button, #share {
  border: 0; border-radius: 6px; padding: .75rem 1rem;
  font: inherit; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, #9b530e, #52696b 48%, #146698);
}
button { width: 100%; }
#share:not([hidden]) { display: inline-block; }
#result { white-space: pre-line; }
.note, #power-note { font-size: .9rem; color: #475569; }
#error { color: #a32424; margin-bottom: 0; }
#error:empty { display: none; }
@media (max-width: 680px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 360px) { .fields { grid-template-columns: 1fr; } }
.recommended-driver {
  display: block;
  margin: .85rem 0;
  padding: .65rem .8rem;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  background: #edf8ff;
  color: #1b56b8;
  font-size: 1.2rem;
  font-weight: 800;
}
