/* City@UMD hardware viewer (viewer.js) */
:root { --teal: #008080; --teal-dark: #006d6d; --ink: #17232c; --slate: #52616c; --line: #dbe4e6; --panel: rgba(255,255,255,.94); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eef4f4 55%, #e2eaeb 100%); }
.viewer { position: relative; height: 100vh; overflow: hidden; }
.is-embedded .viewer { height: 100vh; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }
.head { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
.head h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.head p { margin: 2px 0 0; color: var(--slate); font-size: 12px; }
.head a { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--teal); font-weight: 700; font-size: 12px; text-decoration: none; white-space: nowrap; }
.head a:hover { border-color: var(--teal); }
.brand { display: inline-block; margin-bottom: 4px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--slate); font-size: 13px; pointer-events: none; }
.toolbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: calc(100% - 24px); padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 12px 30px rgba(23,35,44,.12); }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #eef3f4; }
.seg button, .tool { border: 0; border-radius: 8px; padding: 7px 11px; background: transparent; color: var(--slate); font: 700 12.5px/1 inherit; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--teal); box-shadow: 0 2px 8px rgba(23,35,44,.1); }
.tool { border: 1px solid var(--line); background: #fff; }
.tool:hover, .seg button:hover { color: var(--teal); }
.range { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--slate); }
.range input { width: 120px; accent-color: var(--teal); }
.range output { min-width: 62px; font-weight: 700; color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--slate); cursor: pointer; }
.check input { accent-color: var(--teal); }
.panel { position: absolute; right: 14px; bottom: 76px; width: 230px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 30px rgba(23,35,44,.12); }
.panel h2 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.part { display: grid; grid-template-columns: 16px 14px 1fr; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.part input { margin: 0; accent-color: var(--teal); }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); }
.pick { position: absolute; left: 16px; bottom: 76px; max-width: min(360px, calc(100% - 32px)); padding: 10px 13px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 10px; background: var(--panel); box-shadow: 0 10px 24px rgba(23,35,44,.1); font-size: 13px; color: var(--slate); }
.pick b { display: block; margin-bottom: 2px; font-size: 14px; color: var(--ink); }
.hint { position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(23,35,44,.78); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.is-embedded .head h1 { font-size: 16px; }
.is-shot .head, .is-shot .toolbar, .is-shot .hint, .is-shot .panel, .is-shot .pick { display: none !important; }
@media (max-width: 640px) {
  .toolbar { bottom: 10px; gap: 8px; padding: 7px; }
  .range input { width: 90px; }
  .range output { display: none; }
  .hint { display: none; }
  .panel, .pick { bottom: 120px; }
}
