@import url("./fonts.css");
:root { color-scheme: light; font-family: "Schibsted Grotesk", sans-serif; background: #faf8f4; color: #262522; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.picker-shell { max-width: 1600px; margin: auto; padding: 0 44px 64px; }
.picker-top { height: 88px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #e6e1d9; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #ded9d0; border-radius: 50%; }
.icon-button img { width: 18px; height: 18px; }
.picker-brand { color: inherit; text-decoration: none; font-weight: 900; font-size: 21px; letter-spacing: -.06em; }
.exit { margin-left: auto; color: #625e58; font-size: 13px; text-decoration: none; }
.picker-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 54px; align-items: start; padding-top: 48px; }
.catalog { min-width: 0; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; max-width: 740px; font-family: "Plus Jakarta Sans", sans-serif; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.055em; }
.intro { color: #716c65; font-size: 15px; line-height: 1.6; margin-bottom: 30px; }
.filters { display: grid; grid-template-columns: minmax(180px, 1fr) 155px 155px; gap: 12px; align-items: end; }
.filters label { display: grid; gap: 8px; color: #6c675f; font-size: 12px; font-weight: 700; }
.filters input, .filters select { min-width: 0; width: 100%; min-height: 44px; padding: 0 12px; color: #2e2b27; background: #fff; border: 1px solid #ded9d0; border-radius: 9px; }
.count { margin: 25px 0 14px; color: #645d54; font-size: 12px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
.template-card { min-width: 0; }
.thumb-wrap { position: relative; height: 270px; overflow: hidden; background: #eae5db; border: 1px solid #e2ddd4; border-radius: 14px; }
.thumb-render { width: 390px; transform-origin: top left; pointer-events: none; }
.thumb-hit { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; }
.favorite { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e0dcd5; border-radius: 50%; background: #fff; }
.favorite img { width: 17px; height: 17px; }
.favorite[aria-pressed="true"] { background: #eacfc2; border-color: #d2a596; }
.template-card.selected .thumb-wrap { outline: 3px solid #a77d6a; outline-offset: 2px; }
.card-title { margin: 13px 0 3px; font-size: 15px; font-weight: 800; }
.card-category { margin: 0; color: #645d54; font-size: 12px; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions button { flex: 1; min-width: 0; }
.primary, .secondary { min-height: 40px; padding: 9px 14px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.primary { border: 1px solid #262522; background: #262522; color: #fff; }
.secondary { border: 1px solid #dcd6cd; background: #fff; color: #302d29; }
.empty { padding: 40px; border: 1px dashed #d7d0c5; border-radius: 12px; color: #716c65; text-align: center; }
.preview-panel { position: sticky; top: 24px; padding: 22px; border: 1px solid #e6e0d7; border-radius: 18px; background: #fffdf9; box-shadow: 0 18px 45px #453a2a0b; }
.preview-heading { display: flex; align-items: start; gap: 10px; justify-content: space-between; }
.preview-heading h2 { margin: 0 0 5px; font-size: 18px; }
.preview-heading p { margin-bottom: 14px; color: #645d54; font-size: 12px; line-height: 1.4; }


.text-button { white-space: nowrap; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; color: #605952; font-size: 11px; padding: 3px 0; }
.phone-frame { padding: 8px; border: 1px solid #d5d0c8; border-radius: 28px; background: #252525; }
.phone-window { height: min(52vh, 530px); min-height: 300px; overflow: auto; border-radius: 21px; background: #fff; scrollbar-width: thin; }
#live-preview { width: 100%; min-height: 100%; }
.wide { width: 100%; margin-top: 16px; min-height: 46px; }
.scratch { display: block; margin: 14px auto 0; text-align: center; color: #4d4843; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.sample-note { margin: 15px 0 0; color: #645d54; font-size: 11px; line-height: 1.5; text-align: center; }
.message:empty { display: none; }
.message { color: #9b3e31; font-size: 12px; }
dialog { width: min(660px, calc(100vw - 32px)); max-height: 92vh; padding: 20px; border: 0; border-radius: 16px; background: #faf8f4; box-shadow: 0 24px 90px #0005; }
dialog::backdrop { background: #1d1a18a6; }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin-bottom: 12px; font-size: 20px; }
.dialog-scroll { max-height: 65vh; overflow: auto; border: 1px solid #e3ded6; border-radius: 12px; background: #eeeae3; }
#full-preview { width: min(390px, 100%); margin: auto; background: #fff; }
.dialog-actions { justify-content: flex-end; margin-top: 16px; }
@media (max-width: 1100px) { .picker-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 24px; } .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .filters { grid-template-columns: 1fr 1fr; } .search-label { grid-column: 1 / -1; } }
@media (max-width: 760px) { .picker-shell { padding: 0 18px 45px; } .picker-top { height: 70px; } .picker-layout { display: flex; flex-direction: column; padding-top: 28px; gap: 32px; } .catalog, .preview-panel { width: 100%; } .preview-panel { position: static; } .phone-window { height: 360px; } .template-grid { gap: 22px 12px; } .thumb-wrap { height: 230px; } .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 370px) { .template-grid { grid-template-columns: 1fr; } .thumb-wrap { height: 290px; } }
