:root {
  --paper: #F4F7FB; --paper2: #E8EEF6; --card: #FFFFFF; --ink: #12264A; --ink2: #46536B; --muted: #7B8AA1;
  --line: #DBE3EE; --red: #194BA0; --red2: #123A7D; --gold: #B5B5B6; --sage: #4F7A62;
  --dark: #0B1530; --dark2: #13204A;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--red2); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; margin: 0 0 12px; }
h1 { font-size: clamp(38px, 6vw, 68px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 22px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.kick { font: 700 12px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 700 16px Inter, sans-serif; border-radius: 12px; padding: 13px 20px; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-red { background: var(--red); color: #fff; } .btn-red:hover { background: var(--red2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.top { border-bottom: 1px solid var(--line); background: rgba(244, 247, 251, .92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 20px Fraunces, serif; color: var(--ink); text-decoration: none; }
.logo i { width: 38px; height: 38px; background: url(/assets/scale-icon.png) center / contain no-repeat; }
.powered { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 8px 16px 36px; }
.powered img { height: 34px; width: auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=datetime-local], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--ink); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 12px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { font: 600 14px Inter, sans-serif; border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: 9px 13px; border-radius: 10px; cursor: pointer; }
.seg button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.look { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; cursor: pointer; text-align: center; font: 600 13px Inter, sans-serif; color: var(--ink); }
.look canvas { width: 100%; aspect-ratio: 1; border-radius: 10px; display: block; margin-bottom: 4px; }
.look.on { border-color: var(--red); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 99; max-width: calc(100% - 32px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--paper2); aspect-ratio: 3 / 4; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .by { position: absolute; left: 8px; bottom: 8px; background: rgba(23, 17, 13, .7); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.tile .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; }
.tile .acts button, .tile .acts a { width: 34px; height: 34px; border-radius: 9px; border: 0; background: rgba(255, 253, 249, .92); cursor: pointer; display: grid; place-items: center; font-size: 16px; text-decoration: none; color: var(--ink); }
.tile .acts .fav.on { background: var(--gold); }
.lightbox { position: fixed; inset: 0; background: rgba(15, 10, 7, .94); display: grid; place-items: center; z-index: 60; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 8px; }
.lightbox .bar { position: fixed; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } .looks { grid-template-columns: repeat(2, 1fr); } .grid { grid-template-columns: repeat(2, 1fr); } }
