/* =========================================================
   BANG! F4 TABLETOP — karanlık fantastik masa üstü arayüzü
   Kömür zemin · soluk altın · koyu bordo · parşömen dokusu
   ========================================================= */

:root {
  --bg: #1a130e;
  --bg-2: #211810;
  --panel: #2b1e15;
  --panel-2: #33251a;
  --panel-3: #3d2d1f;
  --line: rgba(205, 189, 148, .16);
  --line-2: rgba(205, 189, 148, .34);
  --gold: #6f9a8a;
  --gold-2: #a3c7b8;
  --gold-3: #46675a;
  --burgundy: #6b221b;
  --burgundy-2: #8e2b22;
  --red: #c0392b;
  --green: #5fae5a;
  --blue: #6aa0b8;
  --purple: #a8372c;
  --parch: #e6d9b8;
  --parch-2: #c2b390;
  --ink: #e4d8bd;
  --muted: #a99a80;
  --dim: #75664f;

  --f-head: 'IM Fell English', Georgia, serif;
  --f-serif: 'IM Fell English', Georgia, serif;
  --f-body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;

  --r: 3px;
  --r-sm: 2px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .55);
  --topbar: 58px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .7 0 0 0 0 .5 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(107, 34, 27, .35), transparent 70%),
    radial-gradient(900px 500px at 100% 100%, rgba(111, 154, 138, .06), transparent 70%),
    var(--noise), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff1c8; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; letter-spacing: .02em; margin: 0 0 .4em; color: var(--parch); line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .92rem; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
