:root { color-scheme: light; }
html, body { margin: 0; }
/* Layout: full-bleed 3D stage, control dock floating at the bottom like a product-config bar */
:root {
  --bg: #E9EBF1; --bg2: #FFFFFF; --fg: #12141C; --muted: #5A6078; --line: #D3D7E2; --dock: rgba(255,255,255,.88); --sel: #12141C; --selfg: #FFFFFF; --star: #C98500; --tint: #F3F5FA; --warn: #B3261E; --panel-w: 0px;
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif; --f-body: "Inter", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #101219; --bg2: #1C1F2A; --fg: #EEF0F6; --muted: #9AA0B8; --line: #2C3040; --dock: rgba(22,24,33,.86); --sel: #EEF0F6; --selfg: #101219; --star: #F2B84B; --tint: #242837; --warn: #FF8F85; color-scheme: dark } }
:root[data-theme="dark"] { --bg: #101219; --bg2: #1C1F2A; --fg: #EEF0F6; --muted: #9AA0B8; --line: #2C3040; --dock: rgba(22,24,33,.86); --sel: #EEF0F6; --selfg: #101219; --star: #F2B84B; --tint: #242837; --warn: #FF8F85; color-scheme: dark }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: radial-gradient(ellipse at 50% 40%, var(--bg2), var(--bg) 70%); color: var(--fg); font-family: var(--f-body); overflow: hidden; }
#stage { position: fixed; inset: 0; touch-action: none; }
#stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#stage canvas:active { cursor: grabbing; }
header { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 0; right: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
header h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.01em; text-wrap: balance; }
header p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); text-align: right; max-width: 220px; }
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); width: min(980px, calc(100% - 32px)); background: var(--dock); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.lbl { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-right: 4px; }
button { font: 600 13px var(--f-body); color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; min-height: 36px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
button:hover:not(:disabled) { border-color: var(--fg); }
button:disabled { cursor: not-allowed; }
button[aria-pressed="true"] { background: var(--sel); color: var(--selfg); border-color: var(--sel); }
button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #0003; }
select { font: 600 13px var(--f-body); color: var(--fg); background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; min-height: 36px; max-width: 260px; }
#load { position: fixed; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--muted); pointer-events: none; }
@media (max-width: 900px) {
  .hint { display: none }
  .dock { left: 50%; width: calc(100% - 16px - var(--panel-w)); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); padding: 8px 10px; gap: 6px; border-radius: 16px; flex-direction: column; align-items: stretch; }
  .grp { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 1px; mask-image: linear-gradient(to right, #000 88%, transparent); -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); }
  .grp::-webkit-scrollbar { display: none }
  .grp > * { flex: none; }
  .lbl { min-width: 46px; }
  button { padding: 6px 11px; min-height: 34px; font-size: 12px; white-space: nowrap; }
  select { flex: 1 1 auto; max-width: none; min-height: 34px; font-size: 13px; }
  header h1 { font-size: 19px; }
  header p { font-size: 12px; }
}
@media (max-width: 900px) and (max-height: 760px) { #views { display: none } }

/* ---------- Yorum, puan ve not paneli ---------- */
#stage { inset: 0 var(--panel-w) 0 0; }
header { right: var(--panel-w); }
.dock { left: calc(50% - var(--panel-w) / 2); width: min(980px, calc(100% - var(--panel-w) - 32px)); }
body.fb-open { --panel-w: 380px; }
.hright { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hright .hint { margin: 0; }
#fbOpen { pointer-events: auto; background: var(--dock); backdrop-filter: blur(14px); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sel); color: var(--selfg); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.fb { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: 380px; background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); transform: translateX(100%); visibility: hidden; transition: transform .26s ease, visibility 0s linear .26s; }
body.fb-open .fb { transform: none; visibility: visible; transition: transform .26s ease; }
.fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 10px; }
.fb-head h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; text-wrap: balance; }
.fb-head h2:focus { outline: none; }
.fb-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.fb button.icon { width: 36px; padding: 0; justify-content: center; font-size: 20px; line-height: 1; flex: none; }
.fb-tabs { display: flex; gap: 6px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.fb-tabs button { flex: 1; justify-content: center; }
.fb-tabs button[aria-selected="true"] { background: var(--sel); color: var(--selfg); border-color: var(--sel); }
.fb-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.fb-body section { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; }
.sum .big { font-family: var(--f-display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum .meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; white-space: nowrap; color: var(--line); }
.stars i { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--star); font-style: normal; }
.dist { grid-column: 1 / -1; display: grid; gap: 4px; }
.dist div { display: grid; grid-template-columns: 14px 1fr 22px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dist .bar { height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.dist .bar b { display: block; height: 100%; background: var(--star); border-radius: 3px; }
.mine { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.mine .lbl { margin: 0; flex: 1 0 100%; }
.rs-group { display: inline-flex; }
.fb button.rs { border: 0; border-radius: 8px; padding: 0 3px; min-height: 40px; min-width: 36px; justify-content: center; font-size: 28px; line-height: 1; color: var(--line); background: none; }
.fb button.rs.on { color: var(--star); }
.fb button.rs:hover:not(:disabled) { color: var(--star); border-color: transparent; }
.fb button.rs:disabled { cursor: default; }
#myVal { font-size: 12px; color: var(--muted); }
#fbForm { display: flex; flex-direction: column; gap: 8px; }
.seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; min-height: 32px; padding: 4px 14px; }
.seg button[aria-pressed="true"] { background: var(--sel); color: var(--selfg); }
#fbForm textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 76px; max-height: 240px; font: 400 16px/1.4 var(--f-body); color: var(--fg); background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
#fbForm textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.chk { display: flex; align-items: flex-start; gap: 8px; min-width: 0; cursor: pointer; }
.chk input { margin: 2px 0 0; flex: none; }
.chk span { min-width: 0; overflow-wrap: anywhere; }
#fbCount { font-variant-numeric: tabular-nums; flex: none; }
#fbMsg { min-height: 16px; min-width: 0; flex: 1; }
#fbMsg.err { color: var(--warn); }
.fb button.primary { background: var(--sel); color: var(--selfg); border-color: var(--sel); flex: none; }
.fb button.primary:disabled { opacity: .5; }
.ro { margin: 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.filters button[aria-pressed="true"] { background: var(--sel); color: var(--selfg); border-color: var(--sel); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; }
.who b { font-weight: 700; overflow-wrap: anywhere; }
.who time, .who .rated { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.who .rated { color: var(--star); font-weight: 700; }
.pill { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.pill.not { background: var(--sel); color: var(--selfg); border-color: var(--sel); }
.txt { margin: 4px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sub2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.sub2 span { min-width: 0; overflow-wrap: anywhere; }
.fb button.del { border: 0; min-height: 28px; padding: 2px 8px; font-size: 12px; color: var(--muted); flex: none; }
.fb button.del:hover:not(:disabled) { color: var(--warn); }
.fb button.del.ask { color: var(--warn); }
.empty { margin: 0; padding: 18px 0; font-size: 13px; color: var(--muted); }
.grp-h { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.all-list { display: flex; flex-direction: column; gap: 6px; }
.fb button.row { width: 100%; border-radius: 12px; padding: 9px 12px; justify-content: space-between; text-align: left; gap: 12px; font-weight: 600; }
.fb button.row[aria-current="true"] { border-color: var(--fg); }
.row .nm { min-width: 0; overflow-wrap: anywhere; }
.row .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; font-size: 11px; font-weight: 400; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 899px) {
  body.fb-open { --panel-w: 0px; }
  .fb { top: auto; left: 0; width: auto; height: min(78%, 620px); border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding-left: env(safe-area-inset-left, 0px); transform: translateY(100%); box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
  body.fb-open .fb { transform: none; }
  .fb-head, .fb-tabs, .fb-body { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .fb, body.fb-open .fb { transition: none; } }

.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; flex: none; }
.list li.none { display: block; border: 0; padding: 0; }
.who-in { display: flex; flex-direction: column; gap: 6px; }
.who-in .lbl { margin: 0; }
.who-in input, .inline-form input { width: 100%; box-sizing: border-box; min-width: 0; font: 400 16px/1.3 var(--f-body); color: var(--fg); background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.who-in input:focus-visible, .inline-form input:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.msg-err { margin: 0; min-height: 16px; font-size: 12px; color: var(--warn); }
.adm { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.adm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.adm button { font-size: 12px; min-height: 32px; padding: 5px 12px; color: var(--muted); }

/* ---------- Tasarım oyu ---------- */
.fb-tabs button { padding-inline: 8px; font-size: 12px; }
#oy { display: flex; flex-direction: column; gap: 10px; }
.oy-win { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.oy-win b { font-family: var(--f-display); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.oy-sub { font-size: 12px; color: var(--muted); }
.vt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.vt[data-mine="true"] { border-color: var(--fg); }
.vt-top { display: flex; align-items: center; gap: 10px; }
.vt .sw { width: 22px; height: 22px; flex: none; }
.vt-name { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.vt-n { font-family: var(--f-display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.vt .bar { display: block; height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.vt .bar b { display: block; height: 100%; background: var(--star); border-radius: 3px; }
.vt-who { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.vt button { align-self: flex-start; min-height: 32px; padding: 5px 12px; font-size: 12px; }
.oy-msg { margin: 0; min-height: 16px; font-size: 12px; color: var(--muted); }
.oy-msg.err { color: var(--warn); }
