.lookbook {
  --surface: #191a1c;
  --line: #353639;
  --muted: #c1bdb8;
  --accent: #ffab8d;
  color-scheme: dark;
  scroll-margin-top: 90px;
  margin: 18px 0 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  color: #f5f1e9;
}
.lookbook *, .lookbook *::before { box-sizing: border-box; }
.lookbook [hidden] { display: none !important; }
.lookbook button { color: inherit; font: inherit; cursor: pointer; border: 0; background: transparent; padding: 0; }
.lookbook :is(button,input):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lookbar, .look-brand, .look-switch { display: flex; align-items: center; }
.lookbar { justify-content: space-between; flex-wrap: wrap; padding: 12px 18px; gap: 10px 16px; border-bottom: 1px solid var(--line); }
.look-brand { flex: none; gap: 10px; white-space: nowrap; }
.look-brand i { color: #ff8262; font: italic 29px/1 Georgia,serif; letter-spacing: -.09em; }
.look-brand h2 { font: inherit; font-weight: 650; font-size: 20px; letter-spacing: -.04em; margin: 0; color: inherit; }
.look-switch { gap: 3px; border-radius: 8px; padding: 3px; background: #0e0f11; }
.look-modes { max-width: 100%; overflow-x: auto; }
.look-switch button { padding: 8px 12px; font-size: 13px; line-height: 1.4; color: var(--muted); border-radius: 5px; white-space: nowrap; }
.look-switch button[aria-pressed=true] { color: white; background: #3b3c40; }
.look-body { display: grid; grid-template-columns: minmax(0,1fr) clamp(210px,23%,290px); }
.look-stage { min-width: 0; display: grid; align-items: center; padding: clamp(16px,2.6vw,36px); background: #111214; }
.look-images { display: grid; justify-items: center; align-items: center; }
.look-stage figure { margin: 0; min-width: 0; }
.look-images figure, .look-stage .portrait-viewport { width: min(100%,425px); }
.look-stage img { display: block; width: 100%; height: auto; aspect-ratio: 832/960; object-fit: contain; border-radius: 5px; background: #292a2c; }
.look-stage figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.lookbook[data-view=compare] .look-images { grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(8px,1.4vw,18px); }
.portrait-viewport { justify-self: center; user-select: none; touch-action: pan-y; cursor: grab; }
.portrait-viewport:active { cursor: grabbing; }
.portrait-viewport output, .portrait-orbit output { font-variant-numeric: tabular-nums; }
.look-inspector { min-width: 0; padding: clamp(18px,2vw,30px); border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.look-inspector h3 { margin: 0; font-size: clamp(25px,2.6vw,37px); line-height: 1.12; letter-spacing: -.04em; color: inherit; }
.look-inspector p { margin: -5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.look-inspector fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.look-inspector legend, .portrait-orbit { font-size: 13px; }
.look-inspector legend { margin-bottom: 8px; }
.look-inspector .look-switch button { flex: 1; }
.portrait-orbit { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.portrait-orbit input { accent-color: var(--accent); grid-column: 1/-1; width: 100%; min-height: 26px; margin: 0; }
.lookbook .look-export { background: #efe4d9; color: #231c16; padding: 11px 9px; border-radius: 6px; font-size: 14px; font-weight: 600; margin-top: auto; }
.look-export:disabled { opacity: .6; }
.look-inspector .look-error, .look-inspector .look-load-error { color: var(--accent); }
.look-film { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.look-film-label { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.look-strip, .look-sheet, .look-outputs { display: grid; gap: 8px; }
.look-strip { grid-template-columns: repeat(6,minmax(0,1fr)); }
.look-strip button { display: flex; align-items: center; gap: 8px; padding: 4px; text-align: start; border: 1px solid transparent; border-radius: 6px; font-size: 13px; color: var(--muted); }
.look-strip button[aria-pressed=true] { background: #322924; color: #fff1e5; border-color: #9b705e; }
.look-strip img { width: clamp(35px,3.8vw,58px); height: auto; border-radius: 3px; }
.portrait-expressions { grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 610px; }
.look-sheet { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; justify-self: center; width: min(100%,680px); }
.look-sheet button, .look-outputs button { min-width: 0; text-align: start; }
.look-sheet button > span, .look-outputs button > span, .look-process { display: block; margin-top: 5px; color: var(--muted); line-height: 1.4; font-size: 12px; }
.look-flow { display: grid; grid-template-columns: minmax(0,.9fr) auto minmax(0,1.5fr); align-items: center; gap: 12px; }
.look-process { position: relative; margin: 0; padding: 8px; text-align: center; background: #2c2623; border-radius: 4px; }
@media(min-width:851px) {
  .look-process::before, .look-process::after { content: ""; position: absolute; top: 50%; width: 12px; height: 1px; background: #8a6658; }
  .look-process::before { right: 100%; }
  .look-process::after { left: 100%; }
}
.look-outputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
.lookbook[data-tone=mono] { --portrait-filter: grayscale(1); }
#character-lock img { filter: var(--portrait-filter, none); }
@media(max-width:850px) {
  .lookbar { flex-direction: column; align-items: start; }
  .look-strip button { align-items: start; flex-direction: column; gap: 4px; }
  .look-strip img { width: 100%; height: clamp(50px,8vw,78px); object-fit: cover; object-position: center 35%; }
  .look-flow { grid-template-columns: minmax(0,.8fr) minmax(0,1.3fr); }
  .look-process { grid-row: 2; align-self: start; }
  .look-outputs { grid-column: 2; grid-row: 1/3; }
}
@media(max-width:670px) {
  .lookbar { padding: 12px; }
  .look-modes { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .look-switch button { padding: 9px 5px; }
  .look-modes button { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .look-body { display: flex; flex-direction: column; }
  .look-stage { padding: 12px; }
  .look-inspector { border-left: 0; border-top: 1px solid var(--line); gap: 12px; padding: 16px; }
  .look-inspector h3 { font-size: 23px; }
  .look-stage .portrait-viewport,.look-images figure { max-width: 320px; }
  .look-stage figcaption { font-size: 11px; gap: 4px; flex-wrap: wrap; }
  .look-film { padding: 12px; }
  .look-strip { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .look-sheet { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .look-strip button > span { font-size: 12px; }
}
