:root { --sky: #b7d9ec; --minor: #f39c12; --serious: #d7191f; --good: #22a35a; }

.panel.wide { width: min(520px, 100% - 32px); max-height: calc(100% - 32px); overflow-y: auto; }
.panel h3 { font: 700 .8rem Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #5f6368; margin: 0 0 .5em; text-align: left; }
.loading { color: #5f6368; font-size: .9rem; }
.loading[hidden] { display: none; }

.levels { display: grid; gap: 8px; margin: 0 0 1em; }
.levels button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid #e6e1dc; border-radius: 12px; background: #fff; padding: 12px 14px;
  font: 600 1rem Inter, sans-serif; color: var(--ink); cursor: pointer; text-align: left;
}
.levels button:hover:not(:disabled) { border-color: var(--red); }
.levels button:disabled { opacity: .5; cursor: wait; }
.levels .num { color: var(--red); font-family: "Archivo Black", sans-serif; margin-right: 8px; }
.levels .lvl-stars { color: #f4c20d; letter-spacing: 2px; white-space: nowrap; }
.levels .lvl-stars .off { color: #ddd; }

.tips { text-align: left; margin: 0 0 1.2em; padding-left: 1.3em; font-size: .93rem; line-height: 1.45; }
.tips li { margin: .35em 0; }

.stars { font-size: 2.2rem; letter-spacing: 6px; color: #f4c20d; margin: -.2em 0 .2em; }
.stars .off { color: #ddd; }
.fault-list { list-style: none; padding: 0; margin: 0 0 1.2em; text-align: left; }
.fault-list li { border-left: 4px solid var(--minor); background: #fff7ea; border-radius: 8px; padding: 8px 12px; margin: 6px 0; font-size: .9rem; line-height: 1.4; }
.fault-list li.serious { border-color: var(--serious); background: #fdecec; }
.fault-list li.good { border-color: var(--good); background: #eaf7ef; }
.fault-list b { display: block; }

.hud { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.35); gap: 12px; }
.hud-level b { display: block; font: 1.3rem/1.1 "Archivo Black", sans-serif; }
.hud-level small { display: block; font-weight: 600; font-size: .85rem; max-width: 46ch; }
.faults { display: flex; gap: 6px; text-shadow: none; }
.faults span { min-width: 34px; text-align: center; border-radius: 999px; padding: 4px 10px; font: 700 .9rem Inter, sans-serif; color: #fff; }
.faults .minor { background: var(--minor); }
.faults .serious { background: var(--serious); }
.faults .minor::after { content: ' minor'; font-weight: 600; font-size: .75rem; }
.faults .serious::after { content: ' serious'; font-weight: 600; font-size: .75rem; }

.dash {
  position: fixed; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92); border-radius: 18px; padding: 10px 14px 10px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  pointer-events: none;
}
.dash[hidden], .tools[hidden], .pads[hidden], .toast[hidden] { display: none; }
.wheel { width: 64px; height: 64px; transition: transform .05s linear; }
.gear { font: 1.6rem/1 "Archivo Black", sans-serif; }
.gear.r { color: var(--red); }
.lock { font: 600 .75rem Inter, sans-serif; color: #5f6368; text-transform: uppercase; letter-spacing: .06em; }

.tools { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.tools button {
  border: 0; border-radius: 999px; background: rgba(255,255,255,.95); padding: 10px 14px;
  font: 700 .9rem Inter, sans-serif; color: var(--ink); cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.tools button kbd { font-size: .7rem; padding: 0 4px; }
.tools .done { background: var(--good); color: #fff; }
.tools .done.ready { animation: ready 0.8s infinite alternate; }
@keyframes ready { to { box-shadow: 0 0 0 6px rgba(34,163,90,.35); } }
.tools .looking { background: #ffd84a; }

.pads { position: fixed; left: 0; right: 0; bottom: 104px; display: flex; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.pads > div { display: flex; gap: 10px; pointer-events: auto; }
.pad-right { flex-direction: column; }
.pads button {
  width: 64px; height: 64px; border-radius: 16px; border: 0; background: rgba(255,255,255,.85);
  font-size: 1.4rem; color: var(--ink); box-shadow: 0 6px 16px rgba(0,0,0,.18); touch-action: none;
}
.pads button.on { background: #ffd84a; }

.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: rgba(20,20,20,.85); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; text-align: center;
  pointer-events: none; animation: toast-in .25s ease-out;
}
.toast.minor { background: rgba(243,156,18,.95); }
.toast.serious { background: rgba(215,25,31,.95); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

@media (max-width: 600px) {
  .hud-level small { display: none; }
  .tools { bottom: auto; top: 64px; right: 12px; max-width: none; }
  .tools button { padding: 8px 10px; font-size: .8rem; }
  .tools button kbd { display: none; }
  .dash { bottom: 12px; left: 50%; transform: translateX(-50%); }
  .pads { bottom: 16px; }
  .toast { top: 112px; }
}
