/* Layout: a cutting-mat ground holding a grid of artboards; each artboard carries its name and pixel size like a frame label in a design tool. Two views: Tasarımlar, Anketler. */
:root {
  --bg: #E7E7EB; --dot: #C3C3CC; --surface: #FFFFFF; --mat: #EFEFF3; --ink: #17181C; --muted: #5C5F69; --line: #CDCDD5;
  --accent: #2747E8; --accent-ink: #FFFFFF; --accent-soft: #E3E8FD;
  --hot: #D81E5B; --hot-soft: #FBE3EB; --ok: #17794A; --ok-soft: #DDF3E7;
  --shadow: 0 1px 2px rgba(20,23,31,.06), 0 6px 18px rgba(20,23,31,.06);
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #16171B; --dot: #2F3039; --surface: #212228; --mat: #2A2B33; --ink: #EDEDF0; --muted: #9B9DA8; --line: #363740;
  --accent: #8497FF; --accent-ink: #0F1218; --accent-soft: #232B4D;
  --hot: #FF6E9A; --hot-soft: #3B1C2A; --ok: #5FD39A; --ok-soft: #163325;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.3); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #16171B; --dot: #2F3039; --surface: #212228; --mat: #2A2B33; --ink: #EDEDF0; --muted: #9B9DA8; --line: #363740;
  --accent: #8497FF; --accent-ink: #0F1218; --accent-soft: #232B4D;
  --hot: #FF6E9A; --hot-soft: #3B1C2A; --ok: #5FD39A; --ok-soft: #163325;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.3); color-scheme: dark }

* { box-sizing: border-box }
body { background: var(--bg) radial-gradient(circle, var(--dot) 1px, transparent 1.4px) 0 0 / 22px 22px; color: var(--ink); font: 15px/1.5 var(--body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface) }
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line) }
.appbar-in { max-width: 1240px; margin: 0 auto; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0 }
.brand h1 { font: 700 19px/1.15 var(--display); letter-spacing: -.01em; margin: 0 }
.brand p { margin: 2px 0 0; color: var(--muted); font: 12px/1.3 var(--mono) }
.mark { position: relative; width: 24px; height: 24px; border: 2px solid var(--ink); flex: none; margin: 4px }
.board::after, .mark::after { content: ""; position: absolute; inset: -5px; pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) left top / 7px 7px no-repeat, linear-gradient(var(--accent), var(--accent)) right top / 7px 7px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 7px 7px no-repeat, linear-gradient(var(--accent), var(--accent)) right bottom / 7px 7px no-repeat }
@media (max-width: 640px) { .appbar { position: static } }
.wrap { max-width: 1240px; margin: 0 auto; padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 22px; }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px }
.top h1 { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; margin: 0; text-wrap: balance }
.top p { margin: 6px 0 0; color: var(--muted); font-variant-numeric: tabular-nums }
.top-actions { display: flex; flex-wrap: wrap; gap: 10px }

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600 }
.btn:hover { border-color: var(--muted) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.btn.primary:hover { filter: brightness(1.08) }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px }
.btn.ghost { background: transparent }
.btn.danger { color: var(--hot); border-color: var(--hot) }
.btn[disabled] { opacity: .5; cursor: not-allowed }
.ico { width: 16px; height: 16px; flex: none; display: inline-flex }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line) }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px;
  font: 600 15px var(--display); color: var(--muted) }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent) }
.tab .n { font: 500 12px var(--body); background: var(--mat); color: var(--muted); border-radius: 999px; padding: 1px 8px; margin-left: 6px; font-variant-numeric: tabular-nums }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--muted) }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px }
.sort select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 8px; color: var(--ink) }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--col, 260px), 1fr)); gap: 36px 28px; align-items: start; padding: 6px 4px }
.ab { display: flex; flex-direction: column; gap: 7px; min-width: 0 }
.ab-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 12px/1.3 var(--mono); color: var(--muted) }
.ab-name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.ab-dim { white-space: nowrap; flex: none }
.ab:hover .ab-name, .ab:focus-within .ab-name { color: var(--accent) }
.board { position: relative; display: block; width: 100%; max-width: 100%; padding: 0; border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow) }
.board img, .board video { width: 100%; height: 100%; object-fit: contain; display: block }
.board::after { opacity: 0 }
.board:hover, .board:focus-visible { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); outline: none }
.board:hover::after, .board:focus-visible::after { opacity: 1 }
.board .play { position: absolute; right: 8px; bottom: 8px; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 6px; display: inline-flex }
.ab-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px }
.ab-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface) }
.seg button { border: 0; background: transparent; padding: 6px 10px; font: 500 12px var(--mono); color: var(--muted) }
.seg button + button { border-left: 1px solid var(--line) }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg) }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--mat); overflow: hidden }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: contain; display: block }
.thumb .cat { position: absolute; left: 8px; top: 8px; background: var(--surface); color: var(--ink); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600 }
.thumb .play { position: absolute; right: 8px; bottom: 8px; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 6px; display: inline-flex }
.missing { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 12px; text-align: center }
.meta { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.meta .t { font: 600 16px/1.3 var(--display); overflow-wrap: anywhere }
.spec { font: 12px/1.4 var(--mono); color: var(--muted) }
.note { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin-top: 4px }
.by { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; min-width: 0 }
.by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.av { width: 20px; height: 20px; border-radius: 50%; flex: none; object-fit: cover; background: var(--mat) }
.acts { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; margin-top: auto }
.vote { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; font-weight: 600; font-variant-numeric: tabular-nums }
.vote:hover { border-color: var(--hot); color: var(--hot) }
.vote[aria-pressed="true"] { background: var(--hot-soft); border-color: var(--hot); color: var(--hot) }
.vote[aria-pressed="true"] .ico svg { fill: currentColor }
.stack { display: flex; align-items: center; min-width: 0 }
.stack .av { margin-left: -6px; border: 2px solid var(--surface); width: 24px; height: 24px }
.stack .av:first-child { margin-left: 0 }
.stack .more { font-size: 12px; color: var(--muted); margin-left: 6px }
.spacer { flex: 1 }
.link { background: none; border: 0; padding: 4px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px }
.link:hover { color: var(--ink) }
.link.sure { color: var(--hot); font-weight: 600 }

.empty { border: 1.5px dashed var(--accent); background: var(--surface); padding: 48px 20px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px }
.empty h2 { font: 600 20px var(--display); color: var(--ink); margin: 0 }
.empty p { margin: 0; max-width: 46ch }
.notice { background: var(--accent-soft); border-radius: var(--r); padding: 10px 14px; font-size: 14px }

.polls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; align-items: start }
.poll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0 }
.poll h3 { font: 600 18px/1.3 var(--display); margin: 0; overflow-wrap: anywhere; text-wrap: balance }
.poll-head { display: flex; flex-direction: column; gap: 6px }
.poll-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted) }
.pill { border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; background: var(--ok-soft); color: var(--ok) }
.pill.closed { background: var(--mat); color: var(--muted) }
.opts { display: flex; flex-direction: column; gap: 8px }
.opts.pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px }
.opt { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; background: var(--surface) }
.opt.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) }
.opt .thumb { aspect-ratio: 1 / 1 }
.opt-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; min-height: 44px }
.opt-row[disabled] { cursor: default }
.opt-row .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0; transition: width .25s ease }
.opt-row > * { position: relative; z-index: 1 }
.opt-row .fill { position: absolute }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex: none }
.opt.mine .radio { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%) }
.opt-t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500 }
.opt-n { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap }
.poll-foot { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted) }

dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px) }
dialog::backdrop { background: rgba(10,12,18,.6) }
.dlg { display: flex; flex-direction: column; gap: 14px; padding: 20px }
.dlg h2 { font: 600 20px var(--display); margin: 0 }
.field { display: flex; flex-direction: column; gap: 5px }
.field label, .lbl { font-size: 13px; font-weight: 600 }
.field input[type=text], .field select, .field textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0 }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 22px 14px; text-align: center; color: var(--muted); background: var(--bg) }
.drop.over { border-color: var(--accent); background: var(--accent-soft) }
.drop .hint { font-size: 12px; margin-top: 6px }
.files { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto }
.frow { display: flex; align-items: center; gap: 10px; min-width: 0 }
.frow .pv { width: 48px; height: 48px; border-radius: 6px; background: var(--mat); object-fit: cover; flex: none }
.frow input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 10px }
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px }
.dlg-foot .status { flex: 1; min-width: 120px; font-size: 13px; color: var(--muted) }
.err { color: var(--hot); font-size: 13px }
.orow { display: flex; align-items: center; gap: 8px; min-width: 0 }
.orow input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 10px }
.orow .pv { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--mat) }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; max-height: 176px; overflow: auto; padding: 3px }
.pk { position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; background: var(--mat); box-shadow: 0 0 0 1px var(--line); overflow: hidden; min-width: 0 }
.pk img, .pk video { width: 100%; height: 100%; object-fit: cover; display: block }
.pk .missing { font-size: 10px; padding: 2px }
.pk[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent) }
.pk[aria-pressed="true"]::after { content: "✓"; position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 12px/18px var(--body); text-align: center }
.hint2 { font-size: 12px; color: var(--muted) }

#viewer { width: min(1100px, calc(100vw - 24px)); }
.vw { display: flex; flex-direction: column; max-height: calc(100vh - 34px) }
.vw-media { background: var(--mat); display: grid; place-items: center; min-height: 200px; flex: 1; overflow: hidden }
.vw-media img, .vw-media video { max-width: 100%; max-height: 70vh; display: block; object-fit: contain }
.vw-info { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px }
.vw-info .txt { flex: 1; min-width: 160px }
.vw-info .t { font: 600 17px var(--display); overflow-wrap: anywhere }

.fgroup { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px }
.fgroup h2 { font: 600 18px var(--display); margin: 0 }
.fgroup h2 .n { font: 500 13px var(--body); color: var(--muted); margin-left: 8px; font-variant-numeric: tabular-nums }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px }
.folders { padding-top: 10px }
.folder { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--r) var(--r) var(--r); box-shadow: var(--shadow); padding: 10px 10px 14px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.folder::before { content: ""; position: absolute; left: -1px; top: -10px; width: 76px; height: 10px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0 }
.folder:hover, .folder:hover::before { border-color: var(--accent) }
.fprev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; aspect-ratio: 3 / 1; background: var(--mat); border-radius: 6px; overflow: hidden; margin-bottom: 8px }
.fprev .fp { min-width: 0; overflow: hidden }
.fprev img, .fprev video { width: 100%; height: 100%; object-fit: cover; display: block }
.fprev .none { grid-column: 1 / -1; display: grid; place-items: center; color: var(--muted); font-size: 13px }
.fname { font: 600 17px/1.3 var(--display); overflow-wrap: anywhere; padding: 0 4px }
.folder .spec { padding: 0 4px }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 13px var(--mono) }
.crumb .cur { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere }
.vw-media { background: var(--bg) radial-gradient(circle, var(--dot) 1px, transparent 1.4px) 0 0 / 22px 22px }
.crumb .sep { color: var(--muted) }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100vw - 32px); z-index: 50 }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 14px } .seg { display: none } .ab-foot { flex-wrap: wrap } .crumb .cur { font-size: 22px } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