kbd { font: 600 .75em var(--f-body); padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--panel-3); }
::selection { background: rgba(111, 154, 138, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a3033; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #574549; }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.block { display: block; }
.hidden { display: none !important; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: .8rem; }
.center { justify-content: center; }
.center-text { text-align: center; }
.row { display: flex; align-items: center; gap: .6rem; }
.row.tight { gap: .35rem; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; flex-wrap: wrap; }
.row2 { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.row2 > .field { flex: 1 1 140px; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.eyebrow { font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--gold); margin: 0 0 .5rem; }
.lede { font-family: var(--f-serif); font-size: 1.2rem; color: var(--parch-2); max-width: 60ch; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }

/* ---------- Çerçeveli panel ---------- */
.frame {
  position: relative;
  background: linear-gradient(180deg, rgba(43, 35, 38, .92), rgba(27, 22, 24, .94)), var(--noise);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .05), 0 8px 24px rgba(0, 0, 0, .35);
}
.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border: 1px solid var(--gold-3);
  background: var(--bg);
  transform: rotate(45deg);
  top: -4px;
  pointer-events: none;
}
.frame::before { left: 14px; }
.frame::after { right: 14px; }
.frame.inner { background: rgba(0, 0, 0, .18); box-shadow: none; padding: .9rem; }
.frame.inner::before, .frame.inner::after { display: none; }
.panel-h {
  display: flex; align-items: center; gap: .5rem;
  font: 700 .8rem/1 var(--f-head); letter-spacing: .01em; color: var(--gold);
  margin: 0 0 .8rem; padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, var(--gold-3) 50%, transparent) bottom / 100% 1px no-repeat;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-title h2 { display: flex; align-items: center; gap: .5rem; margin: 0; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 36px; padding: .45rem .95rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #342a2d, #251e20);
  color: var(--parch);
  font: 600 .82rem/1 var(--f-body);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .12s var(--ease), border-color .15s, background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--gold); color: #fff3d2; box-shadow: 0 0 0 1px rgba(111, 154, 138, .15), 0 4px 14px rgba(0, 0, 0, .4); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, #e3c177, #a8823c); border-color: #f1d796; color: #1d1408; text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
.btn.gold:hover:not(:disabled) { background: linear-gradient(180deg, #f0d28f, #b98f45); color: #120b03; }
.btn.red { background: linear-gradient(180deg, #a52a3a, #6e1a26); border-color: #c84a5a; color: #ffe8e8; }
.btn.green { background: linear-gradient(180deg, #4f8f4b, #2f5f2d); border-color: #79c074; color: #effbe9; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { color: #ff9d9d; }
.btn.danger:hover { border-color: var(--red); }
.btn.small { min-height: 30px; padding: .3rem .7rem; font-size: .78rem; }
.btn.tiny { min-height: 24px; padding: .15rem .5rem; font-size: .72rem; border-radius: 5px; }
.btn.big { min-height: 44px; padding: .6rem 1.3rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.glow { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 18px rgba(240, 201, 106, .7); } }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--parch-2);
  transition: border-color .15s, color .15s, background .15s;
  flex: none;
}
.icon-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.icon-btn.gold { background: linear-gradient(180deg, #e3c177, #a8823c); color: #1d1408; border-color: #f1d796; }
.link-btn { background: none; border: 0; padding: .2rem; color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; border-radius: 4px; font-size: .78rem; }
.link-btn:hover { color: var(--gold-2); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: rgba(0, 0, 0, .3); gap: 2px; }
.seg.wrap { flex-wrap: wrap; border-radius: 12px; }
.seg button { border: 0; background: none; padding: .4rem .9rem; border-radius: 999px; color: var(--muted); font: 600 .78rem/1 var(--f-body); text-transform: capitalize; }
.seg.small button { padding: .3rem .65rem; font-size: .7rem; letter-spacing: .04em; }
.seg button:hover { color: var(--parch); }
.seg button.on { background: linear-gradient(180deg, #3d3134, #2a2124); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button.on.red { color: #ff9f9f; box-shadow: inset 0 0 0 1px rgba(192, 57, 43, .6); }
.seg button.on.green { color: #a7e6a2; box-shadow: inset 0 0 0 1px rgba(95, 174, 90, .6); }

/* ---------- Etiketler ---------- */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font: 600 .86rem/1.2 var(--f-body); letter-spacing: .01em; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-prep { color: var(--gold); }
.status-active { color: #7fd17a; }
.status-active i { box-shadow: 0 0 8px #7fd17a; animation: blink 1.6s ease-in-out infinite; }
.status-paused { color: #e0905b; }
@keyframes blink { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .45rem; border-radius: 4px; font: 600 .86rem/1.3 var(--f-body); letter-spacing: .06em; border: 1px solid var(--line); color: var(--parch-2); background: rgba(0, 0, 0, .25); white-space: nowrap; }
.tag.gold { color: var(--gold-2); border-color: var(--gold-3); }
.tag.red { color: #ff9d9d; border-color: rgba(192, 57, 43, .55); }
.tag.dm { color: #e0968a; border-color: rgba(168, 55, 44, .5); }
.badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .66rem; padding: .1rem .4rem; border-radius: 4px; }
.badge.dm { color: #e0968a; background: rgba(168, 55, 44, .15); }
.badge.sel { color: #9fd3e6; background: rgba(106, 160, 184, .15); }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .45rem; border-radius: 999px; font-size: .68rem; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--parch-2); }
.chip button { background: none; border: 0; padding: 0; color: inherit; display: inline-flex; }
.chip.cond { color: #ffc69a; border-color: rgba(224, 144, 91, .45); }
.chip.cond-blessed, .chip.cond-hasted, .chip.cond-stable, .chip.cond-concentrating { color: #a6e3a1; border-color: rgba(95, 174, 90, .45); }
.chip.cond-dead, .chip.cond-unconscious { color: #ff9d9d; border-color: rgba(192, 57, 43, .55); }
.chip.ok { color: #a6e3a1; border-color: rgba(95, 174, 90, .5); }
.chip.bad { color: #ff9d9d; border-color: rgba(192, 57, 43, .5); }
.chip.wait { color: var(--muted); border-style: dashed; }
.role-tag { display: inline-flex; align-items: center; gap: .3rem; font: 600 .86rem/1.3 var(--f-body); letter-spacing: .01em; color: #e0968a; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6fd36a; box-shadow: 0 0 6px #6fd36a; vertical-align: 1px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > span { font: 600 .86rem/1.2 var(--f-body); letter-spacing: .01em; color: var(--muted); }
.field > span small { text-transform: none; letter-spacing: 0; font-weight: 400; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea) {
  width: 100%;
  min-height: 36px;
  padding: .45rem .65rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(111, 154, 138, .22);
  background: rgba(8, 6, 7, .55);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
:where(input, select, textarea):focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(111, 154, 138, .15); }
:where(input, select, textarea):disabled { opacity: .65; }
:where(select) { appearance: none; padding-right: 1.8rem; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select option, select optgroup { background: #1b1618; color: var(--ink); }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 15px; height: 15px; }
.tick { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--parch-2); font-size: .85rem; }
fieldset.sub { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .8rem .8rem; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
fieldset.sub legend { padding: 0 .4rem; font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--gold); }
.secret-field > span { color: #e0968a; }
.secret-field textarea { border-color: rgba(168, 55, 44, .35); background: rgba(64, 22, 17, .25); }
.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #3a3134; border: 1px solid var(--line); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--parch-2); transition: transform .2s var(--pop); }
.switch input:checked + i { background: var(--gold-3); }
.switch input:checked + i::after { transform: translateX(17px); background: #fff1c8; }
.swatches { display: flex; flex-wrap: wrap; gap: .35rem; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 2px solid rgba(0, 0, 0, .5); box-shadow: 0 0 0 1px var(--line); transition: transform .15s; }
.swatch input:checked + i { box-shadow: 0 0 0 2px var(--gold-2); transform: scale(1.12); }
.swatch input:focus-visible + i { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------- Avatar ---------- */
.avatar {
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--av) 70%, #fff 30%), var(--av) 55%, color-mix(in srgb, var(--av) 60%, #000 40%));
  color: #fff8e6;
  font-family: var(--f-head); font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 2px #120e0f, 0 0 0 3px var(--gold-3), 0 4px 12px rgba(0, 0, 0, .5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.online::after, .avatar.offline::after { content: ''; position: absolute; right: 0; bottom: 2%; width: 26%; height: 26%; max-width: 13px; max-height: 13px; border-radius: 50%; border: 2px solid #120e0f; }
.avatar.online::after { background: #6fd36a; box-shadow: 0 0 6px #6fd36a; }
.avatar.offline::after { background: #5a5150; }

/* ---------- Can barı ---------- */
.hpbar { position: relative; height: 18px; border-radius: 4px; background: #1a0d10; border: 1px solid rgba(0, 0, 0, .6); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); margin-top: .35rem; min-width: 80px; }
.hpbar.compact { height: 6px; margin-top: .3rem; }
.hp-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #78c872, #3d8a38); transition: width .5s var(--ease); }
.hpbar.low .hp-fill { background: linear-gradient(180deg, #e06a5a, #8e2a22); }
.hpbar.down .hp-fill { background: #333; }
.hp-temp { position: absolute; top: 0; bottom: 0; background: linear-gradient(180deg, #8fc9e6, #3f7f9e); }
.hp-text { position: relative; display: block; text-align: center; font: 700 .7rem/16px var(--f-body); color: #fff; text-shadow: 0 1px 2px #000; }
.hp-text small { font-weight: 400; opacity: .8; }
.hp-text em { color: #bfe7ff; font-style: normal; }
.ac-badge { display: inline-grid; grid-template-areas: 'a'; place-items: center; width: 34px; height: 38px; color: var(--gold-3); flex: none; }
.ac-badge .ic { grid-area: a; width: 34px; height: 38px; stroke-width: 1.2; fill: rgba(0, 0, 0, .35); }
.ac-badge b { grid-area: a; font: 700 .85rem/1 var(--f-head); color: var(--parch); }
.ac-mini { display: inline-flex; align-items: center; gap: .15rem; font: 700 .72rem/1 var(--f-body); color: var(--parch-2); }
.ac-mini .ic { width: 12px; height: 12px; color: var(--gold-3); }

/* ---------- Üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1rem;
  background: linear-gradient(180deg, rgba(20, 16, 18, .97), rgba(16, 13, 14, .95));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-3), transparent); }
.tb-brand { display: flex; align-items: center; gap: .5rem; font: 500 .95rem/1 var(--f-head); color: var(--parch); white-space: nowrap; }
.tb-brand .ic { width: 26px; height: 26px; color: var(--gold); }
.tb-brand b { color: var(--gold-2); font-weight: 700; }
.tb-camp { display: flex; align-items: center; gap: .6rem; min-width: 0; padding-left: 1rem; border-left: 1px solid var(--line); }
.tb-camp-name { font: 700 1rem/1.1 var(--f-head); color: var(--parch); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }
.tb-nav { display: flex; gap: .25rem; margin: 0 auto; }
.tb-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 8px; color: var(--muted); font: 600 .86rem/1 var(--f-body); letter-spacing: .06em; position: relative; }
.tb-nav a:hover { color: var(--parch); background: rgba(255, 255, 255, .03); }
.tb-nav a.on { color: var(--gold-2); background: rgba(111, 154, 138, .08); }
.tb-nav a.on::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -10px; height: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); border-radius: 2px; }
.bar-end { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.tb-nav + .bar-end { margin-left: 0; }
.conn { display: inline-flex; align-items: center; gap: .4rem; font: 600 .86rem/1 var(--f-body); letter-spacing: .08em; color: var(--muted); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #e0a050; }
.conn.on i { background: #6fd36a; box-shadow: 0 0 8px #6fd36a; }
.conn.off i { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s infinite; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .2rem .4rem .2rem .2rem; border-radius: 999px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: rgba(255, 255, 255, .04); }
.um-name { font-weight: 600; font-size: .85rem; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: .4rem; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: grid; gap: 2px; z-index: 60; }
.um-pop a, .um-pop button { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 6px; border: 0; background: none; color: var(--parch); text-align: left; font-size: .85rem; }
.um-pop a:hover, .um-pop button:hover { background: rgba(111, 154, 138, .1); color: var(--gold-2); }

.screen { min-height: calc(100vh - var(--topbar)); }
.app.bare .screen { min-height: 100vh; }

/* ---------- Yükleniyor ---------- */
.loading { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--muted); font-family: var(--f-serif); font-size: 1.2rem; }
.spin-d20 .ic { width: 64px; height: 64px; color: var(--gold); animation: spin 2.2s linear infinite; filter: drop-shadow(0 0 12px rgba(111, 154, 138, .5)); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bildirimler ---------- */
.toasts { position: fixed; left: 1rem; bottom: 1rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; pointer-events: none; max-width: min(420px, calc(100vw - 2rem)); }
.toast {
  pointer-events: auto;
  padding: .7rem 1rem; border-radius: var(--r);
  background: linear-gradient(180deg, #2e2528, #1f191b); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); color: var(--parch); font-size: .85rem;
  animation: toast-in .35s var(--pop);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.toast b { color: var(--gold-2); }
.toast.ok { border-color: rgba(95, 174, 90, .6); }
.toast.error { border-color: rgba(192, 57, 43, .7); background: linear-gradient(180deg, #3a1d20, #241315); }
.toast.event { border-color: var(--burgundy-2); background: linear-gradient(180deg, #3b1820, #22121a); font-family: var(--f-serif); font-size: 1.02rem; }
.toast.event b { font-family: var(--f-head); font-size: .9rem; display: block; width: 100%; }
.toast.announce, .toast.turn, .toast.check { border-color: var(--gold); box-shadow: 0 0 24px rgba(111, 154, 138, .25), var(--shadow); }
.toast.whisper { border-color: rgba(168, 55, 44, .6); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* =========================================================
   GİRİŞ
   ========================================================= */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; position: relative; overflow: hidden;
  background: radial-gradient(800px 500px at 50% 35%, rgba(155, 35, 53, .28), transparent 70%), radial-gradient(500px 300px at 50% 110%, rgba(232, 140, 50, .18), transparent 70%); }
.embers i { position: absolute; bottom: -10px; left: calc(var(--i) * 5.6%); width: 4px; height: 4px; border-radius: 50%; background: #ffb35c; box-shadow: 0 0 8px #ff8a2a, 0 0 16px #ff6a00;
  animation: ember calc(6s + var(--i) * .37s) linear infinite; animation-delay: calc(var(--i) * -.7s); opacity: 0; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(calc(sin(var(--i)) * 80px), -105vh); opacity: 0; } }
.auth-card { width: min(440px, 100%); padding: 2.2rem 2rem 1.6rem; text-align: center; display: flex; flex-direction: column; gap: 1rem; align-items: stretch; z-index: 1; }
.crest { width: 92px; height: 92px; margin: -4.2rem auto 0; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .7)) drop-shadow(0 0 20px rgba(111, 154, 138, .25)); }
.auth-card h1 { margin: 0; font-size: 2rem; font-weight: 900; }
.auth-card h1 span { color: var(--gold-2); display: block; font-size: .7em; letter-spacing: .3em; font-weight: 700; }
.tagline { font-family: var(--f-serif); font-style: italic; font-size: 1.15rem; color: var(--parch-2); margin: -.4rem 0 .2rem; }
.auth-card .seg { align-self: center; }
.auth-card form { text-align: left; }
.conn-note { display: flex; gap: .6rem; text-align: left; font-size: .8rem; color: var(--muted); padding: .7rem .8rem; border-radius: var(--r-sm); border: 1px dashed var(--line); }
.conn-note .ic { margin-top: .15rem; color: var(--gold); }
.conn-note p { margin: 0; }
.back-link { font-size: .8rem; color: var(--muted); }

/* =========================================================
   KAMPANYALAR
   ========================================================= */
.home { max-width: 1240px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.home-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .2rem; }
.join-box { min-width: min(360px, 100%); }
.join-box h3 { display: flex; align-items: center; gap: .5rem; }
.join-box input { font: 700 1.1rem/1 var(--f-head); letter-spacing: .25em; text-align: center; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.6rem; align-items: start; }
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.camp-card { display: flex; flex-direction: column; gap: .5rem; color: var(--ink); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; overflow: hidden; }
.camp-card:hover { transform: translateY(-3px); border-color: var(--gold-3); box-shadow: 0 16px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(111, 154, 138, .2); color: var(--ink); }
.cc-banner { display: flex; justify-content: space-between; align-items: center; margin: -1.1rem -1.1rem .4rem; padding: .7rem 1rem; background: linear-gradient(135deg, rgba(107, 34, 27, .7), rgba(30, 20, 24, .4)), var(--noise); border-bottom: 1px solid var(--line); }
.cc-role { display: inline-flex; align-items: center; gap: .35rem; font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; }
.cc-role.dm { color: var(--gold-2); }
.cc-role.player { color: #9fd3e6; }
.camp-card h3 { font-size: 1.15rem; margin: 0; }
.cc-meta { display: grid; gap: .25rem; margin: .2rem 0 0; font-size: .8rem; }
.cc-meta div { display: flex; gap: .5rem; }
.cc-meta dt { color: var(--muted); min-width: 44px; }
.cc-meta dd { margin: 0; }
.cc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: .5rem; border-top: 1px solid var(--line); }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--muted); }
.empty-state > .ic { width: 44px; height: 44px; color: var(--gold-3); margin-bottom: .6rem; }
.empty-state.center { max-width: 520px; margin: 4rem auto; }
.create-box h3, .profile-box h3 { display: flex; align-items: center; gap: .5rem; }
.create-box { display: flex; flex-direction: column; gap: .7rem; }
.tpl-pick { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.tpl-pick legend { font: 600 .86rem/1.2 var(--f-body); letter-spacing: .01em; color: var(--muted); margin-bottom: .3rem; }
.tpl { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.tpl:has(input:checked) { border-color: var(--gold); background: rgba(111, 154, 138, .07); }
.tpl input { margin-top: .2rem; }
.tpl span { display: grid; gap: .1rem; }
.tpl small { color: var(--muted); font-size: .76rem; }
.profile-box { display: flex; flex-direction: column; gap: .8rem; }
.profile-row { display: flex; align-items: flex-end; gap: .8rem; }

/* =========================================================
   MODAL + KARAKTER OLUŞTURMA
   ========================================================= */
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(5, 3, 4, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; border-radius: 14px; background: linear-gradient(180deg, #2a2225, #1a1517), var(--noise); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .6); animation: modal-in .3s var(--pop); }
.modal.wide { width: min(940px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(107, 34, 27, .35), transparent); border-radius: 14px 14px 0 0; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 1.2rem; overflow: auto; }
.cc-form { display: flex; flex-direction: column; gap: .9rem; }
.cc-top { display: flex; gap: 1.2rem; align-items: flex-start; }
.cc-portrait { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.cc-h { margin: .6rem 0 0; font-size: .8rem; letter-spacing: .01em; color: var(--gold); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .45rem; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, .2); transition: border-color .15s, background .15s, transform .15s; height: 100%; }
.pick b { font-family: var(--f-head); font-size: .88rem; color: var(--parch); }
.pick small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.pick:hover span { border-color: var(--gold-3); }
.pick input:checked + span { border-color: var(--gold); background: linear-gradient(180deg, rgba(111, 154, 138, .14), rgba(111, 154, 138, .04)); box-shadow: inset 0 0 0 1px rgba(111, 154, 138, .3); }
.pick input:focus-visible + span { outline: 2px solid var(--gold-2); }
.cc-abilities { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.cc-ab { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .3rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, .2); text-align: center; }
.cc-ab .abbr { font: 700 .8rem/1 var(--f-head); color: var(--gold); letter-spacing: .1em; }
.cc-ab input { text-align: center; font: 700 1.2rem/1 var(--f-head); max-width: 70px; }
.cc-ab-final { font-size: .72rem; color: var(--muted); }
.cc-ab-final b { color: var(--parch); }
.skill-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .8rem; }

/* =========================================================
   LOBİ
   ========================================================= */
.lobby { max-width: 1400px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; display: flex; flex-direction: column; gap: 1.4rem; }
.lobby-hero { display: flex; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; padding: 1.6rem;
  background: linear-gradient(110deg, rgba(107, 34, 27, .55), rgba(27, 22, 24, .9) 55%), var(--noise), var(--panel); }
.lh-main { flex: 1 1 420px; display: flex; flex-direction: column; gap: .5rem; }
.lh-main h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin: 0; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.lh-actions { margin-top: .8rem; }
.invite { display: flex; flex-direction: column; align-items: center; gap: .6rem; min-width: 260px; justify-content: center; text-align: center; }
.invite .eyebrow { margin: 0; }
.invite-code { display: flex; gap: .3rem; background: none; border: 0; padding: 0; }
.invite-code span { display: grid; place-items: center; width: 38px; height: 48px; border-radius: 6px; font: 700 1.5rem/1 var(--f-head); color: var(--gold-2); background: linear-gradient(180deg, #2a2023, #161113); border: 1px solid var(--gold-3); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .4); }
.invite-code:hover span { border-color: var(--gold-2); }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.4rem; align-items: start; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.hero-card { display: flex; gap: 1rem; align-items: flex-start; transition: border-color .2s, box-shadow .2s; }
.hero-card.me { border-color: var(--line-2); }
.hero-card.ready { box-shadow: inset 0 0 0 1px rgba(95, 174, 90, .35), 0 8px 24px rgba(0, 0, 0, .35); }
.hero-card.dm { background: linear-gradient(135deg, rgba(168, 55, 44, .16), rgba(27, 22, 24, .9) 60%), var(--panel); }
.hero-card.empty { align-items: center; color: var(--muted); border-style: dashed; }
.hc-portrait { position: relative; }
.ready-badge { position: absolute; left: -4px; bottom: -2px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #3f8a3a; color: #fff; border: 2px solid #120e0f; }
.ready-badge .ic { width: 14px; height: 14px; }
.hc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.hc-body h3 { margin: 0; font-size: 1.05rem; }
.hc-class { font-family: var(--f-serif); font-size: 1rem; color: var(--parch-2); margin: 0; }
.hc-stats { display: flex; align-items: center; gap: .6rem; }
.hc-stats .hpbar { flex: 1; margin-top: 0; }
.hc-dm { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: .5rem; }
.perm-row { display: flex; gap: .3rem; flex-wrap: wrap; }
.perm { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .5rem; border-radius: 999px; font-size: .7rem; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--muted); }
.perm .ic { width: 13px; height: 13px; }
.perm.on { color: #a6e3a1; border-color: rgba(95, 174, 90, .45); }
.perm.off { color: #ff9d9d; border-color: rgba(192, 57, 43, .45); text-decoration: line-through; }
.my-heroes { margin-top: 1.2rem; }
.mini-list { display: grid; gap: .5rem; }
.mini-hero { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.mini-hero small { display: block; }
.mini-hero.active { border-color: var(--gold-3); background: rgba(111, 154, 138, .06); }
.lobby-feed { position: sticky; top: calc(var(--topbar) + 1rem); max-height: calc(100vh - var(--topbar) - 2rem); display: flex; flex-direction: column; }
.lobby-feed .feed-wrap { min-height: 0; flex: 1; }

/* =========================================================
   AKIŞ (CHRONICLE)
   ========================================================= */
.feed-wrap { display: flex; flex-direction: column; gap: .5rem; min-height: 0; }
.feed { list-style: none; margin: 0; padding: 0 .2rem 0 0; display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; min-height: 0; flex: 1; scroll-behavior: smooth; }
.feed .empty { color: var(--muted); font-family: var(--f-serif); font-style: italic; padding: 1rem; text-align: center; }
.fe { position: relative; animation: fe-in .35s var(--ease); }
@keyframes fe-in { from { opacity: 0; transform: translateY(6px); } }
.fe time { position: absolute; right: .45rem; top: .45rem; pointer-events: none; font-size: .62rem; color: var(--dim); z-index: 1; }
.bubble { position: relative; padding: .5rem .7rem; border-radius: 8px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .04); }
.bubble .who { display: flex; align-items: center; gap: .3rem; font: 700 .72rem/1.3 var(--f-body); color: var(--gold); letter-spacing: .04em; }
.bubble p { margin: .15rem 0 0; color: var(--ink); word-wrap: break-word; }
.bubble .del { position: absolute; right: .3rem; bottom: .2rem; opacity: 0; }
.bubble:hover .del { opacity: 1; }
.fe-whisper .bubble { border-color: rgba(168, 55, 44, .35); background: rgba(64, 22, 17, .2); }
.fe-whisper .who { color: #e0968a; }
.fe-whisper p { font-style: italic; }
.ic-row { display: flex; gap: .55rem; align-items: flex-start; }
.ic-row .bubble { flex: 1; background: linear-gradient(180deg, rgba(234, 223, 196, .08), rgba(234, 223, 196, .03)); border-color: rgba(234, 223, 196, .1); }
.fe-ic .bubble p { font-family: var(--f-serif); font-size: 1.08rem; line-height: 1.35; color: var(--parch); }
.fe-ic.npc .who { color: #e7b0ff; }
.announce { display: flex; gap: .6rem; padding: .7rem .8rem; border-radius: 8px; background: linear-gradient(90deg, rgba(111, 154, 138, .16), rgba(111, 154, 138, .03)); border: 1px solid var(--gold-3); border-left: 3px solid var(--gold); }
.announce .ic { color: var(--gold-2); margin-top: .15rem; }
.announce p { margin: 0; font-family: var(--f-serif); font-size: 1.05rem; color: var(--parch); }
.event-card { display: flex; gap: .7rem; padding: .8rem; border-radius: 8px; background: linear-gradient(135deg, rgba(155, 35, 53, .35), rgba(40, 16, 22, .5)); border: 1px solid rgba(155, 35, 53, .6); box-shadow: 0 0 22px rgba(155, 35, 53, .15); }
.event-card > .ic { width: 26px; height: 26px; color: #ffb3a8; flex: none; }
.event-card h4 { margin: 0 0 .2rem; color: #ffd9c9; }
.event-card p { margin: 0; font-family: var(--f-serif); font-size: 1.05rem; color: var(--parch); }
.event-card.ev-weather { background: linear-gradient(135deg, rgba(80, 110, 130, .35), rgba(20, 28, 36, .5)); border-color: rgba(106, 160, 184, .5); }
.event-card.ev-merchant, .event-card.ev-revelation { background: linear-gradient(135deg, rgba(111, 154, 138, .25), rgba(40, 30, 16, .5)); border-color: var(--gold-3); }
.scene-card { padding: .9rem 1rem; border-radius: 8px; text-align: center; background: radial-gradient(circle at 50% 0, rgba(111, 154, 138, .15), transparent 70%), rgba(0, 0, 0, .25); border: 1px solid var(--line-2); }
.scene-card h4 { font-size: 1.05rem; margin: .1rem 0 .3rem; }
.scene-card p { font-family: var(--f-serif); font-style: italic; font-size: 1.02rem; color: var(--parch-2); margin: 0; }
.scene-card .eyebrow { margin: 0; }
.sys { display: flex; gap: .45rem; align-items: flex-start; padding: .25rem .5rem; color: var(--muted); font-size: .8rem; }
.sys p { margin: 0; }
.sys .ic { color: var(--gold-3); margin-top: .1rem; }
.sys.turn { color: var(--gold-2); font-weight: 600; border-top: 1px dashed var(--line); padding-top: .4rem; }
.fe-check .sys { color: var(--parch-2); }

.roll-card { position: relative; padding: .55rem .7rem .5rem; border-radius: 9px; background: linear-gradient(160deg, rgba(48, 38, 42, .9), rgba(24, 19, 21, .95)); border: 1px solid var(--line); border-left: 3px solid var(--accent, var(--gold)); }
.rc-head { display: flex; flex-direction: column; gap: .05rem; padding-right: 2.5rem; }
.rc-name { font: 700 .86rem/1.2 var(--f-body); letter-spacing: .01em; color: var(--accent, var(--gold)); }
.rc-type { font: 600 .9rem/1.25 var(--f-head); color: var(--parch); }
.rc-body { display: flex; align-items: center; gap: .7rem; margin: .35rem 0 .3rem; }
.rc-total { position: relative; display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 .4rem; border-radius: 50%; font: 900 1.45rem/1 var(--f-head); color: #fff4d6; background: radial-gradient(circle at 40% 30%, #4a3b30, #1d1513 70%); border: 2px solid var(--gold-3); box-shadow: inset 0 0 10px rgba(0, 0, 0, .6), 0 0 0 3px rgba(0, 0, 0, .4); }
.rc-total small { position: absolute; top: -4px; right: -6px; font-size: .7rem; color: var(--gold-2); }
.rc-detail { min-width: 0; }
.rc-terms { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; font-size: .82rem; color: var(--muted); }
.t-dice { display: inline-flex; align-items: center; gap: .15rem; }
.t-dice small, .t-mod small { font-size: .62rem; color: var(--dim); margin-left: .1rem; }
.t-dice .d { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 5px; background: #3a2c2f; border: 1px solid rgba(255, 255, 255, .08); font: 700 .78rem/1 var(--f-body); color: var(--parch); }
.t-dice .d.drop { opacity: .35; text-decoration: line-through; }
.t-dice .d.max { background: linear-gradient(180deg, #e3c177, #a8823c); color: #1d1408; }
.t-dice .d.min { background: #7b1f25; color: #ffd8d8; }
.t-mod { font-weight: 600; color: var(--parch-2); }
.rc-expr { font-size: .68rem; color: var(--dim); margin-top: .15rem; font-family: ui-monospace, monospace; }
.rc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.rc-foot .link-btn { margin-left: auto; }
.rc-out { font: 700 .86rem/1 var(--f-body); letter-spacing: .01em; padding: .25rem .5rem; border-radius: 4px; }
.rc-out.ok { color: #c2f2bd; background: rgba(63, 138, 58, .35); }
.rc-out.bad { color: #ffc2c2; background: rgba(155, 35, 53, .4); }
.rc-outcome { margin: .35rem 0 0; font-size: .8rem; color: var(--parch-2); font-style: italic; }
.roll-card.crit-s { border-color: var(--gold); box-shadow: 0 0 20px rgba(240, 201, 106, .3), inset 0 0 30px rgba(240, 201, 106, .07); }
.roll-card.crit-s .rc-total { border-color: var(--gold-2); color: #ffe7a6; box-shadow: 0 0 16px rgba(240, 201, 106, .6); }
.roll-card.crit-f { border-color: rgba(192, 57, 43, .7); box-shadow: 0 0 20px rgba(192, 57, 43, .25); }
.roll-card.crit-f .rc-total { border-color: var(--red); color: #ffbdbd; }
.roll-card.blind { opacity: .8; border-left-color: var(--purple); }
.roll-card.blind .rc-head { flex-direction: row; gap: .4rem; align-items: center; color: var(--muted); font-size: .82rem; }

/* ---------- Sohbet kutusu ---------- */
.composer { display: flex; flex-direction: column; gap: .4rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.composer-modes { display: flex; gap: .4rem; align-items: center; }
.composer-modes select { min-height: 30px; padding: .2rem 1.6rem .2rem .5rem; font-size: .78rem; width: auto; flex: 1; }
.whisper-to { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .8rem; }
.composer-row { display: flex; gap: .4rem; }
.composer-row input { border-radius: 999px !important; padding-left: .9rem !important; }

/* ---------- Atış seçenekleri ---------- */
.roll-opts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .55rem .7rem; border-radius: var(--r); border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.roll-opts select { width: auto; min-height: 30px; font-size: .78rem; padding: .2rem 1.7rem .2rem .55rem; }
.roll-opts .extra { width: 150px; min-height: 30px; font-size: .78rem; }
.roll-opts.compact { padding: .4rem .5rem; gap: .35rem; }

/* ---------- Kontrol istekleri ---------- */
.checks { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.check-card { padding: .7rem .8rem; border-radius: 9px; border: 1px solid var(--gold-3); background: linear-gradient(180deg, rgba(111, 154, 138, .14), rgba(111, 154, 138, .04)); }
.check-card h4 { margin: .2rem 0 .5rem; font-size: 1rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.check-card .btn { width: 100%; }
.cc-head { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--gold-2); }
.cc-head .link-btn { margin-left: auto; }
.cc-resp { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; }
.check-card.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 22px rgba(240, 201, 106, .35); border-color: var(--gold); } }

/* ---------- Zar tepsisi ---------- */
.dice-tray {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40;
  width: min(460px, calc(100% - 1.5rem));
  padding: 1rem; border-radius: 14px;
  background: linear-gradient(180deg, rgba(42, 34, 37, .98), rgba(24, 19, 21, .98)), var(--noise);
  border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column; gap: .7rem;
  animation: modal-in .25s var(--pop);
}
.dt-head { display: flex; justify-content: space-between; align-items: center; }
.dt-head h3 { display: flex; align-items: center; gap: .5rem; margin: 0; }
.dt-dice { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.dt-die { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, .25); padding: 5px; transition: transform .15s var(--pop), border-color .15s; }
.dt-die:hover { transform: translateY(-2px) rotate(-6deg); border-color: var(--gold); }
.dt-die:active { transform: scale(.92); }
.dt-count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--burgundy-2); color: #fff; font: 700 .72rem/1 var(--f-body); border: 2px solid #1b1618; }
.die-svg { width: 100%; height: 100%; overflow: visible; }
.die-body { fill: #6e1a26; stroke: #e0be72; stroke-width: 3; stroke-linejoin: round; }
.die-facet { fill: none; stroke: rgba(224, 190, 114, .55); stroke-width: 2; }
.die-svg text { fill: #ffe9b8; font-family: var(--f-head); font-weight: 900; paint-order: stroke; stroke: rgba(0, 0, 0, .45); stroke-width: 3px; }
.dt-mod { display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--muted); }
.dt-mod b { color: var(--parch); font-family: var(--f-head); }
.dt-expr { display: flex; flex-direction: column; gap: .25rem; }
.dt-expr span { font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); }
.dt-expr input { font-family: ui-monospace, monospace; }
.dt-actions { display: flex; gap: .5rem; }
.dt-actions .btn.gold { flex: 1; }
.dice-tray p { margin: 0; }

/* ---------- Zar animasyonu ---------- */
#dice-stage { position: fixed; inset: 0; pointer-events: none; z-index: 150; display: grid; place-items: center; }
.fx-roll { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 1rem; transition: opacity .4s, transform .4s; }
.fx-roll.out { opacity: 0; transform: translateY(-20px) scale(.96); }
.fx-dice { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 520px; }
.fx-die { width: 78px; height: 78px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .7)); animation: tumble .78s cubic-bezier(.2, .9, .25, 1.05) both; animation-delay: calc(var(--i) * 45ms); }
.fx-die .die-svg text { font-size: 38px; }
.fx-die.dropped { opacity: .45; filter: grayscale(.8) drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
@keyframes tumble {
  0% { transform: translate(calc(var(--dx) + 40vw), -60vh) rotate(var(--rot)) scale(.6); opacity: 0; }
  60% { opacity: 1; }
  80% { transform: translate(0, 6px) rotate(var(--tilt)) scale(1.06); }
  100% { transform: translate(0, 0) rotate(0) scale(1); }
}
.fx-roll.settled .fx-die.nat20 { animation: nat20 .9s ease-out; }
.fx-roll.settled .fx-die.nat20 .die-body { fill: #b8862f; stroke: #fff1c8; }
.fx-roll.settled .fx-die.nat1 .die-body { fill: #2a1012; stroke: #ff6b6b; }
@keyframes nat20 { 30% { transform: scale(1.3); filter: drop-shadow(0 0 30px #ffd76a); } }
.fx-plate { opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .3s .05s, transform .4s var(--pop); display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .8rem 1.6rem; border-radius: 14px; background: linear-gradient(180deg, rgba(36, 28, 31, .96), rgba(18, 14, 15, .96)); border: 1px solid var(--gold-3); box-shadow: 0 20px 50px rgba(0, 0, 0, .7); text-align: center; }
.fx-roll.settled .fx-plate { opacity: 1; transform: none; }
.fx-who { font: 700 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--gold); }
.fx-what { font: 600 .95rem/1.2 var(--f-head); color: var(--parch); }
.fx-total { font: 900 3rem/1 var(--f-head); color: #fff1cf; text-shadow: 0 0 20px rgba(240, 201, 106, .5); }
.fx-tag { font: 700 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--gold-2); }
.fx-tag.ok { color: #a6e3a1; }
.fx-tag.bad { color: #ff9d9d; }
.fx-plate.crit-success { border-color: var(--gold-2); box-shadow: 0 0 60px rgba(240, 201, 106, .45), 0 20px 50px rgba(0, 0, 0, .7); }
.fx-plate.crit-fail { border-color: var(--red); box-shadow: 0 0 50px rgba(192, 57, 43, .45), 0 20px 50px rgba(0, 0, 0, .7); }
.fx-plate.crit-fail .fx-total { color: #ff9d9d; text-shadow: 0 0 20px rgba(192, 57, 43, .6); }
.fx-more { align-self: center; font: 700 1.2rem/1 var(--f-head); color: var(--gold-2); }

/* =========================================================
   OYUN MASASI
   ========================================================= */
.table-screen { display: grid; grid-template-columns: 290px minmax(0, 1fr) 350px; height: calc(100vh - var(--topbar)); overflow: hidden; }
.tb-left, .tb-right { display: flex; flex-direction: column; gap: .8rem; padding: .9rem; min-height: 0; background: linear-gradient(180deg, rgba(20, 16, 18, .85), rgba(14, 11, 12, .92)); }
.tb-left { border-right: 1px solid var(--line); overflow-y: auto; }
.tb-right { border-left: 1px solid var(--line); }
.tb-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tb-center { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.scene-head { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .7rem 1rem .5rem; text-align: center; }
.scene-head h1 { font-size: clamp(1.2rem, 2.2vw, 1.75rem); margin: 0; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.scene-head p { margin: .1rem 0 0; font: 600 .86rem/1.3 var(--f-body); letter-spacing: .01em; color: var(--gold); }
.scene-head p i { font-style: normal; color: var(--gold-3); margin: 0 .3rem; font-size: .6rem; }
.orn { flex: 1; max-width: 160px; height: 10px; background: linear-gradient(90deg, transparent, var(--gold-3)) center / 100% 1px no-repeat; position: relative; }
.orn::after { content: ''; position: absolute; right: -2px; top: 50%; width: 7px; height: 7px; border: 1px solid var(--gold); transform: translateY(-50%) rotate(45deg); background: var(--bg); }
.orn.r { transform: scaleX(-1); }
.stage { position: relative; flex: 1; min-height: 0; margin: 0 .8rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0b0908; box-shadow: inset 0 0 60px rgba(0, 0, 0, .8), 0 10px 40px rgba(0, 0, 0, .5); }
.map-host { position: absolute; inset: 0; }
.map-canvas { display: block; touch-action: none; cursor: grab; }
.map-canvas:active { cursor: grabbing; }
.map-canvas[data-tool=reveal], .map-canvas[data-tool=hide], .map-canvas[data-tool=marker], .map-canvas[data-tool=token], .map-canvas[data-tool=ping] { cursor: crosshair; }
.scene-art-wrap { position: absolute; inset: 0; display: grid; place-items: end center; }
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-art-wrap p { position: relative; margin: 0 0 2rem; font-family: var(--f-serif); font-style: italic; font-size: 1.1rem; }
.stage-banner { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: .7rem; padding: .5rem .9rem; border-radius: 999px; background: rgba(14, 11, 12, .88); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: .82rem; white-space: nowrap; }
.your-turn { position: absolute; left: 50%; top: 3.6rem; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem; border-radius: 999px; background: linear-gradient(180deg, #e3c177, #a8823c); color: #1d1408; font: 700 .95rem/1 var(--f-head); box-shadow: 0 0 30px rgba(240, 201, 106, .5); animation: pulse-gold 1.6s ease-in-out infinite; }
@keyframes pulse-gold { 50% { box-shadow: 0 0 50px rgba(240, 201, 106, .85); } }

.map-tools { position: absolute; top: .6rem; right: .6rem; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; max-width: calc(100% - 1.2rem); }
.map-pick { width: auto !important; max-width: 240px; min-height: 32px !important; font-size: .8rem; background-color: rgba(14, 11, 12, .9) !important; }
.tool-group { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(14, 11, 12, .88); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); flex-wrap: wrap; justify-content: flex-end; }
.tool-group .small { padding: 0 .3rem; color: var(--muted); }
.tool { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 .35rem; border: 0; border-radius: 7px; background: none; color: var(--parch-2); font-size: .72rem; font-weight: 600; }
.tool.wide { display: inline-flex; gap: .3rem; padding: 0 .55rem; }
.tool:hover { background: rgba(111, 154, 138, .12); color: var(--gold-2); }
.tool.on { background: linear-gradient(180deg, #e3c177, #a8823c); color: #1d1408; }
.float-card { position: absolute; z-index: 7; left: .7rem; top: .7rem; width: min(300px, calc(100% - 1.4rem)); padding: .7rem .8rem; border-radius: 10px; background: rgba(22, 17, 19, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem; font-size: .85rem; animation: modal-in .2s var(--pop); }
.float-card p { margin: 0; font-family: var(--f-serif); font-size: 1rem; color: var(--parch-2); }
.float-card select { width: auto; min-height: 26px; font-size: .74rem; padding: .1rem 1.5rem .1rem .4rem; }

.scene-strip { display: flex; gap: .8rem; align-items: center; margin: .55rem .8rem 0; min-height: 0; }
.scene-desc { flex: 1; min-width: 0; padding: .45rem .7rem; border-radius: 9px; background: linear-gradient(90deg, rgba(234, 223, 196, .07), rgba(234, 223, 196, .02)); border: 1px solid rgba(234, 223, 196, .1); max-height: 92px; overflow: auto; }
.scene-desc p { margin: .2rem 0 0; font-family: var(--f-serif); font-size: 1.04rem; line-height: 1.35; color: var(--parch); }
.scene-strip.closed .scene-desc { max-height: none; }
.npc-strip { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
.npc-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem .2rem .2rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); font-size: .78rem; font-weight: 600; color: var(--parch); }
.npc-chip:hover { border-color: var(--gold); }
.att-friendly { --att: #6fd36a; }
.att-hostile { --att: #e05a4a; }
.att-neutral { --att: #6f9a8a; }
.att-unknown { --att: #8a8178; }
.npc-chip { box-shadow: inset 0 -2px 0 var(--att, transparent); }

.toolbar { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .6rem .8rem .8rem; }
.tb-btn { display: inline-flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 64px; padding: .4rem .5rem; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; transition: color .15s, background .15s, border-color .15s; }
.tb-btn .ic { width: 22px; height: 22px; }
.tb-btn:hover { color: var(--parch); background: rgba(255, 255, 255, .03); }
.tb-btn.on { color: var(--gold-2); border-color: var(--line-2); background: rgba(111, 154, 138, .08); }
.tb-dice { display: grid; place-items: center; width: 62px; height: 62px; margin: -18px .5rem 0; border-radius: 50%; border: 2px solid #f1d796; background: radial-gradient(circle at 35% 30%, #fff8e4, #e8d6a8 45%, #b9945a); color: #3a2410; box-shadow: 0 0 0 5px rgba(14, 11, 12, .9), 0 0 0 6px var(--gold-3), 0 10px 30px rgba(0, 0, 0, .6); transition: transform .25s var(--pop), box-shadow .2s; }
.tb-dice .ic { width: 30px; height: 30px; stroke-width: 1.6; }
.tb-dice:hover { transform: rotate(-20deg) scale(1.06); box-shadow: 0 0 0 5px rgba(14, 11, 12, .9), 0 0 0 6px var(--gold), 0 0 28px rgba(240, 201, 106, .5); }
.tb-dice.on { transform: rotate(180deg); }

.drawer { position: absolute; left: .7rem; right: .7rem; bottom: .7rem; top: .7rem; z-index: 8; display: flex; flex-direction: column; border-radius: 12px; background: linear-gradient(180deg, rgba(36, 29, 32, .97), rgba(20, 16, 18, .98)), var(--noise); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0, 0, 0, .7); animation: drawer-in .3s var(--ease); max-width: 980px; margin: 0 auto; }
@keyframes drawer-in { from { opacity: 0; transform: translateY(30px); } }
.drawer-head { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0 auto 0 0; }
.drawer-body { flex: 1; overflow: auto; padding: 1rem; }

.party-panel { display: flex; flex-direction: column; gap: .4rem; }
.pp-row { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem; border-radius: 10px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.pp-row:hover { background: rgba(255, 255, 255, .02); }
.pp-row b { font-family: var(--f-head); font-size: .9rem; color: var(--parch); }
.pp-row small { display: block; font-size: .72rem; }
.pp-row.me { border-color: var(--line); }
.pp-row.current { border-color: var(--gold); background: linear-gradient(90deg, rgba(111, 154, 138, .15), transparent); box-shadow: 0 0 18px rgba(111, 154, 138, .15); }
.pp-row.dm { background: linear-gradient(90deg, rgba(168, 55, 44, .12), transparent); }
.pp-dm { display: flex; flex-direction: column; gap: .1rem; }

.combat-panel { padding: .8rem; display: flex; flex-direction: column; gap: .6rem; border-color: rgba(155, 35, 53, .55); background: linear-gradient(180deg, rgba(70, 22, 30, .45), rgba(27, 22, 24, .94)), var(--panel); }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.cp-head h2 { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .95rem; color: #ffd9c9; white-space: nowrap; }
.init-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.init { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .05); background: rgba(0, 0, 0, .2); transition: all .25s; }
.init b { font-size: .85rem; }
.init.enemy { border-left: 3px solid #c0392b; }
.init.npc { border-left: 3px solid var(--blue); }
.init.pc { border-left: 3px solid var(--gold); }
.init.current { border-color: var(--gold); background: linear-gradient(90deg, rgba(111, 154, 138, .2), rgba(0, 0, 0, .2)); box-shadow: 0 0 16px rgba(111, 154, 138, .25); transform: translateX(4px); }
.init.hidden-c { opacity: .6; border-style: dashed; }
.init.down { opacity: .5; filter: grayscale(.7); }
.init-n { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 6px; background: #2a2023; border: 1px solid var(--line-2); font: 700 .9rem/1 var(--f-head); color: var(--gold-2); flex: none; }
.state { font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.state.unhurt { color: #8fd68a; }
.state.hurt { color: var(--gold); }
.state.bloodied { color: #ff7d6e; }
.state.down { color: #777; }
.cb-ctl { margin-top: .2rem; }
.cb-box { display: flex; flex-direction: column; gap: .35rem; margin-top: .35rem; padding: .45rem; border-radius: 6px; background: rgba(0, 0, 0, .25); }
.cb-box select { min-height: 26px; font-size: .72rem; padding: .1rem 1.4rem .1rem .4rem; }
.tiny-in { width: 62px !important; min-height: 26px !important; padding: .15rem .35rem !important; font-size: .75rem; }
.npc-actions { display: flex; flex-direction: column; gap: .25rem; padding-top: .3rem; border-top: 1px dashed var(--line); }
.cp-foot { display: flex; flex-direction: column; gap: .4rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.cp-foot select { min-height: 30px; font-size: .78rem; }

.journal { display: flex; flex-direction: column; gap: .8rem; }
.journal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.journal-entry { padding: .8rem 1rem; border-radius: 8px; background: linear-gradient(180deg, rgba(234, 223, 196, .08), rgba(234, 223, 196, .03)); border: 1px solid rgba(234, 223, 196, .12); }
.journal-entry h4 { margin: 0; }
.journal-entry p { margin: .4rem 0 0; font-family: var(--f-serif); font-size: 1.05rem; color: var(--parch); }
.quests { display: grid; gap: .7rem; }
.quest { padding: .8rem 1rem; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.quest h4 { margin: 0; }
.quest.completed { opacity: .7; }
.quest.completed h4 { text-decoration: line-through; text-decoration-color: var(--gold-3); }
.quest p { font-family: var(--f-serif); font-size: 1.02rem; margin: .4rem 0; }
.q-status { font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); }
.objectives { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .25rem; }
.objectives li { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.objectives li.done { color: var(--muted); text-decoration: line-through; }
.objectives li.secret { color: #e0968a; }
.objectives .box { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--gold-3); border-radius: 3px; font-size: .7rem; color: var(--gold-2); }
.rewards { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--gold-2); margin: .4rem 0 0; }
.map-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.map-item { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .8rem; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); text-align: left; color: var(--parch); }
.map-item.on, .map-item:hover { border-color: var(--gold); }
.map-item .ic { width: 24px; height: 24px; color: var(--gold); }
.npc-info h4 { margin: 1rem 0 .3rem; color: var(--gold); font-size: .78rem; letter-spacing: .01em; }
.npc-info p { font-family: var(--f-serif); font-size: 1.05rem; }
.npc-info blockquote { margin: .4rem 0; padding: .4rem .8rem; border-left: 2px solid var(--gold-3); font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; color: var(--parch-2); }
.att-tag { display: inline-block; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--att); color: var(--att); font: 700 .86rem/1 var(--f-body); letter-spacing: .01em; margin-bottom: .5rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0; font-size: .85rem; }
.kv div { display: contents; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* =========================================================
   KARAKTER SAYFASI
   ========================================================= */
.sheet { max-width: 1400px; margin: 0 auto; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.sheet.compact { padding: 0; gap: .8rem; }
.sheet-switch { display: flex; justify-content: flex-end; }
.sheet-switch label { display: flex; align-items: center; gap: .5rem; color: var(--muted); }
.sheet-switch select { width: auto; }
.sheet-head { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; padding: 1.2rem 1.4rem; background: linear-gradient(110deg, rgba(107, 34, 27, .45), rgba(27, 22, 24, .9) 60%), var(--noise), var(--panel); }
.sh-portrait { position: relative; }
.sh-portrait .avatar { box-shadow: 0 0 0 3px #120e0f, 0 0 0 5px var(--gold), 0 10px 30px rgba(0, 0, 0, .6); font-size: 2.6rem !important; }
.sh-upload { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--gold-3); cursor: pointer; color: var(--gold-2); }
.sh-id { flex: 1 1 360px; display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.sh-id h1 { margin: 0; }
.sh-name { font: 900 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--f-head) !important; color: var(--parch) !important; background: transparent !important; border-color: transparent !important; padding: .1rem .3rem !important; margin-left: -.3rem; }
.sh-name:hover:not(:disabled), .sh-name:focus { border-color: var(--line-2) !important; }
.sh-class { font-family: var(--f-serif); font-size: 1.2rem; color: var(--parch-2); margin: 0; }
.sh-line { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .82rem; }
.sh-line select, .sh-line input { width: auto; min-height: 30px; font-size: .82rem; }
.sh-line label { display: inline-flex; align-items: center; gap: .3rem; }
.sh-line label input { width: 58px; }
.xp { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.xp-bar { flex: 1 1 160px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(0, 0, 0, .6); overflow: hidden; }
.xp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 10px rgba(240, 201, 106, .5); transition: width .5s; }
.xp-text { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.xp-text input { width: 88px; min-height: 28px; font-size: .8rem; }
.sh-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.toggle-insp { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--muted); font-size: .78rem; font-weight: 600; }
.toggle-insp.on { color: #1d1408; background: linear-gradient(180deg, #f3d58b, #b98f45); border-color: #fff1c8; box-shadow: 0 0 18px rgba(240, 201, 106, .55); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .6rem; }
.stats-row.compact { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.stat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; padding: .65rem .5rem; border-radius: 10px; text-align: center; background: linear-gradient(180deg, rgba(43, 35, 38, .9), rgba(24, 19, 21, .95)); border: 1px solid var(--line); min-height: 92px; }
.stat > .rollable { display: flex; flex-direction: column; align-items: center; gap: .2rem; width: 100%; height: 100%; justify-content: center; }
.stat .lbl { font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); }
.stat b { font: 700 1.6rem/1 var(--f-head); color: var(--parch); }
.stat .sub { font-size: .68rem; color: var(--dim); display: inline-flex; align-items: center; gap: .2rem; }
.stat input[type=number] { width: 70px; text-align: center; font: 700 1.4rem/1 var(--f-head); padding: .2rem; min-height: 38px; background: transparent; border-color: transparent; }
.stat input[type=number]:hover:not(:disabled), .stat input[type=number]:focus { border-color: var(--line-2); }
.shield-stat { background: radial-gradient(circle at 50% 30%, rgba(111, 154, 138, .12), transparent 70%), linear-gradient(180deg, rgba(43, 35, 38, .9), rgba(24, 19, 21, .95)); }
.hp-stat { grid-column: span 2; min-width: 220px; }
.hp-stat.down { border-color: var(--red); box-shadow: 0 0 20px rgba(192, 57, 43, .3); }
.hp-nums { display: flex; align-items: baseline; gap: .2rem; }
.hp-nums input[type=number] { width: 58px; }
.hp-nums small { font-size: .62rem; color: var(--muted); margin-left: .4rem; letter-spacing: .01em; }
.hp-nums input:last-child { width: 48px; font-size: 1rem; color: #bfe7ff; }
.hp-stat .hpbar { width: 100%; }
.hp-adjust { display: flex; gap: .25rem; margin-top: .35rem; }
.hp-adjust input { width: 64px !important; min-height: 26px !important; padding: .1rem .3rem !important; font-size: .8rem; text-align: center; }
.death .pips { gap: .3rem; }
.death.active { border-color: var(--red); }
.pips { display: flex; align-items: center; gap: .25rem; }
.pips .pl { font-size: .7rem; color: var(--muted); width: 12px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .4); }
.pips i.on.ok { background: #5fae5a; border-color: #a6e3a1; }
.pips i.on.bad { background: var(--red); border-color: #ff9d9d; }
.pip { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid var(--gold-3); background: rgba(0, 0, 0, .4); transition: background .2s, box-shadow .2s; }
.pip.on { background: radial-gradient(circle at 35% 30%, #fff1c8, #6f9a8a 60%, #8c6c33); box-shadow: 0 0 8px rgba(240, 201, 106, .5); }
.cond-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.cond-row select { width: auto; min-height: 28px; font-size: .76rem; padding: .1rem 1.6rem .1rem .5rem; }

.rollable { position: relative; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: inherit; border-radius: 8px; transition: background .15s, box-shadow .15s, color .15s; }
.rollable:hover { background: rgba(111, 154, 138, .1); box-shadow: inset 0 0 0 1px rgba(111, 154, 138, .4); color: #fff3d2; }
.rollable:active { transform: scale(.97); }
.sheet-grid { display: grid; grid-template-columns: 190px 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.ab-col { display: flex; flex-direction: column; gap: .6rem; }
.ab-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .7rem .5rem .55rem; border-radius: 12px 12px 40px 40px / 12px 12px 22px 22px; text-align: center;
  background: linear-gradient(180deg, rgba(48, 38, 42, .95), rgba(22, 17, 19, .98)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 230, 180, .06); }
.ab-name { font: 700 .86rem/1 var(--f-head); letter-spacing: .01em; color: var(--gold); }
.ab-mod { font: 900 1.9rem/1 var(--f-head); color: var(--parch); padding: .1rem .7rem; }
.ab-score { width: 56px !important; min-height: 28px !important; padding: .1rem !important; text-align: center; font: 700 .9rem/1 var(--f-body); border-radius: 999px !important; background: #120e0f !important; border-color: var(--gold-3) !important; }
.ab-save { display: flex; align-items: center; gap: .35rem; margin-top: .3rem; font-size: .74rem; }
.save-btn { padding: .2rem .45rem; color: var(--parch-2); }
.prof-dot { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 1.5px solid var(--gold-3); background: transparent; flex: none; }
.prof-dot.on, .prof-dot.lv1 { background: var(--gold); border-color: var(--gold-2); }
.prof-dot.lv2 { background: radial-gradient(circle, #fff1c8 30%, var(--gold) 35%); border-color: #fff1c8; box-shadow: 0 0 6px rgba(240, 201, 106, .7); }
.ab-card.compact { padding: .5rem .3rem; border-radius: 10px; }
.ab-card.compact .ab-mod { font-size: 1.4rem; }
.drawer-ab { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.drawer-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: .8rem; }
.skills-col { padding: .9rem; }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.skill { display: flex; align-items: center; gap: .4rem; }
.skill-btn { flex: 1; display: flex; align-items: center; gap: .4rem; padding: .32rem .45rem; font-size: .84rem; }
.sk-name { flex: 1; }
.sk-ab { font-size: .62rem; color: var(--dim); letter-spacing: .1em; }
.sk-mod { min-width: 34px; text-align: center; padding: .1rem .3rem; border-radius: 5px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font: 700 .82rem/1.3 var(--f-body); color: var(--parch); }
.tabs-col { padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .2); overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: .4rem; padding: .8rem 1rem; border: 0; background: none; color: var(--muted); font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--parch); }
.tabs button.on { color: var(--gold-2); border-bottom-color: var(--gold); background: linear-gradient(0deg, rgba(111, 154, 138, .08), transparent); }
.tab-body { padding: 1rem; }
.tab-body .panel-h:not(:first-child) { margin-top: 1.2rem; }
.atk-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.atk-table th { text-align: left; font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.atk-table td { padding: .45rem .4rem; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; }
.atk-table td small { display: block; }
.pill-btn { display: inline-flex; align-items: center; padding: .25rem .6rem !important; border-radius: 999px !important; border: 1px solid var(--line-2) !important; background: rgba(0, 0, 0, .35) !important; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.pill-btn:hover { border-color: var(--gold) !important; }
.pill-btn.crit { margin-left: .2rem; font-size: .7rem; color: var(--gold-2); }
.inv-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.coins { display: flex; gap: .35rem; flex-wrap: wrap; }
.coin { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.coin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 .62rem/1 var(--f-body); color: #1d1408; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .5); }
.coin-pp span { background: radial-gradient(circle at 35% 30%, #fff, #b9c3c9); }
.coin-gp span { background: radial-gradient(circle at 35% 30%, #fff1c8, #6f9a8a); }
.coin-ep span { background: radial-gradient(circle at 35% 30%, #f5f0d0, #a8a37a); }
.coin-sp span { background: radial-gradient(circle at 35% 30%, #fff, #9aa0a6); }
.coin-cp span { background: radial-gradient(circle at 35% 30%, #f6c39a, #a5603a); }
.coin input { width: 62px !important; min-height: 26px !important; text-align: center; font-size: .78rem; padding: .1rem !important; }
.weight { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.weight.over { color: #ff9d9d; }
.item-list { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: .3rem; }
.item { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .04); background: rgba(0, 0, 0, .18); font-size: .86rem; }
.item small { display: block; font-size: .76rem; }
.item.equipped, .item.prepared { border-color: rgba(111, 154, 138, .25); }
.equip { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 6px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--muted); flex: none; }
.equip .ic { width: 14px; height: 14px; }
.equip.on { background: var(--gold-3); color: #fff3d2; border-color: var(--gold); }
.spell-head { display: flex; gap: .5rem; margin-bottom: .8rem; }
.stat.mini { min-height: 70px; flex: 1; }
.stat.mini b { font-size: 1.3rem; }
.stat.mini select { width: auto; min-height: 30px; }
.slots { display: grid; gap: .35rem; margin-bottom: .6rem; padding: .7rem; border-radius: 8px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.slot-row { display: flex; align-items: center; gap: .7rem; font-size: .8rem; }
.slot-row > span { min-width: 56px; color: var(--muted); }
.feature-list { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: .6rem; }
.feature { padding: .7rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.feature h4 { margin: 0; }
.feature p { margin: .3rem 0 .3rem; font-size: .86rem; color: var(--parch-2); }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .7rem; }
.tab-body > .field { margin-bottom: .7rem; }

/* =========================================================
   DM STUDIO
   ========================================================= */
.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.studio-nav { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); display: flex; flex-direction: column; gap: 2px; padding: 1rem .7rem; background: linear-gradient(180deg, rgba(26, 20, 22, .95), rgba(14, 11, 12, .95)); border-right: 1px solid var(--line); overflow-y: auto; }
.sn-title { display: flex; align-items: center; gap: .5rem; padding: .3rem .7rem 1rem; font: 700 .9rem/1 var(--f-head); color: var(--gold-2); letter-spacing: .08em; }
.studio-nav a { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .86rem; position: relative; }
.studio-nav a:hover { color: var(--parch); background: rgba(255, 255, 255, .03); }
.studio-nav a.on { color: var(--gold-2); background: linear-gradient(90deg, rgba(111, 154, 138, .16), transparent); box-shadow: inset 2px 0 0 var(--gold); }
.studio-nav a em { margin-left: auto; font-style: normal; font-size: .7rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); color: var(--parch-2); }
.sn-foot { margin-top: auto; padding: .7rem; }
.studio-body { padding: 1.2rem; min-width: 0; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.split:has(.side-pane) { grid-template-columns: 240px minmax(0, 1fr) 320px; }
.list-pane { position: sticky; top: calc(var(--topbar) + 1rem); max-height: calc(100vh - var(--topbar) - 2rem); overflow-y: auto; padding: .7rem; display: flex; flex-direction: column; gap: .6rem; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pick-list button { width: 100%; display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; border: 1px solid transparent; border-radius: 7px; background: none; text-align: left; color: var(--parch); }
.pick-list button:hover { background: rgba(255, 255, 255, .03); }
.pick-list button.on { border-color: var(--line-2); background: rgba(111, 154, 138, .1); }
.li-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.li-main b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-main small { font-size: .7rem; color: var(--muted); text-transform: capitalize; }
.li-main small.att-hostile { color: #ff9d8e; }
.li-main small.att-friendly { color: #a6e3a1; }
.editor { display: flex; flex-direction: column; gap: .85rem; }
.editor-foot { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding-top: .8rem; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 2; background: #1d181a; margin: 0 -1.1rem -1.1rem; padding: .8rem 1.1rem; border-radius: 0 0 var(--r) var(--r); box-shadow: 0 -10px 20px rgba(0, 0, 0, .35); }
.vis-field { display: flex; flex-direction: column; gap: .4rem; }
.vis-users { display: flex; flex-wrap: wrap; gap: .3rem .8rem; padding: .4rem .6rem; border-radius: 6px; background: rgba(0, 0, 0, .2); }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.ov-feed { grid-row: span 2; max-height: 760px; display: flex; flex-direction: column; gap: .6rem; }
.ov-feed .feed-wrap { flex: 1; min-height: 0; }
.dm-notes { min-height: 180px; border-color: rgba(168, 55, 44, .35) !important; background: rgba(64, 22, 17, .2) !important; font-family: var(--f-serif); font-size: 1.05rem !important; }
.who-pick { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
details summary { cursor: pointer; color: var(--gold); font-size: .85rem; }
.flags { width: 100%; border-collapse: collapse; font-size: .85rem; }
.flags th { text-align: left; font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); padding: .3rem; }
.flags td { padding: .2rem; }
.flags input { min-height: 30px !important; font-size: .82rem; }
.obj-row { display: flex; align-items: center; gap: .45rem; }
.npc-top { display: flex; gap: 1rem; align-items: flex-start; }
.tiny-f { flex: 0 0 64px !important; }
.tiny-f input { text-align: center; }
.reveal-box { border-color: rgba(106, 160, 184, .4); background: rgba(30, 50, 60, .15); }
.say-list { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .35rem; }
.say-list li { display: flex; gap: .6rem; align-items: center; padding: .4rem .6rem; border-radius: 6px; background: rgba(0, 0, 0, .2); font-family: var(--f-serif); font-size: 1.02rem; font-style: italic; }
.map-preview { padding: .6rem; }
.studio-stage { position: relative; height: min(62vh, 620px); margin: 0 0 .5rem; flex: none; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.plain-list li { display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; border-radius: 6px; background: rgba(0, 0, 0, .18); font-size: .84rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.ev-li { display: flex; align-items: center; gap: .2rem; border-radius: 7px; border: 1px solid transparent; }
.ev-li > button.grow { display: flex; align-items: center; gap: .5rem; padding: .5rem .55rem; border: 0; background: none; text-align: left; color: var(--parch); }
.ev-li.on { border-color: var(--line-2); background: rgba(111, 154, 138, .1); }
.ev-li.st-triggered { opacity: .6; }
.ev-li.st-armed .ic:first-child { color: #ffb35c; animation: blink 1.2s infinite; }
.icon-btn.trig { width: 28px; height: 28px; color: #ff9d8e; border-color: rgba(192, 57, 43, .45); }
.icon-btn.trig:hover:not(:disabled) { background: rgba(155, 35, 53, .4); color: #fff; }
.ev-status { padding: .8rem 1rem; }
.ev-status.st-armed { border-color: #e0905b; }
.ev-status.st-triggered { border-color: rgba(95, 174, 90, .5); }
.enc-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.enc-grid .combat-panel { padding: 1rem; }
.players-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.players-table th { text-align: left; font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; color: var(--muted); padding: .4rem; border-bottom: 1px solid var(--line); }
.players-table td { padding: .55rem .4rem; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.players-table select { min-height: 30px; font-size: .8rem; }
.side-pane { position: sticky; top: calc(var(--topbar) + 1rem); max-height: calc(100vh - var(--topbar) - 2rem); overflow-y: auto; }

/* =========================================================
   DUYARLI DÜZEN (masaüstü öncelikli, tablet destekli)
   ========================================================= */
@media (max-width: 1360px) {
  .table-screen { grid-template-columns: 250px minmax(0, 1fr) 320px; }
  .sheet-grid { grid-template-columns: 180px minmax(0, 1fr); }
  .tabs-col { grid-column: 1 / -1; }
  .split:has(.side-pane) { grid-template-columns: 240px minmax(0, 1fr); }
  .side-pane { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 1120px) {
  .tb-nav a span { display: none; }
  .tb-camp-name { max-width: 16ch; }
  .table-screen { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr) auto; }
  .tb-left { grid-column: 1 / -1; grid-row: 2; flex-direction: row; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); max-height: 210px; }
  .tb-left .party-panel { flex-direction: row; flex: none; }
  .tb-left .party-panel .panel-h { display: none; }
  .tb-left .pp-row { min-width: 220px; }
  .tb-left .combat-panel { min-width: 320px; }
  .home-grid, .lobby-grid { grid-template-columns: 1fr; }
  .lobby-feed { position: static; max-height: 520px; }
  .studio { grid-template-columns: 64px minmax(0, 1fr); }
  .studio-nav a span, .sn-title span, .sn-foot { display: none; }
  .studio-nav a { justify-content: center; }
  .studio-nav a em { position: absolute; top: 2px; right: 2px; }
  .ov-grid, .enc-grid { grid-template-columns: 1fr; }
  .ov-feed { grid-row: auto; }
  .drawer-split { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --topbar: 54px; }
  .tb-brand span, .tb-camp .pill, .conn span, .um-name { display: none; }
  .table-screen { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .tb-center { height: 78vh; }
  .tb-right { border-left: 0; border-top: 1px solid var(--line); max-height: 80vh; }
  .split, .split:has(.side-pane) { grid-template-columns: 1fr; }
  .list-pane { position: static; max-height: 260px; }
  .sheet-grid { grid-template-columns: 1fr; }
  .ab-col { display: grid; grid-template-columns: repeat(3, 1fr); }
  .cc-abilities, .drawer-ab { grid-template-columns: repeat(3, 1fr); }
  .notes-grid, .two-col { grid-template-columns: 1fr; }
  .npc-strip { max-width: none; }
  .scene-strip { flex-direction: column; align-items: stretch; }
  .cc-top, .npc-top { flex-direction: column; align-items: center; }
  .hp-stat { grid-column: span 1; min-width: 0; }
}
@media (max-width: 560px) {
  .tb-nav { gap: 0; }
  .tb-nav a { padding: .5rem; }
  .toolbar { gap: .1rem; }
  .tb-btn { min-width: 44px; padding: .3rem; }
  .tb-btn span { display: none; }
  .invite-code span { width: 32px; height: 42px; font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .embers { display: none; }
}

/* Saat damgası için sağda boşluk */
.fe .bubble, .fe .announce, .fe .event-card, .fe .sys { padding-right: 3.6rem; }
.fe .rc-head { padding-right: 3.2rem; }
.fe-scene .scene-card { padding-top: 1.3rem; }

/* Kampanya paneli, kişisel sır, ipuçları */
.dash-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.dash-stat { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .8rem .5rem; border-radius: 10px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(43, 35, 38, .9), rgba(24, 19, 21, .95)); color: var(--parch-2); transition: transform .2s var(--ease), border-color .2s; }
.dash-stat:hover { transform: translateY(-3px); border-color: var(--gold); }
.dash-stat b { font: 900 1.9rem/1 var(--f-head); color: var(--gold-2); }
.dash-stat span { font: 600 .86rem/1 var(--f-body); letter-spacing: .01em; }
.secret-card { display: flex; gap: .7rem; padding: .8rem 1rem; margin-bottom: .8rem; border-radius: 9px; border: 1px solid rgba(168, 55, 44, .5); background: linear-gradient(90deg, rgba(168, 55, 44, .16), rgba(168, 55, 44, .03)); }
.secret-card .ic { color: #e0968a; margin-top: .2rem; }
.secret-card h4 { margin: 0 0 .25rem; color: #d9cbff; }
.secret-card small { font: 400 .72rem var(--f-body); color: var(--muted); margin-left: .4rem; }
.secret-card p { margin: 0; font-family: var(--f-serif); font-size: 1.08rem; color: var(--parch); }
.hints { gap: .4rem; }
.chip.hint { padding: .35rem .7rem; font-size: .78rem; cursor: pointer; flex-direction: column; align-items: flex-start; border-radius: 8px; }
.chip.hint small { color: var(--muted); font-size: .66rem; }
.chip.hint:hover { border-color: var(--gold); color: var(--gold-2); }
details.slot { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .5rem; background: rgba(0, 0, 0, .15); }
details.slot > summary { padding: .6rem .8rem; display: flex; align-items: center; gap: .5rem; }
details.slot form { padding: .2rem .8rem .8rem; }

/* Küçük eğitimler */
.tour { position: fixed; z-index: 250; top: calc(var(--topbar) + 12px); right: 16px; width: min(350px, calc(100vw - 32px)); padding: 1rem 1.1rem .9rem; border-radius: 12px; background: linear-gradient(180deg, rgba(44, 35, 38, .98), rgba(24, 19, 21, .98)); border: 1px solid var(--gold); box-shadow: 0 20px 50px rgba(0, 0, 0, .7), 0 0 30px rgba(111, 154, 138, .2); animation: modal-in .3s var(--pop); }
.tour-head { display: flex; align-items: center; justify-content: space-between; }
.tour-head .eyebrow { margin: 0; display: flex; align-items: center; gap: .4rem; }
.tour h4 { margin: .4rem 0 .3rem; font-size: 1.02rem; color: var(--gold-2); }
.tour p { margin: 0 0 .8rem; font-family: var(--f-serif); font-size: 1.08rem; line-height: 1.35; color: var(--parch); }
.tour-foot { display: flex; align-items: center; gap: .4rem; }
.tour-hl { position: relative; z-index: 2; outline: 2px solid var(--gold-2) !important; outline-offset: 3px; border-radius: 8px; animation: tour-glow 1.8s ease-in-out infinite; }
@keyframes tour-glow { 50% { box-shadow: 0 0 0 6px rgba(240, 201, 106, .22), 0 0 28px rgba(240, 201, 106, .45); } }
.help-btn { font: 700 .95rem/1 var(--f-head); color: var(--gold-2); border-color: var(--gold-3); }
.tour.left { right: auto; left: 16px; }

/* Harita ipucu şeridi */
.map-hint { position: absolute; left: .7rem; bottom: .7rem; z-index: 5; max-width: calc(100% - 1.4rem); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .45rem .8rem; border-radius: 999px; background: rgba(14, 11, 12, .88); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); font-size: .8rem; color: var(--parch-2); }
.map-hint b { color: var(--gold-2); }
.map-hint.claim { border-color: var(--gold); }
.map-hint.turn { border-color: var(--gold); background: linear-gradient(90deg, rgba(111, 154, 138, .25), rgba(14, 11, 12, .92)); color: var(--parch); animation: pulse 2s ease-in-out infinite; }
.map-hint .ic { color: var(--gold); }

/* 3B zar animasyonu */
.fx-canvas { display: block; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); }
.fx-roll { gap: 0; }
.fx-plate { margin-top: -26px; }

/* Rehber */
.guide { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }
.guide-hero { margin-bottom: 1.6rem; }
.guide-hero h1 { max-width: 22ch; }
.guide-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.guide-toc { position: sticky; top: calc(var(--topbar) + 1rem); display: flex; flex-direction: column; gap: 2px; }
.guide-toc a { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 7px; color: var(--parch-2); font-size: .88rem; font-weight: 600; }
.guide-toc a:hover { background: rgba(111, 154, 138, .1); color: var(--gold-2); }
.guide-body { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.guide-body section { scroll-margin-top: calc(var(--topbar) + 1rem); }
.guide-body h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; }
.guide-body h3 { color: var(--gold-2); font-size: .95rem; }
.guide-body p, .guide-body li, .guide-body td, .guide-body dd { font-size: .95rem; line-height: 1.6; color: var(--parch); }
.guide-list { padding-left: 1.1rem; display: grid; gap: .5rem; margin: .5rem 0; }
.steps { padding-left: 1.2rem; display: grid; gap: .55rem; counter-reset: s; list-style: none; }
.steps li { position: relative; padding-left: 1.9rem; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: linear-gradient(180deg, #e3c177, #a8823c); color: #1d1408; font: 800 .75rem/1 var(--f-head); }
code { font-family: ui-monospace, monospace; padding: .05rem .4rem; border-radius: 4px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); color: var(--gold-2); font-size: .88em; }
.tip-box { display: flex; gap: .7rem; padding: .8rem 1rem; margin: .8rem 0 0; border-radius: 9px; border: 1px solid var(--gold-3); background: linear-gradient(90deg, rgba(111, 154, 138, .14), rgba(111, 154, 138, .03)); }
.tip-box .ic { color: var(--gold); margin-top: .2rem; }
.tip-box p { margin: 0; }
.dice-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; margin: .8rem 0; }
.die-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .7rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.die-card .die-svg { width: 52px; height: 52px; }
.die-card small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.dc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; margin: .8rem 0; }
.dc-card { display: flex; flex-direction: column; align-items: center; padding: .6rem; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .22); }
.dc-card b { font-family: var(--f-head); color: var(--gold-2); }
.dc-card small { color: var(--muted); }
.guide-table { width: 100%; border-collapse: collapse; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.guide-table th { width: 32%; font-size: .85rem; color: var(--gold-2); font-family: var(--f-head); font-weight: 700; }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem .9rem; margin: 0; }
.glossary div { padding: .5rem .7rem; border-radius: 7px; background: rgba(0, 0, 0, .18); }
.glossary dt { font-family: var(--f-head); color: var(--gold-2); font-weight: 700; }
.glossary dd { margin: 0; }
.guide-body details { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .8rem; margin-bottom: .5rem; background: rgba(0, 0, 0, .15); }
.guide-body details summary { font-weight: 600; color: var(--parch); }
.guide-body details p { margin: .5rem 0 0; }
.guide-link { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--parch-2); }
.guide-link:hover { border-color: var(--gold); color: var(--gold-2); }
.app.screen-guide { min-height: 100vh; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; } .guide-toc .panel-h { width: 100%; } .guide-link span { display: none; } }




/* =========================================================
   MEŞE MASA — vellum, mürekkep, mühür balı, bakır yeşili
   Pirinç yalnızca sırası gelen karakterde; geri kalan sessiz.
   ========================================================= */
:root { --oak: #1a130e; --walnut: #2b1e15; --vellum: #cdbd94; --vellum-2: #bba97c; --ink-dark: #1f1710; --wax: #8e2b22; --wax-2: #a8372c; --brass: #b78a3d; --verd: #6f9a8a; }
body { background: radial-gradient(900px 500px at 50% -10%, rgba(183, 138, 61, .10), transparent 70%), var(--noise), var(--bg); }

/* Çerçeve ve süsler: elmas köşeler ve çizgi süsleri kalktı */
.frame::before, .frame::after, .orn { display: none; }
.frame { border-radius: 2px; background: var(--walnut); border: 1px solid rgba(205, 189, 148, .2); box-shadow: 3px 4px 0 rgba(0, 0, 0, .35); }
.frame.inner { background: rgba(0, 0, 0, .2); box-shadow: none; }
.panel-h { font: 700 1.15rem/1.1 var(--f-head); letter-spacing: 0; text-transform: none; color: var(--parch); border-bottom: 1px solid var(--line); background: none; }
.eyebrow { font: 500 .95rem/1.1 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--verd); }

/* Üst bar: düz ceviz, tek ince çizgi */
.topbar { background: #211810; border-bottom: 1px solid rgba(205, 189, 148, .2); box-shadow: none; backdrop-filter: none; }
.topbar::after { display: none; }
.tb-brand { font-size: 1.15rem; }
.tb-brand .ic { color: var(--brass); }
.tb-nav a { text-transform: none; letter-spacing: 0; font: 500 1rem/1 var(--f-body); border-radius: 2px; }
.tb-nav a.on { color: var(--parch); background: rgba(205, 189, 148, .1); }
.tb-nav a.on::after { left: 0; right: 0; bottom: -9px; height: 2px; box-shadow: none; border-radius: 0; background: var(--verd); }
.conn { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.conn.on i { background: var(--verd); box-shadow: none; }

/* Düğmeler: düz renk, masaya vurulan parça gibi sert gölge */
.btn { border-radius: 2px; background: #3d2d1f; border: 1px solid rgba(205, 189, 148, .3); box-shadow: 0 2px 0 #0f0a06; text-shadow: none; font: 700 .95rem/1 var(--f-body); letter-spacing: .01em; }
.btn:hover:not(:disabled) { background: #4a3727; border-color: rgba(205, 189, 148, .55); box-shadow: 0 2px 0 #0f0a06; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.btn.gold { background: var(--wax); border-color: #c4574a; color: #f6e8cf; text-shadow: none; box-shadow: 0 2px 0 #3d0f0b; }
.btn.gold:hover:not(:disabled) { background: var(--wax-2); color: #fff4de; }

/* Harita: vellum, meşe çerçeve (tek kalın kenar, süs yok) */
.stage { border: 6px solid #3a2a1b; border-radius: 2px; background: #120d09; box-shadow: 0 0 0 1px #0d0906, 4px 6px 0 rgba(0, 0, 0, .4), inset 0 0 50px rgba(0, 0, 0, .7); }
.stage::before, .stage::after { display: none; }
.scene-head h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: 0; font-weight: 400; }
.scene-head p { text-transform: none; letter-spacing: 0; font: italic 400 1.05rem/1.3 var(--f-head); color: var(--parch-2); }
.map-hint, .stage-banner { border-radius: 2px; background: #241910; border: 1px solid rgba(205, 189, 148, .3); box-shadow: 2px 3px 0 rgba(0, 0, 0, .4); font: 500 .95rem/1.3 var(--f-body); color: var(--parch-2); }
.map-hint.turn { background: var(--brass); color: #1f1710; border-color: #d6a957; animation: none; }
.your-turn { border-radius: 2px; background: var(--brass); color: #1f1710; border: 1px solid #d6a957; box-shadow: 3px 4px 0 rgba(0, 0, 0, .45); animation: none; font: 700 1.1rem/1 var(--f-head); }

/* Modal: kâğıt değil, ceviz levha */
.modal { border-radius: 2px; background: var(--walnut); border: 1px solid rgba(205, 189, 148, .3); box-shadow: 6px 8px 0 rgba(0, 0, 0, .45); }
.modal-head { border-radius: 0; background: #33251a; }
.toast { border-radius: 2px; box-shadow: 3px 4px 0 rgba(0, 0, 0, .45); }

/* Sahne metni: ustanın yüksek sesle okuduğu satırlar — vellum üstüne mürekkep. Sayfadaki tek parlak yüzey. */
.scene-desc { border-radius: 2px; border: 1px solid #8f7d52; background: var(--vellum) var(--noise); box-shadow: 3px 4px 0 rgba(0, 0, 0, .4); max-height: 120px; padding: .5rem .9rem .6rem; }
.scene-desc p { color: var(--ink-dark); font-size: 1.12rem; line-height: 1.4; }
.scene-desc .link-btn { color: #5b4a2a; font: 700 .9rem/1 var(--f-body); }
.scene-desc .link-btn:hover { color: var(--wax); }

/* Satırlı parti listesi: her oyuncu için ayrı kart yerine ince ayırıcı */
.pp-row { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); padding: .6rem .2rem; }
.pp-row:hover { background: none; }
.pp-row b { font-size: 1.05rem; font-weight: 400; }
.party-panel .pp-row.dm { background: none; }

/* Alt çubuk */
.tb-btn { border-radius: 2px; font: 500 .95rem/1 var(--f-body); }
.tb-btn.on { color: var(--parch); background: rgba(205, 189, 148, .1); border-color: var(--line-2); }
.tb-dice { border-radius: 50%; border: 2px solid #3d0f0b; background: var(--wax); color: #f6e8cf; box-shadow: 0 3px 0 #3d0f0b; }
.tb-dice:hover { transform: rotate(-20deg); box-shadow: 0 3px 0 #3d0f0b; }
.drawer { border-radius: 2px; background: var(--walnut); box-shadow: 5px 7px 0 rgba(0, 0, 0, .4); }

/* IM Fell eski usul rakam kullanır (12 → I2); sayılar gövde fontunda, satır içi rakam okunaklı kalsın */
.ac-badge b, .invite-code span, .rc-total, .dt-mod b, .fx-total, .init-n, .stat b, .stat input[type=number], .ab-mod, .dash-stat b, .dc-card b, .steps li::before, .hp-num, .hp-text, .tb-camp-name, .ac-mini, .pp-row small, .tb-dice, .die-n {
  font-family: var(--f-body); font-variant-numeric: lining-nums tabular-nums; font-weight: 700;
}
.fx-total { font-size: 3.4rem; }


/* Panodaki sayılar: altı özdeş kutu yerine tek satırlı, dikey çizgilerle ayrılmış künye */
.dash-row { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .18); }
.dash-stat { flex: 1 1 110px; flex-direction: row; justify-content: center; align-items: baseline; gap: .5rem; padding: .7rem .8rem; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.dash-stat:last-child { border-right: 0; }
.dash-stat:hover { transform: none; background: rgba(205, 189, 148, .08); }
.dash-stat b { font: 700 1.5rem/1 var(--f-body); color: var(--parch); }
.dash-stat span { font: 500 1rem/1 var(--f-head); color: var(--parch-2); }

/* İpucu balonu: ceviz levha, mor değil */
.tour { border-radius: 2px; background: #33251a; border: 1px solid rgba(205, 189, 148, .35); box-shadow: 4px 6px 0 rgba(0, 0, 0, .45); }
.tour-hl { border-radius: 2px; }
.tour h4 { font-weight: 400; font-size: 1.15rem; color: var(--parch); }

/* Rehber: adım numaraları gerçek bir sıra, ama altın daire yerine mühür */
.steps li::before { background: var(--wax); color: #f6e8cf; border-radius: 50%; box-shadow: 0 1px 0 #3d0f0b; font-family: var(--f-body); }
.tip-box { border-radius: 2px; border-color: var(--gold-3); background: rgba(111, 154, 138, .08); }

/* DM kartı ve rozetler */
.hero-card.dm { background: linear-gradient(135deg, rgba(168, 55, 44, .14), transparent 60%), var(--walnut); }
.tag, .badge, .chip { border-radius: 2px; }


/* Savaş sırası: karta bölünmüş liste yerine defter gibi satırlı sıra. Pirinç yalnızca sırası gelende. */
.combat-panel { padding: .7rem .8rem; border-color: rgba(168, 55, 44, .6); background: linear-gradient(180deg, rgba(88, 28, 22, .35), transparent 120px), var(--walnut); }
.cp-head h2 { font-size: 1.3rem; font-weight: 400; color: var(--parch); }
.init-list { gap: 0; }
.init { gap: .6rem; padding: .55rem .4rem .55rem .5rem; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 0; background: none; align-items: center; }
.init b { font-size: 1.05rem; font-weight: 400; }
.init.enemy { border-left-color: var(--wax-2); }
.init.npc { border-left-color: var(--blue); }
.init.pc { border-left-color: var(--verd); }
.init.current { transform: none; box-shadow: none; border-left-color: var(--brass); background: rgba(183, 138, 61, .16); }
.init.current b { color: #f1d9a0; }
.init-n { min-width: 2rem; height: auto; border: 0; background: none; font: 700 1.35rem/1 var(--f-body); color: var(--parch-2); text-align: center; }
.init.current .init-n { color: var(--brass); }
.state { font: 700 .85rem/1 var(--f-body); letter-spacing: 0; }
.cb-ctl .link-btn { font-size: .9rem; }
.cb-box { border-radius: 2px; background: rgba(0, 0, 0, .28); }
.cb-box select { font-size: .85rem; }
.cp-foot select { font-size: .9rem; }


/* Karakter oluşturma: okunaklı rakamlar, her zaman erişilebilir "Oluştur" düğmesi */
.cc-ab input, .cc-ab-final b, .cc-form input[type=number], .cc-ab .abbr { font-family: var(--f-body); font-variant-numeric: lining-nums tabular-nums; }
.cc-ab input { font-size: 1.5rem; font-weight: 700; }
.cc-ab .abbr { font-weight: 700; letter-spacing: .04em; }
.cc-form .row.end { position: sticky; bottom: -1.2rem; margin: 1rem -1.2rem -1.2rem; padding: .8rem 1.2rem; background: var(--walnut); border-top: 1px solid var(--line-2); z-index: 2; }
.cc-h { font: 400 1.25rem/1.2 var(--f-head); color: var(--parch); margin: 1.4rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.cc-h small { font: 400 .95rem/1 var(--f-body); color: var(--muted); }
.pick { border-radius: 2px; }
.pick:has(input:checked) { background: rgba(111, 154, 138, .14); border-color: var(--verd); }

/* DM: başlık şeridi harita araçlarının üstüne binmesin */
.stage-banner { left: .8rem; transform: none; top: .6rem; max-width: calc(100% - 17rem); overflow: hidden; text-overflow: ellipsis; }



/* =========================================================
   RPG HUD — meşe/vellum temelinin üstüne oyun arayüzü
   Pirinç köşe bağlantıları, hotbar, mühürlü d20 rozetleri,
   vellum görev defteri. Renkler Meşe Masa paletinden.
   ========================================================= */
:root {
  --fit-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg transform=''%3E%3Cpath d='M1 1h20v5H6v15H1z' fill='%237a5a2a' stroke='%231a100a' stroke-width='1'/%3E%3Cpath d='M2 2h18v2H4v16H2z' fill='%23c99a4c' fill-opacity='.55'/%3E%3Ccircle cx='3.6' cy='3.6' r='1.5' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.6'/%3E%3Ccircle cx='14' cy='3.6' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3Ccircle cx='3.6' cy='14' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3C/g%3E%3C/svg%3E"); --fit-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg transform='translate(22 0) scale(-1 1)'%3E%3Cpath d='M1 1h20v5H6v15H1z' fill='%237a5a2a' stroke='%231a100a' stroke-width='1'/%3E%3Cpath d='M2 2h18v2H4v16H2z' fill='%23c99a4c' fill-opacity='.55'/%3E%3Ccircle cx='3.6' cy='3.6' r='1.5' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.6'/%3E%3Ccircle cx='14' cy='3.6' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3Ccircle cx='3.6' cy='14' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3C/g%3E%3C/svg%3E"); --fit-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg transform='translate(0 22) scale(1 -1)'%3E%3Cpath d='M1 1h20v5H6v15H1z' fill='%237a5a2a' stroke='%231a100a' stroke-width='1'/%3E%3Cpath d='M2 2h18v2H4v16H2z' fill='%23c99a4c' fill-opacity='.55'/%3E%3Ccircle cx='3.6' cy='3.6' r='1.5' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.6'/%3E%3Ccircle cx='14' cy='3.6' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3Ccircle cx='3.6' cy='14' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3C/g%3E%3C/svg%3E"); --fit-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg transform='translate(22 22) scale(-1 -1)'%3E%3Cpath d='M1 1h20v5H6v15H1z' fill='%237a5a2a' stroke='%231a100a' stroke-width='1'/%3E%3Cpath d='M2 2h18v2H4v16H2z' fill='%23c99a4c' fill-opacity='.55'/%3E%3Ccircle cx='3.6' cy='3.6' r='1.5' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.6'/%3E%3Ccircle cx='14' cy='3.6' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3Ccircle cx='3.6' cy='14' r='1' fill='%23e8c27a' stroke='%232a1a0d' stroke-width='.5'/%3E%3C/g%3E%3C/svg%3E");
  --fittings: var(--fit-tl) top left / 22px no-repeat, var(--fit-tr) top right / 22px no-repeat, var(--fit-bl) bottom left / 22px no-repeat, var(--fit-br) bottom right / 22px no-repeat;
  --vellum-bg: var(--noise), radial-gradient(120% 100% at 50% 40%, #d9c9a0 0%, var(--vellum) 60%, var(--vellum-2) 100%);
}

/* Paneller: ceviz levha + pirinç köşe bağlantıları, iç kertik çizgisi */
.frame { outline: 1px solid rgba(0, 0, 0, .45); outline-offset: -5px; box-shadow: inset 0 0 0 4px rgba(205, 189, 148, .05), 3px 4px 0 rgba(0, 0, 0, .35); }
.frame::before { display: block; content: ''; position: absolute; inset: -3px; width: auto; height: auto; border: 0; transform: none; top: -3px; left: -3px; background: var(--fittings); pointer-events: none; z-index: 1; }
.frame.inner::before, .frame.inner::after { display: none; }
.panel-h { border-bottom: 0; padding-bottom: .45rem; margin-bottom: .9rem; background: linear-gradient(90deg, rgba(183, 138, 61, .55), rgba(183, 138, 61, .1) 70%, transparent) bottom / 100% 1px no-repeat, linear-gradient(90deg, rgba(0, 0, 0, .5), transparent 70%) 0 calc(100% - 1px) / 100% 1px no-repeat; }
.panel-h .ic { color: var(--brass); }

/* Harita: meşe çerçevenin köşelerine pirinç levhalar */
.stage::before { display: block; content: ''; position: absolute; inset: -2px; z-index: 5; pointer-events: none; background: var(--fittings); }
.drawer { outline: 1px solid rgba(0, 0, 0, .45); outline-offset: -5px; }
.drawer::before { content: ''; position: absolute; inset: -3px; pointer-events: none; z-index: 2; background: var(--fittings); }
.drawer-head { background: linear-gradient(180deg, #3a2a1c, #2b1e15); border-bottom: 1px solid rgba(183, 138, 61, .35); }
.drawer-head h2 { font-weight: 400; font-size: 1.35rem; }
.modal::before { content: ''; position: absolute; inset: -3px; pointer-events: none; z-index: 2; background: var(--fittings); }
.modal { position: relative; }

/* Hotbar: alt çubuk RPG yetenek yuvaları gibi */
.toolbar { gap: .3rem; align-self: center; margin: .7rem auto .6rem; padding: .35rem .55rem; border-radius: 2px; background: var(--noise), linear-gradient(180deg, #2f2217, #1f160f); border: 1px solid #0d0906; box-shadow: inset 0 0 0 1px rgba(205, 189, 148, .14), 3px 4px 0 rgba(0, 0, 0, .4); position: relative; }
.toolbar::before { content: ''; position: absolute; inset: -3px; pointer-events: none; background: var(--fittings); }
.tb-btn { min-width: 62px; padding: .45rem .35rem .35rem; border: 1px solid #0d0906; background: linear-gradient(180deg, #1a120c, #241910); box-shadow: inset 0 0 0 1px rgba(205, 189, 148, .1), inset 0 2px 6px rgba(0, 0, 0, .6); color: var(--parch-2); font-size: .82rem; }
.tb-btn .ic { width: 22px; height: 22px; color: var(--vellum); }
.tb-btn:hover { background: linear-gradient(180deg, #241910, #33251a); color: var(--parch); }
.tb-btn.on { background: linear-gradient(180deg, #3a2a1b, #2b1e15); border-color: #0d0906; box-shadow: inset 0 0 0 1px var(--brass), 0 0 10px rgba(183, 138, 61, .25); color: #f1d9a0; }
.tb-btn.on .ic { color: var(--brass); }
.tb-dice { width: 64px; height: 64px; margin: -20px .45rem -6px; border: 3px solid #1a100a; background: radial-gradient(circle at 38% 30%, #c4574a, var(--wax) 55%, #5e1a14); box-shadow: 0 0 0 2px var(--brass), 0 0 0 4px #1a100a, 0 4px 0 #0d0906; }
.tb-dice:hover { box-shadow: 0 0 0 2px #e0b765, 0 0 0 4px #1a100a, 0 4px 0 #0d0906, 0 0 18px rgba(196, 87, 74, .5); }

/* Kronik: zar sonucu mühürlü d20 */
.roll-card { border-radius: 2px; background: var(--walnut); border: 1px solid rgba(205, 189, 148, .18); border-left: 3px solid var(--accent, var(--verd)); box-shadow: 2px 3px 0 rgba(0, 0, 0, .35); }
.rc-name { color: var(--accent, var(--verd)); letter-spacing: .02em; text-transform: none; font: 700 .9rem/1.2 var(--f-body); }
.rc-type { font: 400 1.05rem/1.2 var(--f-head); }
.rc-total { isolation: isolate; width: 54px; min-width: 54px; height: 60px; padding: 0; border: 0; border-radius: 0; box-shadow: none; color: #f6e8cf; text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
  clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); background: linear-gradient(160deg, #e0b765, var(--brass) 45%, #5e441a); font-size: 1.4rem; }
.rc-total::before { content: ''; position: absolute; inset: 2px; z-index: -1; clip-path: inherit; background: radial-gradient(circle at 45% 30%, #6b2a22, #2a0f0b 75%); }
.rc-total small { top: 6px; right: 10px; font-size: .62rem; }
.roll-card.crit-s { border-color: var(--brass); box-shadow: 2px 3px 0 rgba(0, 0, 0, .35), 0 0 16px rgba(183, 138, 61, .3); }
.roll-card.crit-s .rc-total { background: linear-gradient(160deg, #fff0c2, #e0b765 50%, #8a6a2a); color: #1f1710; text-shadow: 0 1px 0 rgba(255, 244, 210, .6); }
.roll-card.crit-s .rc-total::before { background: radial-gradient(circle at 45% 30%, #f1d9a0, var(--brass) 75%); }
.roll-card.crit-f .rc-total { background: linear-gradient(160deg, #e06a5a, var(--wax)); }
.roll-card.crit-f .rc-total::before { background: radial-gradient(circle at 45% 30%, #2a1012, #0e0606 75%); }

/* Görev defteri ve günlük: vellum sayfalar */
.journal-entry, .quest { border-radius: 2px; border: 1px solid #8f7d52; background: var(--vellum-bg); color: var(--ink-dark); box-shadow: inset 0 0 24px rgba(90, 60, 20, .3), 3px 4px 0 rgba(0, 0, 0, .4); padding: .9rem 1.1rem; }
.journal-entry h4, .quest h4 { color: #4a1a14; font-weight: 400; font-size: 1.15rem; }
.journal-entry p, .quest p { color: var(--ink-dark); }
.journal-entry .muted, .journal-entry .link-btn, .quest .q-status, .quest .rewards { color: #5b4a2a; }
.journal-entry .tag, .quest .tag { color: #5b4a2a; border-color: rgba(91, 74, 42, .45); background: rgba(255, 255, 255, .18); }
.quest .tag.gold { color: var(--wax); border-color: rgba(142, 43, 34, .5); }
.quest .objectives .box { border-color: #8f7d52; color: var(--wax); }
.quest .objectives li.secret { color: var(--wax); }
.quest .objectives li.done { color: #7a6a4a; }
.scene-card { border-radius: 2px; background: var(--vellum-bg); border: 1px solid #8f7d52; box-shadow: 2px 3px 0 rgba(0, 0, 0, .35); }
.scene-card h4 { color: #4a1a14; font-weight: 400; }
.scene-card p { color: var(--ink-dark); }
.scene-card .eyebrow { color: #5b4a2a; }

/* Portreler: pirinç halka */
.avatar { box-shadow: 0 0 0 2px #1a100a, 0 0 0 3.5px #8a6a3a, 0 0 0 4.5px #1a100a, 2px 3px 0 rgba(0, 0, 0, .35); }

/* Durum çipleri: ikonlu, renkli */
.chip.cond { --cc: #d6a35c; gap: .25rem; padding: .12rem .5rem .12rem .3rem; color: color-mix(in srgb, var(--cc) 80%, #fff 20%); border-color: color-mix(in srgb, var(--cc) 50%, transparent); background: color-mix(in srgb, var(--cc) 12%, rgba(0, 0, 0, .4)); font-weight: 700; cursor: help; }
.chip.cond .ic { width: 13px; height: 13px; color: var(--cc); }
.chip.cond button .ic { width: 10px; height: 10px; color: inherit; }

/* Sahne metni kaydırınca yumuşak kesilsin */
.scene-desc { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent); padding-bottom: .9rem; scrollbar-width: thin; scrollbar-color: #8f7d52 transparent; }
.tb-nav a { white-space: nowrap; }

/* =========================================================
   ZAR GEÇMİŞİ
   ========================================================= */
.dicelog { display: flex; flex-direction: column; gap: 1.2rem; }
.dl-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.dl-filters select { width: auto; min-width: 180px; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.award { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-items: center; padding: .75rem .85rem; border-radius: 2px; background: linear-gradient(180deg, #33251a, #241910); border: 1px solid #0d0906; box-shadow: inset 0 0 0 1px rgba(205, 189, 148, .14), 3px 4px 0 rgba(0, 0, 0, .35); }
.award > .ic { grid-row: 1 / 4; width: 36px; height: 36px; padding: 7px; border-radius: 50%; color: #1f1710; background: radial-gradient(circle at 38% 30%, #f1d9a0, var(--brass) 60%, #6b4f1f); box-shadow: 0 0 0 2px #1a100a; }
.award:nth-child(3) > .ic { background: radial-gradient(circle at 38% 30%, #c4574a, var(--wax) 60%, #5e1a14); color: #f6e8cf; }
.aw-t { font: 500 .85rem/1.2 var(--f-body); color: var(--muted); }
.award b { font: 400 1.1rem/1.2 var(--f-head); color: var(--parch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.award small { font: 700 .85rem/1.2 var(--f-body); color: #f1d9a0; font-variant-numeric: lining-nums; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.dl-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: lining-nums tabular-nums; }
.dl-table th { text-align: left; font: 500 .8rem/1.2 var(--f-body); color: var(--muted); padding: .35rem .4rem; border-bottom: 1px solid var(--line-2); }
.dl-table td { padding: .42rem .4rem; border-bottom: 1px solid var(--line); }
.dl-table tbody tr { cursor: pointer; }
.dl-table tbody tr:hover { background: rgba(205, 189, 148, .06); }
.dl-table tbody tr.on { background: rgba(183, 138, 61, .14); box-shadow: inset 3px 0 0 var(--brass); }
.dl-who { display: inline-flex; align-items: center; gap: .5rem; color: var(--parch); }
.dl-who .avatar { box-shadow: 0 0 0 1.5px #1a100a, 0 0 0 2.5px #8a6a3a; }
.dl-avg { font-weight: 700; }
.dl-avg.hot { color: #f1d9a0; }
.dl-avg.cold { color: var(--gold-2); }
.dl-table .n20 { color: #f1d9a0; font-weight: 700; }
.dl-table .n1 { color: #e88a7c; font-weight: 700; }
.dl-dist { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; align-items: end; height: 150px; padding: .6rem .5rem .25rem; border-radius: 2px; background: rgba(0, 0, 0, .3); border: 1px solid #0d0906; box-shadow: inset 0 0 0 1px rgba(205, 189, 148, .1), inset 0 2px 8px rgba(0, 0, 0, .5); }
.dl-dist .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.dl-dist .bar i { display: block; width: 100%; min-height: 2px; background: linear-gradient(180deg, var(--verd), var(--gold-3)); transition: height .4s var(--ease); }
.dl-dist .bar.twenty i { background: linear-gradient(180deg, #f1d9a0, var(--brass)); }
.dl-dist .bar.one i { background: linear-gradient(180deg, #c4574a, var(--wax)); }
.dl-dist .bar span { font: 500 .62rem/1 var(--f-body); color: var(--dim); font-variant-numeric: lining-nums; }
.dl-dist .bar.twenty span { color: #f1d9a0; }
.dl-dist .bar.one span { color: #e88a7c; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dl-row { display: grid; grid-template-columns: 52px minmax(80px, 150px) minmax(0, 1fr) minmax(0, auto) 44px 80px; gap: .6rem; align-items: center; padding: .4rem .6rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--accent); font-size: .92rem; font-variant-numeric: lining-nums tabular-nums; }
.dl-row time { font-size: .78rem; color: var(--dim); }
.dl-name { font-weight: 700; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-label { color: var(--parch-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-dice { display: inline-flex; align-items: center; gap: 3px; }
.dl-dice b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 2px; background: #3d2d1f; border: 1px solid #0d0906; font: 700 .8rem/1 var(--f-body); color: var(--parch); }
.dl-dice b.max { background: var(--brass); color: #1f1710; }
.dl-dice b.min { background: var(--wax); color: #f6e8cf; }
.dl-dice code { font-size: .72rem; color: var(--dim); margin-left: .3rem; white-space: nowrap; }
.dl-total { font: 700 1.15rem/1 var(--f-body); color: var(--parch); text-align: right; }
.dl-row.crit-s { background: rgba(183, 138, 61, .12); }
.dl-row.crit-f { background: rgba(142, 43, 34, .16); }
.dl-row .rc-out { justify-self: end; font-size: .72rem; }
.panel-h small { font: 400 .85rem/1 var(--f-body); }
@media (max-width: 900px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-row { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .dl-row .dl-label, .dl-row .dl-dice, .dl-row .rc-out { display: none; }
}
.cp-head { flex-wrap: wrap; }
.awards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
