/* Walls: the John kit (brand/john/tokens.css), softened for Syd: warm ivory by default, near-black as the option. */
:root {
  --john-ground: #141414; --john-raise: #1E1D1B; --john-ivory: #F2EBDD; --john-soft: #B5AFA3;
  --john-line: rgba(242, 235, 221, .14); --john-ink: #141414;
  --john-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="ivory"] {
  --bg: #F2EBDD; --raise: rgba(20, 20, 20, .045); --text: #141414; --soft: #6E685E; --line: rgba(20, 20, 20, .12);
  --main-bg: #141414; --main-fg: #F2EBDD; --sel-bg: #141414; --sel-fg: #F2EBDD; --sheet: #F7F2E8; color-scheme: light;
}
html[data-theme="dark"] {
  --bg: var(--john-ground); --raise: var(--john-raise); --text: var(--john-ivory); --soft: var(--john-soft); --line: var(--john-line);
  --main-bg: var(--john-ivory); --main-fg: var(--john-ink); --sel-bg: var(--john-ivory); --sel-fg: var(--john-ink); --sheet: #1E1D1B; color-scheme: dark;
}
* { box-sizing: border-box; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 17px/1.45 var(--john-font);
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px, env(safe-area-inset-left));
  display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; height: 60px; width: 100%; max-width: 560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { display: inline-block; width: 26px; height: 21px; background: currentColor;
  -webkit-mask: url(mark.svg) center / contain no-repeat; mask: url(mark.svg) center / contain no-repeat; }
.mark.small { width: 15px; height: 12px; margin-right: 7px; vertical-align: -1px; }
.name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--raise); font-size: 17px; font-weight: 600; }

h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; margin: 28px 0 14px; }
h2 { font-size: 22px; letter-spacing: -.02em; margin: 24px 0 10px; font-weight: 700; }
.soft { color: var(--soft); margin: 0 0 20px; }
.small { font-size: 15px; }
.center { text-align: center; }

.btn-main { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border-radius: 999px;
  border: 0; background: var(--main-bg); color: var(--main-fg); font-weight: 600; font-size: 18px; margin: 20px 0 8px; padding: 0 22px; text-align: center; }
.btn-main:active, .chip:active { transform: scale(.98); }
.link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; background: none; border: 0;
  color: var(--soft); font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }

.chip { min-height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); font-size: 15px; font-weight: 500;
  padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.chip:disabled { opacity: .4; }
.small-chip { min-height: 40px; padding: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin: 12px 0 4px; }

.frames .chip { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sw { width: 18px; height: 18px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.25); }
.sw-none { background: transparent; border-style: dashed; border-color: currentColor; opacity: .6; }
.sw-black { background: #1b1b1b; } .chip.on .sw { border-color: currentColor; }
html[data-theme="dark"] .sw-black { border-color: rgba(242, 235, 221, .45); } .sw-white { background: #fafafa; }
.sw-gold { background: linear-gradient(135deg, #8a6a2a, #f3dd8e 45%, #b8912f 60%, #f6e7a9 80%, #9c7a33); }
.sw-chrome { background: linear-gradient(135deg, #6d6f73, #f4f6f8 40%, #9a9da2 55%, #fff 75%, #5d6064); }
.sw-mirror { background: linear-gradient(135deg, #c9ced4, #ffffff 30%, #8d949c 50%, #eef1f4 70%, #aab1b8); }

.stage-wrap { display: flex; justify-content: center; margin-top: 4px; }
.stage { display: block; max-width: 100%; border-radius: 16px; touch-action: none; background: var(--raise); }
.hint { text-align: center; margin: 10px 0 2px; min-height: 22px; }

.field { display: block; background: var(--raise); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; }
.field span { display: block; font-size: 13px; color: var(--soft); }
.field input { width: 100%; border: 0; background: transparent; outline: none; font-size: 19px; padding: 2px 0; }
.field:focus-within span { color: var(--text); }
.field + .field { margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2 .field + .field { margin-top: 0; }

.looks-block { margin-top: 20px; }
.looks-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 3); gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.looks-row::-webkit-scrollbar { display: none; }
.look { scroll-snap-align: start; background: var(--raise); border: 1px solid var(--line); border-radius: 18px; padding: 6px; text-align: left; min-width: 0; }
.look img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 13px; background: var(--line); }
.look span { display: block; font-size: 14px; padding: 6px 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair figure { margin: 0; min-width: 0; }
.pair img { display: block; width: 100%; border-radius: 14px; background: var(--raise); }
.pair figcaption { font-size: 14px; color: var(--soft); padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 8px; }
.seg button { min-height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); font-weight: 600; }
.seg button.on { background: var(--sel-bg); color: var(--sel-fg); }
.big { display: block; width: 100%; border-radius: 16px; background: var(--raise); }

.foot { text-align: center; color: var(--soft); font-size: 13px; padding: 28px 0 18px; }
.verse-btn { background: none; border: 0; color: var(--soft); font-size: 13px; min-height: 44px; padding: 0 16px; }
.verse { max-width: 340px; margin: 0 auto 12px; font-size: 14px; line-height: 1.5; color: var(--soft); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--main-bg); color: var(--main-fg); padding: 12px 18px; border-radius: 999px; font-size: 15px; max-width: calc(100vw - 40px);
  transition: .25s; pointer-events: none; z-index: 40; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--sheet); border-radius: 22px 22px 0 0;
  max-height: 88vh; overflow-y: auto; padding: 10px max(20px, env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.sheet .inner { max-width: 560px; margin: 0 auto; }
.sheet h2 { margin-top: 10px; }
.sheet .pick { display: flex; align-items: center; gap: 12px; }
.sheet .pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.sheet .list { display: grid; gap: 8px; }
.sheet .list .chip { text-align: left; padding: 0 18px; }
.danger { font-weight: 600; }
.label { font-size: 13px; color: var(--soft); margin: 18px 0 4px; }
