/* «Студия Глаза»: окно с рамкой, магниты на холодильнике, карта следов, открытки, лента, зал славы. Поверх style.css + ds.css. */
.studio { --eye: var(--accent); }
.sgrid { max-width: 1120px; margin: 0 auto; padding: 16px 16px 64px; display: grid; gap: 20px; }
.sgrid.narrow { max-width: 640px; }
.sgrid > div { display: grid; gap: 20px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--eye, var(--accent)); margin: 0 0 6px; font-weight: 600; }
.shero { overflow-x: clip; display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; padding: 8px 0; }
.shero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; line-height: 1.08; }
.sbio { font-family: var(--voice); font-size: 22px; line-height: 1.35; margin: 6px 0; }
@media (min-width: 860px) { .shero { grid-template-columns: 1.1fr 1fr; } .shero.one { grid-template-columns: 1fr; } }
.spanel { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r-card); padding: 20px; min-width: 0; }
.spanel h2 { margin: 0 0 12px; font-size: 22px; }
.actions, .lact { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.links a { color: var(--eye); }

/* ---------- окно и рамки ---------- */
.swin { --fw: 16px; position: relative; display: block; border-radius: 22px; padding: var(--fw); box-shadow: var(--shadow-2); }
.swin.small { --fw: 9px; border-radius: 16px; }
.swin-glass { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #24314a, #0f1420 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.swin-glass video { width: 100%; height: 100%; object-fit: cover; display: block; }
.swin-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; padding: 16px; text-align: center;
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--eye) 35%, transparent), transparent 55%), linear-gradient(180deg, #2a3a5c, #121826); }
.swin-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent calc(50% - 3px), rgba(0,0,0,.35) calc(50% - 3px), rgba(0,0,0,.35) calc(50% + 3px), transparent calc(50% + 3px)); }
.swin.frame-wood { background: repeating-linear-gradient(95deg, #7a4b2a 0 6px, #8d5a34 6px 11px, #6c4123 11px 15px); }
.swin.frame-shutters { background: linear-gradient(var(--eye), color-mix(in srgb, var(--eye) 70%, #000)); }
.swin.frame-shutters::before, .swin.frame-shutters::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 7%; border-radius: 6px; background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--eye) 85%, #fff) 0 7px, color-mix(in srgb, var(--eye) 60%, #000) 7px 9px); }
.swin.frame-shutters::before { left: -8px; } .swin.frame-shutters::after { right: -8px; }
.swin.frame-porthole { border-radius: 50%; background: radial-gradient(circle, #e7c27a, #a77a2c 70%, #6e4d17); }
.swin.frame-porthole .swin-glass { border-radius: 50%; aspect-ratio: 1; }
.swin.frame-porthole .swin-glass::after { display: none; }
.swin.frame-shoji { background: #efe6d2; }
.swin.frame-shoji .swin-glass::after { background: linear-gradient(90deg, transparent 32%, #3b2a1a 32% 33%, transparent 33% 66%, #3b2a1a 66% 67%, transparent 67%), linear-gradient(180deg, transparent 49%, #3b2a1a 49% 51%, transparent 51%); opacity: .7; }
.swin.frame-stained { background: conic-gradient(from 20deg, #c0392b, #f1c40f, #27ae60, #2980b9, #8e44ad, #c0392b); }
.swin.frame-aurora { background: linear-gradient(120deg, #19d3a2, #6a5cff, #ff5fa2, #19d3a2); background-size: 300% 300%; animation: aurora 12s ease-in-out infinite; }
@keyframes aurora { 50% { background-position: 100% 50%; } }

.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.fbtn { display: grid; gap: 6px; padding: 10px; min-height: 48px; border-radius: 14px; border: 1px solid var(--bd); background: var(--bg2); color: var(--fg); text-align: left; cursor: pointer; }
.fbtn i { height: 34px; border-radius: 8px; display: block; background: inherit; }
.fbtn.frame-wood i { background: #8d5a34; } .fbtn.frame-shutters i { background: var(--eye); } .fbtn.frame-porthole i { background: #c99a45; border-radius: 50%; width: 34px; }
.fbtn.frame-shoji i { background: #efe6d2; } .fbtn.frame-stained i { background: conic-gradient(#c0392b, #f1c40f, #27ae60, #2980b9, #8e44ad); } .fbtn.frame-aurora i { background: linear-gradient(120deg, #19d3a2, #6a5cff, #ff5fa2); }
.fbtn.on { border-color: var(--eye); box-shadow: 0 0 0 1px var(--eye); }
.fbtn[disabled] { opacity: .55; cursor: not-allowed; }
.fbtn small { color: var(--muted); font-size: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 2px solid transparent; cursor: pointer; }
.sw.on { border-color: var(--fg); box-shadow: 0 0 0 3px var(--bg); }
.sform { display: grid; gap: 16px; }
.sform label { display: grid; gap: 6px; }
.sform fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.sform legend { margin-bottom: 8px; }
.sched { display: flex; gap: 8px; flex-wrap: wrap; } .sched > * { flex: 1 1 120px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.on { background: var(--eye); color: #14161b; border-color: transparent; }

/* ---------- путь, цели ---------- */
.path { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; }
.path li { padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--bd); color: var(--muted); font-size: 14px; }
.path li.here { background: var(--eye); color: #14161b; border-color: transparent; font-weight: 600; }
.unl { padding-left: 20px; margin: 6px 0 12px; } .unl li { margin: 4px 0; }
.unl.have li::marker { content: "✓  "; color: var(--ok); }
.nextup { border: 1px dashed var(--bd-strong); border-radius: 14px; padding: 12px 14px; }
.goal { display: grid; grid-template-columns: 1fr minmax(80px, 160px) auto; gap: 12px; align-items: center; padding: 8px 0; }
.goal progress { width: 100%; height: 10px; accent-color: var(--eye); }
.goal.done span::after { content: " ✓"; color: var(--ok); }

/* ---------- холодильник магнитов ---------- */
.fridgebox { background: linear-gradient(180deg, #e9edf2, #cfd6df); color: #1a1d23; }
.fridgebox .note { color: #3c4350; }
.fridge { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.magnet { margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 6px; border-radius: 14px; }
.magnet:nth-child(3n) { transform: rotate(-3deg); } .magnet:nth-child(4n+1) { transform: rotate(2.5deg); }
.magnet .mg-svg { width: 72px; height: 72px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.magnet figcaption { display: grid; gap: 2px; font-size: 13px; }
.magnet figcaption span { color: #4a5160; font-size: 12px; }
.magnet.locked { opacity: .6; }
.magnet.rare .mg-svg { animation: wobble 5s ease-in-out infinite; }
@keyframes wobble { 0%, 90%, 100% { transform: rotate(0); } 94% { transform: rotate(-6deg) scale(1.04); } 97% { transform: rotate(5deg); } }

/* ---------- карта следов ---------- */
.fpmap { width: 100%; height: auto; display: block; }
.fpsea { fill: #101a2b; } .fpgrid line { stroke: rgba(255,255,255,.06); stroke-width: .5; }
.fp { fill: var(--eye); opacity: 0; animation: light .6s ease-out forwards; animation-delay: var(--d); }
.fp.first { fill: #fff; stroke: var(--eye); stroke-width: 1.5; }
@keyframes light { from { opacity: 0; r: 8; } to { opacity: 1; } }
.fpnums { display: flex; gap: 20px; flex-wrap: wrap; margin: 12px 0; } .fpnums b { font-size: 22px; color: var(--eye); }
.fplist { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.fplist li { font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-hi); }
.fplist li.first em { color: var(--eye); font-style: normal; }

/* ---------- открытки и комментарии ---------- */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.postcard { background: #f6efe2; color: #2b2419; border-radius: 6px; padding: 16px 18px; box-shadow: var(--shadow-1); font-family: var(--voice); font-size: 19px; line-height: 1.35; position: relative; }
.postcard footer { font-family: var(--body); font-size: 13px; color: #6c5d45; margin-top: 8px; }
.postcard.pinned::before { content: ""; position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--eye); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.postcard .creply, .creply { font-family: var(--body); font-size: 14px; border-left: 3px solid var(--eye); padding-left: 8px; margin: 8px 0 0; }
.postcard .link { color: #5a4a30; }
.cact { display: flex; gap: 12px; margin-top: 6px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 32px; padding: 0; font: inherit; font-size: 13px; }
.clist { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.cm.pinned { border-left: 3px solid var(--eye); padding-left: 8px; } .cm em { color: var(--eye); font-style: normal; font-size: 12px; margin-left: 6px; }
.cform { display: flex; gap: 8px; margin-top: 8px; } .cform input { flex: 1; min-width: 0; }

/* ---------- моменты и реакции ---------- */
.mgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mcard3 { display: grid; gap: 8px; min-width: 0; }
.mcard3 video, .fitem video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; object-fit: cover; }
.mcard3 h3, .fitem h3 { margin: 0; font-size: 17px; } .mcard3 h3 em { color: var(--eye); font-style: normal; font-size: 13px; }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--bd); background: var(--surface); color: var(--fg); font-size: 13px; cursor: pointer; }
.react svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.react.on { border-color: var(--eye); color: var(--eye); } .react.on svg { fill: color-mix(in srgb, var(--eye) 30%, transparent); }
.react b { font-weight: 600; color: var(--muted); }

/* ---------- зритель ---------- */
.vlevel { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r-card); padding: 20px; }
.vbig { font-size: 34px; font-weight: 700; margin: 0 0 10px; color: var(--accent); }
.pstamps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pstamp { background: #161920; aspect-ratio: 1; border: 2px dashed var(--bd-strong); border-radius: 50%; display: grid; place-content: center; text-align: center; padding: 14px; gap: 4px; transform: rotate(-4deg); color: #c3c8d2; }
.pstamp.on { border: 3px double var(--accent); color: var(--accent); transform: rotate(3deg); }
.pstamp b { font-size: 14px; } .pstamp span { font-size: 12px; }

/* ---------- лента ---------- */
.feed { display: grid; gap: 18px; }
.fitem { border-bottom: 1px solid var(--bd); padding-bottom: 18px; display: grid; gap: 8px; }
.fitem a { color: var(--fg); font-weight: 600; }
.caughtup { text-align: center; padding: 28px 16px; border: 1px solid var(--bd); border-radius: var(--r-card); background: var(--surface); }
.caughtup svg { width: 44px; height: 44px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- легенды (главная и /legends) ---------- */
.lhome { max-width: 1120px; margin: 24px auto; padding: 0 16px; }
.lhead { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lhead h2 { margin: 0; font-size: clamp(24px, 4vw, 34px); }
.lrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 16px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.lrow.wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); overflow: visible; }
.lcard { scroll-snap-align: start; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r-card); padding: 12px; min-width: 0; }
.lcard h3 { margin: 4px 0 0; font-size: 18px; } .lcard h3 a { color: var(--fg); text-decoration: none; }
.lmeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; font-size: 13px; color: var(--muted); }
.lmag { display: flex; gap: 6px; min-height: 40px; } .lmag svg { width: 40px; height: 40px; }
.lmag:empty { display: none; }
.ldot { position: absolute; top: 14px; left: 14px; background: rgba(10,11,14,.75); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); display: inline-flex; gap: 6px; align-items: center; }
.ldot i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.demo { background: #ffd86b; color: #241606; border-radius: 6px; padding: 1px 6px; font-weight: 700; font-size: 11px; text-transform: uppercase; }
.seasonal { padding-left: 18px; } .seasonal a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .magnet.rare .mg-svg, .frame-aurora, .fp { animation: none; opacity: 1; }
}
.sform textarea, .sform input { font-family: var(--body); }
