/* The phone app. Colours follow the approved vault mock-up. */
:root {
  --surround: #241f1a;
  --panel: #2d2721;
  --well: #15110e;
  --raised: #3a332c;
  --text: #f4efe6;
  --muted: #a89f90;
  --accent: #d85a30;
  --highlight: #f2c14e;
  --ok: #9ccf8a;
}
@font-face { font-family: "Archivo Black"; src: url("fonts/archivo-black.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--surround); color: var(--text); font: 16px/1.4 system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
#app { height: 100%; max-width: 480px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }

.screen { height: 100%; background: var(--panel); border-radius: 22px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.screen__header { display: flex; justify-content: space-between; align-items: baseline; }
.screen__title { font-size: 19px; font-weight: 600; margin: 0; }
.screen__status { color: var(--highlight); font-size: 13px; }
.screen__body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.screen__text { display: flex; flex-direction: column; gap: 8px; }
.screen__text p { margin: 0; }
.screen__text--centred { text-align: center; }
.screen__prompt { margin: 0; font-size: 17px; }
.screen__hint { margin: 0; color: var(--muted); font-size: 14px; }
.screen__hint--centred { text-align: center; }
.screen__actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.screen__row { display: flex; gap: 10px; }
.screen__row > * { flex: 1; }
.notice { margin: 0; min-height: 1.4em; text-align: center; color: var(--highlight); font-size: 14px; }
.lock { font-size: 52px; margin: 18px 0 4px; }

.button { border: 0; border-radius: 12px; padding: 14px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.button--primary { background: var(--accent); color: #fff; }
.button--secondary { background: var(--raised); font-weight: 400; font-size: 14px; padding: 11px; }
.button:disabled { opacity: 0.5; }

.melody-progress { display: flex; justify-content: center; gap: 10px; }
.melody-progress__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--raised); }
.melody-progress__dot--played { background: var(--accent); }

.piano { height: 150px; margin-top: auto; background: var(--well); padding: 6px; border-radius: 8px; touch-action: manipulation; user-select: none; }
.piano__keys { position: relative; display: flex; height: 100%; }
.piano--disabled { opacity: 0.45; }
.piano__key { border: 0; padding: 0; cursor: pointer; }
.piano__key--white { height: 100%; background: var(--text); border-radius: 0 0 4px 4px; box-shadow: inset -1px 0 0 var(--well), inset 1px 0 0 var(--well); }
.piano__key--black { position: absolute; top: 0; height: 58%; background: #000; border-radius: 0 0 3px 3px; transform: translateX(-50%); z-index: 1; }
.piano__key--down { background: var(--accent); }

.entry { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.entry__input { background: var(--well); color: var(--highlight); border: 1px dashed var(--muted); border-radius: 10px; padding: 14px; font: 600 16px ui-monospace, monospace; width: 100%; }

.backup-code { background: var(--well); border: 1px dashed #cbbfa8; border-radius: 10px; padding: 18px 8px; text-align: center; font: 600 20px/1.7 ui-monospace, monospace; letter-spacing: 0.06em; color: var(--highlight); }

.accounts { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.account { background: var(--surround); border-radius: 12px; padding: 11px; display: flex; flex-direction: column; gap: 4px; }
.account__site { font-weight: 600; }
.account__name { color: var(--muted); font-size: 13px; }
.bracelet { margin-top: 4px; }
.bracelet__canvas { display: block; width: 100%; height: 26px; object-fit: cover; border-radius: 4px; }

.camera { position: relative; flex: 1; min-height: 0; background: #0d0b09; border-radius: 12px; overflow: hidden; }
.camera__preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera__aim { position: absolute; inset: 30% 6%; border: 2px solid var(--highlight); border-radius: 10px; pointer-events: none; }

.comb { position: relative; height: 230px; border-radius: 12px; overflow: hidden; background: #17150f; }
/* The FidgetComb's own finish: a vignette and faint scan lines over the scene. */
.comb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 42%, transparent 38%, rgba(0, 0, 0, 0.62) 100%), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px); }
.comb canvas { display: block; width: 100%; height: 100%; }
.comb--unavailable { display: none; }
.result__outcome { margin: 0; text-align: center; font-size: 18px; min-height: 1.4em; }
[data-screen="result"] .screen__actions { margin-top: 0; }
[data-outcome="ok"] .result__outcome { color: var(--ok); }
[data-outcome="failed"] .result__outcome { color: var(--highlight); }
