/* לוח: shared styles for the landing page, the board, the submission form and the print view. */
:root {
  --navy: #0f1f3d; --navy-2: #182b52; --gold: #e3b23c; --gold-2: #c8961f;
  --ink: #1b1f2a; --muted: #5b6478; --line: #e1e5ee; --card: #ffffff; --bg: #f3f5fa;
  --danger: #c93c3c; --ok: #1f9d55; --radius: 14px; --shadow: 0 2px 10px rgba(15, 31, 61, .08), 0 12px 32px rgba(15, 31, 61, .08);
  --font: 'Heebo', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; direction: rtl; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy-2); }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 500; line-height: 1.2; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #f6f7fb; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: var(--gold-2); }
.btn.danger { color: var(--danger); border-color: #f0c9c9; }
.btn.danger:hover { background: #fdf1f1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(15, 31, 61, .06); }
.btn.icon { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
.btn.sm { padding: .35rem .7rem; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.fab { position: fixed; bottom: 1.25rem; left: 1.25rem; z-index: 40; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--navy); color: #fff; border: 0; box-shadow: 0 8px 24px rgba(15, 31, 61, .35); font-size: 1.8rem; display: flex; align-items: center; justify-content: center; }
.fab:hover { background: var(--navy-2); }

/* forms */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=url], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(24, 43, 82, .12); }
textarea { min-height: 6rem; resize: vertical; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle .t-label { font-weight: 500; }
.toggle .t-hint { color: var(--muted); font-size: .85rem; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd5e2; border-radius: 999px; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; right: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(-18px); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* modals */
.modal-back { position: fixed; inset: 0; background: rgba(10, 16, 32, .55); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 1.5rem; } }
.modal { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: rise .18s; }
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-h h2 { margin: 0; font-size: 1.15rem; }
.modal-b { padding: 1.1rem 1.25rem; }
.modal-f { display: flex; gap: .6rem; justify-content: flex-start; padding: .9rem 1.25rem; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: .6; } }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: .6rem .8rem; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); }

