:root { --page: #fdfcfa; --ink: #4d3533; --ink2: #8a7774; --hair: #ece6e2; --raised: #f5f1ee; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.5 -apple-system, "Helvetica Neue", Arial, sans-serif; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; }
h1 { font: 400 34px/1.15 Georgia, "Times New Roman", serif; margin: 8px 0 4px; letter-spacing: -.01em; }
h2 { font: 400 22px/1.2 Georgia, serif; margin: 32px 0 8px; }
h3 { font-size: 16px; line-height: 24px; margin: 16px 0 0; font-weight: 600; }
.sub, .by { color: var(--ink2); font-size: 12px; line-height: 20px; margin: 0; }
nav { display: flex; gap: 16px; margin: 16px 0; font-size: 14px; }
nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a.on { border-bottom-color: var(--ink); }
a { color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 16px; background: var(--page); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pill.on { background: var(--ink); color: var(--page); }
.canvas { position: relative; width: 100%; margin-top: 8px; overflow: hidden; }
.web { position: absolute; left: 0; top: 0; pointer-events: none; }
.top { z-index: 60; }
.clabel { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; paint-order: stroke; stroke: var(--page); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.node { position: absolute; left: 0; top: 0; will-change: transform; }
.card { position: relative; width: 100%; height: 100%; border: 2px solid; border-radius: 16px; background: var(--raised); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 2px 8px rgba(77,53,51,.12); animation: pop .5s cubic-bezier(.2,1.3,.4,1) both, bob var(--t) ease-in-out var(--d) infinite; animation-delay: var(--e), var(--d); transition: opacity .25s, box-shadow .2s; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; pointer-events: none; }
.card.drag { cursor: grabbing; animation: none; transform: scale(1.1) rotate(-1.5deg); box-shadow: 0 14px 28px rgba(77,53,51,.28); }
.card.dim { opacity: .22; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tile { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 100%; padding: 6px; border-radius: 14px; color: #fff; font-size: 9px; line-height: 11px; }
.tile b { font-size: 10px; line-height: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 600px) { .tile { font-size: 10px; padding: 8px; } .tile b { font-size: 12px; line-height: 15px; } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -.5deg; } 50% { translate: 0 -5px; rotate: .5deg; } }
@keyframes pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
dialog { width: calc(100vw - 32px); max-width: 440px; max-height: 560px; overflow: auto; border: 0; border-radius: 16px; padding: 16px; background: var(--page); color: var(--ink); box-shadow: 0 20px 60px rgba(77,53,51,.35); }
dialog::backdrop { background: rgba(77,53,51,.45); }
.shots { display: grid; gap: 8px; }
.shots.many { grid-template-columns: repeat(2, 1fr); }
.shots img { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; background: var(--raised); }
.chips { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-size: 12px; line-height: 16px; color: #fff; background: transparent; }
.chip.also { background: transparent; }
.chip.link { border-color: var(--hair); color: var(--ink); cursor: pointer; min-height: 32px; }
.btn { margin-top: 16px; min-height: 40px; padding: 0 16px; border: 1px solid var(--hair); border-radius: 8px; background: var(--page); font: inherit; cursor: pointer; }
.facts { margin: 12px 0 0; display: grid; gap: 10px; }
.facts div { border-top: 1px solid var(--hair); padding-top: 10px; }
.facts dt { color: var(--ink2); font-size: 12px; }
.facts dd { margin: 0; font-weight: 600; }
.note { margin: 8px 0 0; }
.why { margin: 6px 0 0; color: var(--ink2); }
.search { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 4px; font: inherit; background: var(--page); color: var(--ink); margin-bottom: 8px; }
.row { border-top: 1px solid var(--hair); padding: 16px 0; }
.row h3 { margin-top: 0; }
.row dl { margin: 8px 0 0; display: grid; gap: 6px; }
.row dd { margin: 0; }
.row dt { color: var(--ink2); font-size: 12px; }
@media (min-width: 768px) { .row dl > div { display: grid; grid-template-columns: 160px 1fr; } }
.bar { display: flex; gap: 8px; align-items: flex-start; }
.bar .search { flex: 1; margin-bottom: 0; }
.add { margin-top: 0; white-space: nowrap; background: var(--ink); color: var(--page); }
.sel { min-height: 32px; border: 1px solid var(--hair); border-radius: 4px; background: var(--page); color: var(--ink); font: inherit; font-size: 12px; margin-left: 6px; }
.kind { color: var(--ink); font-weight: 600; }
.sliders { display: grid; gap: 4px; margin: 10px 0 0; }
.sl { display: grid; grid-template-columns: 92px 1fr 92px; align-items: center; gap: 8px; font-size: 11px; color: var(--ink2); }
.sl span:last-child { text-align: right; }
.tr { position: relative; display: block; height: 2px; background: var(--hair); border-radius: 1px; }
.tr b { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); }
.rowtop { display: flex; gap: 12px; align-items: center; }
.rowtop h3 { margin: 0; }
.thumb { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 12px; background: var(--raised); }
.tile-s { display: flex; align-items: flex-end; padding: 6px; color: #fff; font-size: 10px; }
.why-link { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; border-top: 1px solid var(--hair); padding: 8px 0; }
.why-link .by { margin-top: 2px; }
.x { border: 0; background: transparent; color: var(--ink2); font-size: 16px; cursor: pointer; min-width: 32px; min-height: 32px; }
.lk { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