/* toasts */
.toasts { position: fixed; bottom: 1.25rem; right: 50%; transform: translateX(50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 10px; box-shadow: var(--shadow); animation: rise .2s; font-size: .95rem; max-width: 92vw; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* chips, menus */
.menu { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 190px; padding: .35rem; animation: fade .12s; }
.menu button { display: flex; width: 100%; align-items: center; gap: .55rem; text-align: right; background: none; border: 0; padding: .5rem .7rem; border-radius: 8px; }
.menu button:hover { background: #f3f5fa; }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
.menu svg { width: 1.05em; height: 1.05em; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(15,31,61,.07); font-size: .82rem; }
.badge { display: inline-block; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: .78rem; font-weight: 700; text-align: center; }

/* color swatches */
.swatches { display: flex; gap: .45rem; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 2px var(--navy); }
.c-white { background: #ffffff; } .c-yellow { background: #fff3b0; } .c-green { background: #d6f3df; } .c-blue { background: #d8e8ff; }
.c-pink { background: #ffdde6; } .c-purple { background: #e8dcfb; } .c-orange { background: #ffe3c2; } .c-gray { background: #e8ebf1; }
.bg-swatch { width: 54px; height: 40px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.bg-swatch.active { border-color: var(--navy); }

/* board backgrounds */
.bg-sky { background: linear-gradient(135deg, #e3f0ff 0%, #f6f9ff 50%, #e8f3ff 100%); }
.bg-mint { background: linear-gradient(135deg, #dff6ee 0%, #f3fbf7 50%, #d9f1f2 100%); }
.bg-sand { background: linear-gradient(135deg, #fbefd9 0%, #fff8ec 50%, #f8e6cf 100%); }
.bg-rose { background: linear-gradient(135deg, #ffe1ea 0%, #fff2f5 50%, #f9dde8 100%); }
.bg-lavender { background: linear-gradient(135deg, #e9e1fb 0%, #f6f2ff 50%, #e2dcf7 100%); }
.bg-night { background: linear-gradient(135deg, #0f1f3d 0%, #1b2b4f 60%, #16213e 100%); color: #fff; }
.bg-chalk { background: radial-gradient(ellipse at 30% 20%, #2f5f4e, #1f4a3c 60%, #173b30); color: #fff; }
.bg-paper { background: #faf6ee; }
.bg-white { background: #ffffff; }
.bg-image { background-size: cover; background-position: center; background-attachment: fixed; }
.bg-night .board-title, .bg-chalk .board-title, .bg-night .board-desc, .bg-chalk .board-desc, .bg-night .section-h, .bg-chalk .section-h { color: #fff; }
.bg-image .board-title, .bg-image .board-desc { text-shadow: 0 1px 8px rgba(0,0,0,.45); color: #fff; }

/* ---------- landing ---------- */
.site-h { background: var(--navy); color: #fff; }
.site-h .wrap { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; }
.logo .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold); display: grid; place-items: center; color: var(--navy); font-size: 1.05rem; }
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: 0 0 .6rem; line-height: 1.2; }
.hero p { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.4rem; max-width: 46rem; }
.create-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.format { border: 2px solid var(--line); border-radius: 12px; padding: .75rem; cursor: pointer; background: #fff; text-align: right; transition: border-color .15s, transform .1s; }
.format:hover { transform: translateY(-1px); }
.format.active { border-color: var(--navy); background: #f6f8fd; }
.format .f-pic { height: 54px; margin-bottom: .5rem; display: grid; gap: 3px; }
.format .f-name { font-weight: 700; }
.format .f-hint { color: var(--muted); font-size: .82rem; }
.pic-wall { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.pic-wall i:nth-child(2) { grid-row: span 2; }
.pic-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.pic-columns { grid-template-columns: repeat(3, 1fr); }
.pic-columns i { height: 100%; }
.pic-stream { grid-template-columns: 1fr; }
.pic-canvas { position: relative; }
.pic-canvas i { position: absolute; width: 40%; height: 40%; }
.pic-canvas i:nth-child(1) { right: 0; top: 0; } .pic-canvas i:nth-child(2) { left: 5%; top: 30%; } .pic-canvas i:nth-child(3) { right: 25%; bottom: 0; }
.pic-timeline { grid-template-columns: repeat(4, 1fr); align-items: center; position: relative; }
.pic-timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #c7cddc; }
.pic-timeline i { height: 60%; }
.f-pic i { background: #c7cddc; border-radius: 4px; display: block; }
.format.active .f-pic i { background: var(--navy-2); }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.tpl { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem; cursor: pointer; text-align: right; }
.tpl:hover { border-color: var(--navy-2); }
.tpl b { display: block; }
.tpl span { color: var(--muted); font-size: .85rem; }
.my-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.my-board { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: .8rem .9rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; text-decoration: none; color: inherit; }
.my-board:hover { border-color: var(--navy-2); }
.my-board b { display: block; }
.my-board small { color: var(--muted); }
section.block { padding: 1.5rem 0; }
section.block h2 { font-size: 1.3rem; margin: 0 0 .8rem; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.feature { background: #fff; border-radius: 12px; padding: 1rem; border: 1px solid var(--line); }
.feature b { display: block; margin-bottom: .2rem; }
.feature span { color: var(--muted); font-size: .92rem; }
.site-f { padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; text-align: center; }
.site-f a { color: var(--navy); }

/* ---------- board ---------- */
.board-page { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(15,31,61,.08); }
.topbar .in { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; }
.topbar .brand { font-weight: 800; color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: .4rem; flex: none; }
.topbar .brand .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--gold); display: grid; place-items: center; font-size: .9rem; }
.topbar .spacer { flex: 1; }
.topbar .search { max-width: 240px; flex: 1; }
.topbar .search input { padding: .45rem .8rem; border-radius: 999px; }
.online { color: var(--muted); font-size: .85rem; display: inline-flex; align-items: center; gap: .3rem; }
.online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.online.off::before { background: #c0c6d4; }
.board-head { padding: 1.2rem 1rem .6rem; }
.board-title { font-size: clamp(1.4rem, 3.4vw, 2.1rem); margin: 0; font-weight: 800; color: var(--navy); line-height: 1.25; }
.board-desc { margin: .25rem 0 0; color: var(--muted); font-size: 1.02rem; white-space: pre-wrap; }
.board-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.board-body { flex: 1; padding: .5rem 1rem 6rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty b { display: block; font-size: 1.1rem; color: var(--ink); margin-bottom: .3rem; }

/* layouts */
.layout-wall { display: flex; gap: .9rem; align-items: flex-start; }
.layout-wall .col { flex: 1; display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.layout-stream { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.layout-columns { display: flex; gap: .9rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; min-height: 60vh; }
.layout-columns .section { flex: none; width: min(300px, 86vw); background: rgba(255,255,255,.55); border-radius: 14px; padding: .6rem; display: flex; flex-direction: column; gap: .7rem; max-height: calc(100vh - 160px); }
.bg-night .layout-columns .section, .bg-chalk .layout-columns .section { background: rgba(255,255,255,.12); }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-weight: 700; padding: .2rem .3rem; }
.section-h .count { color: var(--muted); font-weight: 500; font-size: .85rem; }
.section-list { display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; min-height: 60px; padding: 2px; }
.section-add { border: 1px dashed rgba(15,31,61,.3); background: transparent; border-radius: 10px; padding: .5rem; color: var(--muted); }
.section-add:hover { background: rgba(255,255,255,.5); }
.layout-timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.tl-track { position: relative; display: flex; gap: 1.2rem; overflow-x: auto; padding: 1.2rem .4rem 1.2rem; }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 1.95rem; height: 3px; background: repeating-linear-gradient(90deg, var(--navy-2) 0 10px, transparent 10px 18px); opacity: .5; }
.tl-item { flex: none; width: 270px; position: relative; padding-top: 1.6rem; }
.tl-item::before { content: ''; position: absolute; top: .5rem; right: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--navy-2); transform: translateX(50%); }
.tl-date { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; font-weight: 600; }
.layout-canvas { position: relative; min-height: 80vh; overflow: auto; border-radius: 14px; background-image: radial-gradient(rgba(15,31,61,.12) 1px, transparent 1px); background-size: 24px 24px; }
.layout-canvas .canvas-inner { position: relative; width: 3000px; height: 2000px; }
.layout-canvas .post { position: absolute; width: 260px; cursor: grab; }
.layout-canvas .post.dragging { cursor: grabbing; z-index: 30; }
.layout-canvas svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.layout-canvas svg.wires path { fill: none; stroke: var(--navy-2); stroke-width: 2.5; pointer-events: stroke; cursor: pointer; }
.layout-canvas svg.wires path.dashed { stroke-dasharray: 8 6; }
.layout-canvas svg.wires text { font-size: 12px; fill: var(--navy); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.post.link-source { outline: 3px solid var(--gold); }
.connect-hint { position: sticky; top: .5rem; z-index: 5; display: inline-flex; gap: .5rem; align-items: center; background: var(--navy); color: #fff; padding: .4rem .8rem; border-radius: 999px; margin: .4rem; }

/* post */
.post { background: var(--card); border-radius: 12px; box-shadow: 0 1px 2px rgba(15,31,61,.06), 0 6px 18px rgba(15,31,61,.08); overflow: hidden; position: relative; transition: box-shadow .15s, transform .15s; touch-action: pan-y; }
.post:hover { box-shadow: 0 2px 4px rgba(15,31,61,.08), 0 14px 28px rgba(15,31,61,.14); }
.post.dragging { opacity: .85; transform: rotate(1.2deg) scale(1.02); z-index: 30; box-shadow: 0 20px 40px rgba(15,31,61,.3); }
.post.placeholder { background: rgba(15,31,61,.08); box-shadow: none; border: 2px dashed rgba(15,31,61,.25); }
.post.pending { outline: 2px dashed var(--gold); }
.post.c-white { background: #fff; } .post.c-yellow { background: #fff3b0; } .post.c-green { background: #d6f3df; } .post.c-blue { background: #d8e8ff; }
.post.c-pink { background: #ffdde6; } .post.c-purple { background: #e8dcfb; } .post.c-orange { background: #ffe3c2; } .post.c-gray { background: #e8ebf1; }
.style-note .post { border-radius: 4px; box-shadow: 2px 3px 10px rgba(0,0,0,.18); }
.style-note .post::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: rgba(0,0,0,.06); }
.style-flat .post { box-shadow: none; border: 1px solid rgba(15,31,61,.12); }
.post .p-media img { width: 100%; height: auto; cursor: zoom-in; }
.post .p-media .video { position: relative; padding-top: 56.25%; background: #000; }
.post .p-media .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post .p-media audio { width: 100%; margin: .5rem 0 0; }
.post .p-body { padding: .75rem .9rem .5rem; }
.post .p-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 .2rem; word-wrap: break-word; }
.post .p-text { white-space: pre-wrap; word-wrap: break-word; margin: 0; }
.post .p-text a { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.post .p-link { display: flex; gap: .6rem; margin: .5rem 0 0; border: 1px solid rgba(15,31,61,.12); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; background: rgba(255,255,255,.6); }
.post .p-link img { width: 90px; height: 90px; object-fit: cover; flex: none; cursor: default; }
.post .p-link .l-text { padding: .5rem .6rem; min-width: 0; }
.post .p-link .l-title { font-weight: 600; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .p-link .l-desc { color: var(--muted); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .p-link .l-site { color: var(--muted); font-size: .78rem; direction: ltr; text-align: right; }
.post .p-file { display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: .45rem .7rem; border-radius: 10px; background: rgba(15,31,61,.07); text-decoration: none; color: inherit; max-width: 100%; }
.post .p-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post .p-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem .6rem .5rem; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.post .p-author { display: inline-flex; gap: .35rem; align-items: center; min-width: 0; }
.post .p-author .avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.post .p-actions { display: flex; align-items: center; gap: .1rem; }
.post .p-actions button { background: none; border: 0; padding: .25rem .4rem; border-radius: 8px; color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; }
.post .p-actions button:hover { background: rgba(15,31,61,.08); color: var(--ink); }
.post .p-actions button.on { color: var(--danger); }
.post .p-actions button.on svg { fill: currentColor; }
.post .p-actions svg { width: 1.1em; height: 1.1em; }
.post .p-grade { position: absolute; top: .4rem; left: .4rem; background: var(--navy); color: var(--gold); font-weight: 800; border-radius: 8px; padding: .1rem .5rem; font-size: .85rem; }
.post .p-pin { position: absolute; top: .4rem; right: .4rem; color: var(--gold-2); }
.post .p-pending { background: var(--gold); color: var(--navy); font-size: .8rem; font-weight: 700; padding: .25rem .7rem; display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.post .p-pending button { padding: .15rem .55rem; }
.stars { display: inline-flex; direction: ltr; }
.stars button { padding: .1rem !important; }
.stars button.lit svg { fill: #e3b23c; color: #e3b23c; }
.comments { border-top: 1px solid rgba(15,31,61,.1); padding: .5rem .7rem .6rem; background: rgba(255,255,255,.5); }
.comment { display: flex; gap: .4rem; align-items: baseline; font-size: .9rem; padding: .2rem 0; }
.comment b { flex: none; }
.comment .c-del { margin-right: auto; background: none; border: 0; color: var(--muted); font-size: .8rem; }
.comment-form { display: flex; gap: .4rem; margin-top: .4rem; }
.comment-form input { padding: .4rem .7rem; border-radius: 999px; }
.drag-handle { cursor: grab; }

/* composer */
.composer .attach-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.composer .attach-row .btn { padding: .4rem .7rem; font-size: .9rem; }
.attach-preview { margin-top: .6rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem; display: flex; gap: .6rem; align-items: center; background: #fafbfe; }
.attach-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.attach-preview .ap-text { flex: 1; min-width: 0; font-size: .9rem; }
.attach-preview .ap-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-preview .ap-text span { color: var(--muted); }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: .5rem; }
.progress i { display: block; height: 100%; width: 0; background: var(--navy-2); transition: width .2s; }
.drawpad { border: 1px solid var(--line); border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 280px; }
.rec { display: flex; align-items: center; gap: .6rem; }
.rec .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* share */
.share-link { display: flex; gap: .4rem; align-items: center; }
.share-link input { direction: ltr; text-align: left; font-size: .9rem; }
.qr { display: grid; place-items: center; padding: .5rem; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr svg, .qr img { width: 220px; height: 220px; }
.code { font-family: Consolas, monospace; font-size: .8rem; direction: ltr; text-align: left; background: #f3f5fa; padding: .6rem; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
.warn { background: #fff7e0; border: 1px solid #f0dca0; color: #6b4e00; padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; }
.info { background: #eef4ff; border: 1px solid #cfdcf8; color: #1d3b7a; padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; }

/* sections editor */
.sec-list { display: flex; flex-direction: column; gap: .4rem; }
.sec-item { display: flex; gap: .4rem; align-items: center; }
.sec-item input { flex: 1; }

/* slideshow */
.slideshow { position: fixed; inset: 0; z-index: 150; background: #0b1326; color: #fff; display: flex; flex-direction: column; }
.slideshow .ss-top { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; }
.slideshow .ss-body { flex: 1; display: grid; place-items: center; padding: 1rem; overflow: auto; }
.slideshow .post { width: min(760px, 94vw); font-size: 1.25rem; color: var(--ink); }
.slideshow .post .p-title { font-size: 1.6rem; }
.slideshow .ss-nav { display: flex; justify-content: center; gap: 1rem; padding: .8rem; align-items: center; }
.slideshow .ss-nav .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.slideshow .ss-section { font-size: 2.2rem; font-weight: 800; text-align: center; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(0,0,0,.9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94vh; width: auto; height: auto; object-fit: contain; }

/* pending panel */
.pending-bar { position: sticky; top: 56px; z-index: 30; background: var(--gold); color: var(--navy); padding: .45rem .9rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-weight: 600; }

/* embed */
.embed .topbar .brand span { display: none; }
.embed .board-head { padding-top: .6rem; }
.powered { position: fixed; bottom: .5rem; right: .6rem; font-size: .75rem; background: rgba(255,255,255,.85); padding: .15rem .5rem; border-radius: 999px; z-index: 20; }
.powered a { text-decoration: none; color: var(--navy); font-weight: 600; }

/* submit page */
.submit-page { max-width: 560px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.submit-page .card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.thanks { text-align: center; padding: 2rem 1rem; }
.thanks .big { font-size: 3rem; }

/* print */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-post { break-inside: avoid; border: 1px solid #ccc; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .6rem; }
  .print-post img { max-height: 320px; width: auto; }
}
.print-wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem; }
.print-wrap h1 { margin: 0 0 .3rem; }
.print-wrap h2 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.print-post { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .6rem; background: #fff; }
.print-post .meta { color: var(--muted); font-size: .85rem; }
.print-post img { max-height: 320px; width: auto; margin-top: .4rem; border-radius: 6px; }
.print-grid { columns: 2; column-gap: 1rem; }
@media (max-width: 640px) { .print-grid { columns: 1; } }

@media (max-width: 640px) {
  .topbar .search { display: none; }
  .topbar .in { gap: .3rem; }
  .board-body { padding: .4rem .7rem 6rem; }
  .layout-wall { gap: .6rem; }
  .modal-f { padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); }
}
