:root {
  --ink: #24160d;
  --paper: #efe1bf;
  --paper-2: #e4d0a2;
  --paper-3: #cdb07a;
  --wood-0: #120a05;
  --wood-1: #1f130b;
  --wood-2: #3a2416;
  --wood-3: #5a371f;
  --brass: #c49a45;
  --brass-2: #e8c877;
  --red: #8e2a22;
  --green: #3d6a34;
  --blue: #23466e;
  --f-display: "Rockwell", "Rockwell Extra Bold", "Roboto Slab", "Georgia", serif;
  --f-body: "Baskerville", "Baskerville Old Face", "Georgia", "Times New Roman", serif;
  --f-data: "American Typewriter", "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: radial-gradient(90% 70% at 50% 40%, #2a1a0f, #0b0603 75%), var(--wood-0); }
body {
  font-family: var(--f-body); color: var(--ink); font-size: 15px;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%; touch-action: manipulation; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }
svg { display: block; }

/* ---------- uygulama çerçevesi ---------- */
#app, #town, #title { max-width: 520px; margin: 0 auto; }
@media (min-width: 560px) {
  #app, #town, #title { box-shadow: 0 0 0 1px rgba(196,154,69,.25), 0 0 60px rgba(0,0,0,.8); }
}
#app {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--wood-1);
}
#hud {
  flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 9px;
  padding: 8px 14px 9px; color: var(--paper);
  background: linear-gradient(#2e1c10, #1f130b); border-bottom: 2px solid #0c0704;
  box-shadow: inset 0 -1px 0 rgba(196, 154, 69, .35);
}
.hud-time { display: flex; flex-direction: column; line-height: 1.05; }
.hud-time b { font-family: var(--f-data); font-size: 21px; color: var(--brass-2); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.hud-time span { font-size: 11.5px; opacity: .75; }
.hud-cash { display: flex; align-items: center; gap: 6px; justify-self: start; padding: 3px 10px 3px 4px; border-radius: 20px; background: rgba(0,0,0,.28); border: 1px solid rgba(196,154,69,.35); }
.hud-cash svg { width: 24px; height: 24px; }
.hud-cash b { font-family: var(--f-data); font-size: 18px; font-variant-numeric: tabular-nums; }
.hud-cash.bump-pos { animation: bumpPos .7s; }
.hud-cash.bump-neg { animation: bumpNeg .7s; }
@keyframes bumpPos { 30% { transform: scale(1.12); background: rgba(61,106,52,.6); } }
@keyframes bumpNeg { 30% { transform: scale(.94); background: rgba(142,42,34,.6); } }
.hud-heat { display: flex; align-items: center; gap: 5px; }
.hud-rep { display: flex; align-items: center; gap: 3px; }
.hud-rep svg { width: 17px; height: 17px; }
.hud-rep span { font-family: var(--f-data); font-size: 13px; color: var(--brass-2); }
.hud-heat svg { width: 18px; height: 18px; }
.heat-bar { width: 34px; height: 7px; border-radius: 4px; background: rgba(0,0,0,.45); overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.heat-bar i { display: block; height: 100%; width: var(--v, 0%); background: linear-gradient(90deg, #7c96c4, #d0543f); transition: width .5s; }
.hud-heat span { font-family: var(--f-data); font-size: 12px; min-width: 16px; opacity: .85; }
.hud-heat.hot svg { animation: siren 1s infinite; }
@keyframes siren { 50% { filter: drop-shadow(0 0 4px #e0503c) hue-rotate(160deg); } }
.hud-debt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; padding-left: 10px; border-left: 1px solid rgba(196,154,69,.3); }
.hud-debt .lbl { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.hud-debt b { font-family: var(--f-data); font-size: 14px; color: #f0c8b8; }
.hud-debt #hDebt { display: flex; flex-direction: column; align-items: flex-end; }
.hud-debt #hDebt span { font-size: 11px; opacity: .8; }
.hud-debt.urgent b { color: #ff8a70; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

#stage { position: relative; flex: 1 1 auto; min-height: 250px; overflow: hidden; background: #33402f; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene .tap { cursor: pointer; }
.svg-sign { font-family: var(--f-display); font-size: 9px; font-weight: 700; fill: var(--red); letter-spacing: .12em; }

/* konuşma balonu */
.speech {
  position: absolute; top: 10px; left: 12px; max-width: min(56%, 270px);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 3px 4px 0 rgba(0,0,0,.35); padding: 0 12px 10px;
  animation: speechIn .25s ease-out;
}
@keyframes speechIn { from { transform: translateY(-6px) scale(.97); opacity: 0; } }
.sp-tag {
  display: flex; align-items: baseline; gap: 6px; margin: 0 -12px 7px; padding: 4px 12px;
  background: var(--tag, #6b4b2c); color: #f6ecd3; border-bottom: 2px solid var(--ink);
}
.sp-tag span:first-child { font-family: var(--f-display); font-weight: 700; font-size: 13.5px; }
.sp-tag small { font-size: 11px; opacity: .85; font-style: italic; }
.pat { margin-left: auto; display: flex; gap: 3px; }
.pat i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid #f6ecd3; opacity: .5; }
.pat i.on { background: #f6ecd3; opacity: 1; }
#spText { margin: 0; font-size: 15px; line-height: 1.34; min-height: 1.3em; }
.speech.wait::after { content: "▸ dokun"; display: block; text-align: right; font-size: 11px; font-style: italic; opacity: .6; animation: pulse 1.2s infinite; }

/* efektler */
#fx { position: absolute; inset: 0; pointer-events: none; }
.float { position: absolute; left: 50%; top: 45%; transform: translateX(-50%); font-family: var(--f-display); font-weight: 700; font-size: 20px;
  text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 10px rgba(0,0,0,.5); animation: floatUp 1.6s ease-out forwards; white-space: nowrap; }
.float.big { font-size: 30px; }
.float.at-hud { top: 6px; font-size: 17px; }
.float.pos { color: #b9e3a0; } .float.neg { color: #ff9b86; } .float.heat { color: #a9c0ea; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -46px); } }

/* ---------- alt panel ---------- */
.panel {
  flex: 0 0 auto; height: 40%; min-height: 236px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(120,80,30,.18), transparent 70%),
    var(--paper);
  border-top: 3px solid var(--ink); box-shadow: 0 -6px 14px rgba(0,0,0,.4);
}
.card { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: stretch; }
.card.small { grid-template-columns: 70px 1fr; }
.card-art {
  position: relative; border: 2px solid var(--ink); border-radius: 3px; background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rar) 26%, #f7ecd0), #e3cf9e 75%);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--rar) 55%, transparent);
  aspect-ratio: 1; max-width: 100%; overflow: hidden;
}
.card-art .item-svg { width: 100%; height: 100%; }
.card.small .card-art { height: 70px; }
.card-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-name { font-family: var(--f-display); font-weight: 700; font-size: 17px; line-height: 1.1; text-wrap: balance; padding-top: 2px; }
.card.small .card-name { font-size: 15px; }
.card-rar { font-size: 12.5px; font-style: italic; }
.card-rar span { font-style: normal; font-weight: 700; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 5px 0 0; font-size: 13.5px; }
.card.small dl { display: none; }
.card dt { opacity: .65; }
.card dd { margin: 0; font-family: var(--f-data); font-size: 13px; }
.card dd.est { font-weight: 700; }
.unk { display: inline-block; width: 18px; text-align: center; border-radius: 3px; background: rgba(36,22,13,.12); font-weight: 700; }
.pos { color: var(--green); } .neg { color: var(--red); } .ink { color: var(--ink); }
.tag-stolen { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--red); padding: 1px 5px; border-radius: 2px; }

.stamp-slot { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stamp {
  font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; padding: 3px 7px;
  border: 3px double currentColor; border-radius: 3px; transform: rotate(-12deg); background: rgba(247,236,208,.82);
  animation: stampIn .35s cubic-bezier(.2,1.6,.4,1) both; white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis;
}
.stamp.pos { color: var(--green); } .stamp.neg { color: var(--red); } .stamp.ink { color: var(--blue); }
@keyframes stampIn { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } }

.tool-anim { position: absolute; width: 44%; color: var(--ink); filter: drop-shadow(1px 2px 0 rgba(0,0,0,.35)); pointer-events: none; }
.tool-anim svg { width: 100%; height: auto; }
.tool-c { animation: lens 1s ease-in-out forwards; }
@keyframes lens { 0% { left: 5%; top: 5%; } 30% { left: 50%; top: 20%; } 60% { left: 15%; top: 50%; } 100% { left: 50%; top: 50%; opacity: 0; } }
.tool-a { left: 28%; top: 30%; animation: rub 1s ease-in-out forwards; }
@keyframes rub { 0%,100% { transform: translateX(-30%); } 25%,75% { transform: translateX(30%); } 50% { transform: translateX(-20%); } 100% { opacity: 0; } }
.tool-p { left: 28%; top: 28%; animation: flip 1s ease-in-out forwards; }
@keyframes flip { 0% { transform: perspective(200px) rotateY(0); } 50% { transform: perspective(200px) rotateY(180deg); } 100% { transform: perspective(200px) rotateY(360deg); opacity: 0; } }

.offer-row { display: flex; gap: 10px; align-items: stretch; }
.offer, .pl { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.35); }
.offer span, .pl span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.offer b { font-family: var(--f-display); font-size: 24px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pl b { font-family: var(--f-data); font-size: 16px; }
.pl.pos { border-color: var(--green); background: rgba(61,106,52,.1); }
.pl.neg { border-color: var(--red); background: rgba(142,42,34,.08); }
.pl.mid { border-style: dashed; }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tool {
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left;
  padding: 6px 7px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper-2); box-shadow: 0 2px 0 var(--ink);
}
.tool svg { grid-row: span 2; width: 26px; height: 26px; color: var(--wood-2); }
.tool span { font-weight: 700; font-size: 12.5px; line-height: 1.1; }
.tool small { font-size: 10.5px; opacity: .7; line-height: 1.1; }
.tool:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.tool:disabled { opacity: .45; box-shadow: none; cursor: default; }

.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  flex: 1 1 0; min-width: max-content; min-height: 44px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 3px;
  background: var(--paper-2); font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  box-shadow: 0 3px 0 var(--ink); transition: transform .06s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: #3d6a34; color: #f5ecd4; }
.btn.danger { background: #efe1bf; color: var(--red); }
.btn.small { min-height: 36px; font-size: 13px; flex: 0 0 auto; }
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.hint { margin: -2px 0 0; font-size: 12.5px; font-style: italic; opacity: .75; }
.warn { margin: 0; font-size: 13px; color: var(--red); font-weight: 700; }
.note { font-size: 15px; padding: 10px 12px; border: 1.5px dashed var(--ink); border-radius: 3px; background: rgba(255,255,255,.3); }
.note.center { text-align: center; font-style: italic; }
.muted { opacity: .65; font-style: italic; margin: 6px 0; }

.haggle { display: flex; flex-direction: column; gap: 9px; }
.hg-label { font-family: var(--f-display); font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.hg-label small { font-family: var(--f-body); font-weight: 400; font-size: 12.5px; opacity: .75; }
.hg-row { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 6px; align-items: center; }
.step { min-width: 44px; min-height: 44px; border: 2px solid var(--ink); border-radius: 3px; background: var(--paper-2); font-family: var(--f-data); font-size: 15px; box-shadow: 0 2px 0 var(--ink); }
.step:active { transform: translateY(2px); box-shadow: none; }
#hgOut { text-align: center; font-family: var(--f-display); font-weight: 700; font-size: 28px; font-variant-numeric: tabular-nums; }
#hgRange { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; }
#hgRange::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #b8a37a, #7a5a36); border: 1.5px solid var(--ink); }
#hgRange::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--brass); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }

.idle-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 2px; text-align: center; }
.idle-wrap p { margin: 0; font-style: italic; opacity: .8; }
.idle-clock { font-family: var(--f-data); font-size: 30px; color: var(--wood-3); }
.idle-wrap .acts { width: 100%; max-width: 280px; margin-top: 6px; }
.seal-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; }
.seal-wrap p { margin: 0; font-style: italic; }
.seal {
  display: inline-grid; place-items: center; min-width: 120px; height: 120px; padding: 0 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c2463a, #7a1c16 70%); color: #f6d9c8; border: 3px solid #5a120e;
  font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-align: center; line-height: 1.1;
  box-shadow: 0 4px 0 #3a0b08, inset 0 0 0 6px rgba(255,255,255,.08); animation: stampIn .45s cubic-bezier(.2,1.6,.4,1) both; transform: rotate(-8deg);
}
.seal.red { background: radial-gradient(circle at 40% 35%, #555, #1c1c1c 70%); border-color: #000; }

#dock {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  padding: 0 8px env(safe-area-inset-bottom, 0px); background: linear-gradient(#24160d, #150d07); border-top: 1px solid rgba(196,154,69,.3);
}
#dock button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border: 0; background: none; color: var(--paper); opacity: .85; }
#dock button svg { width: 24px; height: 24px; color: var(--brass-2); }
#dock button span { font-size: 11.5px; letter-spacing: .06em; }
#dock button:active { opacity: .6; }

/* ---------- sayfalar ---------- */
#sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,5,3,0); transition: background .22s; }
#sheet.open { background: rgba(8,5,3,.62); }
.sheet-card {
  width: 100%; max-width: 560px; max-height: 88%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(120% 60% at 30% 0%, rgba(255,255,255,.35), transparent 60%), var(--paper);
  border-top: 3px solid var(--ink); border-radius: 10px 10px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.5);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.9,.3,1);
}
#sheet.open .sheet-card { transform: none; }
.sh-title { margin: 0; font-family: var(--f-display); font-size: 24px; line-height: 1.1; text-wrap: balance; }
.sh-sub { margin: -6px 0 0; font-style: italic; opacity: .7; }
.sh-h3 { margin: 6px 0 0; font-family: var(--f-display); font-size: 16px; }
.sheet-card p { margin: 0; line-height: 1.4; }
.totals { display: flex; flex-direction: column; border: 2px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.3); }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-top: 1px dashed rgba(36,22,13,.3); }
.totals > div:first-child { border-top: 0; }
.totals span { opacity: .75; }
.totals b { font-family: var(--f-data); font-size: 14px; text-align: right; }
.totals .big b { font-size: 18px; }
.ledger-wrap { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 13px; background: repeating-linear-gradient(transparent 0 25px, rgba(36,22,13,.12) 25px 26px); }
.ledger th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; padding: 4px 4px; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 5px 4px; vertical-align: top; }
.ledger td:first-child { font-family: var(--f-data); font-size: 12px; opacity: .7; }
.ledger .n { text-align: right; font-family: var(--f-data); white-space: nowrap; }

.inv-list { display: flex; flex-direction: column; gap: 7px; }
.inv-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 5px 8px 5px 5px; border: 1.5px solid var(--ink); border-left: 5px solid var(--rar); border-radius: 3px; background: rgba(255,255,255,.35); }
.inv-row svg { width: 52px; height: 52px; }
.inv-n { display: flex; flex-direction: column; min-width: 0; }
.inv-n b { font-family: var(--f-display); font-size: 14.5px; }
.inv-n small { font-size: 12px; opacity: .85; }
.inv-n i { font-style: normal; font-weight: 700; }
.inv-v { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--f-data); font-size: 14px; }
.inv-v small { font-family: var(--f-body); font-size: 10.5px; opacity: .65; }

.crew-list { display: flex; flex-direction: column; gap: 8px; }
.crew-list > .btn { align-self: flex-end; margin-top: -4px; }
.crew-card { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 8px; border: 1.5px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.35); }
.crew-pt { width: 86px; height: 94px; border: 1.5px solid var(--ink); border-radius: 3px; background: radial-gradient(circle at 50% 30%, #6b5a3e, #2a1a0e); overflow: hidden; }
.crew-pt svg { width: 100%; height: 100%; }
.crew-name { font-family: var(--f-display); font-weight: 700; font-size: 16px; }
.crew-role { font-size: 12.5px; font-style: italic; margin-bottom: 3px; }
.stat { display: grid; grid-template-columns: 64px 1fr 14px; gap: 6px; align-items: center; font-size: 12px; }
.stat i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brass) var(--v), rgba(36,22,13,.15) var(--v)); border: 1px solid rgba(36,22,13,.4); }
.stat b { font-family: var(--f-data); font-size: 12px; }
.crew-perk { font-size: 12px; margin-top: 3px; opacity: .8; }
.crew-wage { font-size: 12px; font-family: var(--f-data); margin-top: 2px; }
.panel .crew-card { background: rgba(255,255,255,.25); }

.debts { display: flex; flex-direction: column; gap: 6px; }
.debt { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.3); }
.debt b { font-family: var(--f-data); }
.debt.paid { opacity: .8; }
.debt.paid b { text-decoration: line-through; }
.mini-seal { position: absolute; right: 70px; top: 50%; transform: translateY(-50%) rotate(-10deg); font-style: normal; font-family: var(--f-display); font-weight: 700; font-size: 11px; color: #f6d9c8; background: var(--red); padding: 2px 6px; border-radius: 10px; }

.chance { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.chance span { font-size: 13px; opacity: .75; }
.chance b { font-family: var(--f-display); font-size: 20px; }
.meter { height: 12px; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; background: rgba(36,22,13,.12); }
.meter i { display: block; height: 100%; width: var(--v); background: linear-gradient(90deg, #8e2a22, #c49a45 50%, #3d6a34); transition: width .3s; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.3); text-align: left; }
.pick b { font-family: var(--f-display); }
.pick small { font-size: 12px; opacity: .75; }
.pick.on { background: #3d6a34; color: #f5ecd4; }
.pick:disabled { opacity: .45; }

.paper { padding: 10px 12px; border: 2px solid var(--ink); background: #f3e9cf; box-shadow: 3px 3px 0 rgba(0,0,0,.2); }
.paper-mast { font-family: var(--f-display); font-weight: 700; font-size: 28px; text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 2px; letter-spacing: .02em; }
.paper-date { font-size: 11px; text-align: center; padding: 3px 0; border-bottom: 1px solid var(--ink); font-style: italic; }
.paper-head { font-family: var(--f-display); font-size: 19px; line-height: 1.15; margin: 8px 0 6px; text-wrap: balance; }
.paper-col { font-size: 14px; }
.report { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.end { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 6px; }
.end .totals, .end .acts { width: 100%; }

/* ---------- gece ---------- */
#town { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #241f1a; color: var(--paper);
  padding-top: env(safe-area-inset-top, 0px); animation: fadeIn .6s; }
@keyframes fadeIn { from { opacity: 0; } }
.town-top { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: rgba(10,8,12,.8); border-bottom: 1px solid rgba(196,154,69,.3); }
.town-top b#tDay { font-family: var(--f-display); font-size: 19px; color: var(--brass-2); margin-right: auto; }
.t-stat { font-family: var(--f-data); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.t-stat .coin { width: 14px; height: 14px; border-radius: 50%; background: var(--brass); border: 1.5px solid #000; }
.t-stat.heat b { color: #a9c0ea; }
#townMap { flex: 1 1 auto; width: 100%; min-height: 0; }
.town-bottom { padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(10,8,12,.85); border-top: 1px solid rgba(196,154,69,.3); }
.town-hint { margin: 0 0 6px; font-size: 12.5px; font-style: italic; opacity: .7; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; padding: 4px 10px; border-radius: 14px; background: #3d6a34; border: 1px solid rgba(255,255,255,.2); }
.chip b { font-size: 12.5px; font-family: var(--f-display); }
.chip small { font-size: 10.5px; opacity: .8; }
.chip.busy { background: #6b4b2c; }
.chip.off { background: #3a3a3e; opacity: .8; }
.pin { cursor: pointer; }
.pin .pulse { transform-box: fill-box; transform-origin: center; animation: pinPulse 1.8s ease-out infinite; }
@keyframes pinPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.pin.home .pulse, .pin.bribe .pulse, .pin.recruit .pulse { animation-duration: 2.8s; }
.pin:active > circle:nth-of-type(2) { fill: #fff; }
.svg-label { font-family: var(--f-display); font-size: 10.5px; font-weight: 700; fill: #f3e6c4; }
.svg-badge { font-family: var(--f-data); font-size: 10px; fill: #fff; font-weight: 700; }
.svg-token { font-family: var(--f-display); font-size: 10px; font-weight: 700; fill: #24160d; }
.twin { animation: flicker 5s infinite; }
@keyframes flicker { 0%, 100% { opacity: .95; } 48% { opacity: .95; } 50% { opacity: .5; } 52% { opacity: .9; } 80% { opacity: .75; } }
.star { animation: twinkleS 3s infinite ease-in-out; }
@keyframes twinkleS { 50% { opacity: .2; } }
.wave { animation: waveX 6s linear infinite; }
@keyframes waveX { to { transform: translateX(40px); } }

/* eşya animasyonları */
.twinkle { transform-box: fill-box; transform-origin: center; animation: sparkle 2.4s infinite; }
@keyframes sparkle { 0%, 60%, 100% { transform: scale(0); opacity: 0; } 75% { transform: scale(1); opacity: 1; } }
.flame { transform-box: fill-box; animation: flame .5s infinite alternate ease-in-out; }
@keyframes flame { to { transform: scale(.85, 1.15) skewX(4deg); } }
.steam { animation: steam 2.5s infinite; }
@keyframes steam { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-8px); opacity: 0; } }

/* ---------- açılış ---------- */
#title { position: fixed; inset: 0; z-index: 40; background: #1a110b; overflow: hidden; transition: opacity .5s, transform .5s; }
#title.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
#titleScene { position: absolute; inset: 0; width: 100%; height: 100%; }
.title-logo { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 26px); text-align: center; color: var(--paper); padding: 0 16px; }
.t-kicker { font-family: var(--f-data); font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: var(--brass); }
.title-logo h1 {
  margin: 6px 0 4px; display: flex; flex-direction: column; line-height: 1.08;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 14vw, 68px); letter-spacing: .02em;
  color: #e9c878; text-shadow: 0 2px 0 #5a3a12, 0 4px 0 #2a1a08, 0 0 24px rgba(232,200,120,.25);
}
.title-logo h1 span:last-child { font-size: .78em; letter-spacing: .2em; color: #d8b060; }
.t-tag { margin: 6px auto 0; font-style: italic; font-size: 15px; opacity: .85; max-width: 34ch; text-wrap: balance; }
.title-actions { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
.title-actions .btn { font-size: 18px; min-height: 52px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 700px) {
  .card { grid-template-columns: 84px 1fr; }
  .card dl { font-size: 12.5px; }
  .hint { display: none; }
  #hud { padding-block: 5px 6px; }
}

/* ---------- inceleme masası ---------- */
#bench { position: fixed; inset: 0; z-index: 35; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 12px); background: rgba(8,5,3,0); transition: background .2s; }
#bench.open { background: rgba(8,5,3,.72); }
.bench-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 3px solid var(--ink); border-radius: 6px;
  background: radial-gradient(120% 70% at 30% 0%, rgba(255,255,255,.3), transparent 60%), var(--paper); box-shadow: 0 12px 40px rgba(0,0,0,.6);
  transform: scale(.94); opacity: 0; transition: transform .2s, opacity .2s; }
#bench.open .bench-card { transform: none; opacity: 1; }
.bench-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bench-head b { font-family: var(--f-display); font-size: 20px; }
.bench-head span { font-style: italic; font-size: 13px; opacity: .75; text-align: right; }
.bench-stage { position: relative; width: 100%; aspect-ratio: 1; max-height: 52vh; margin: 0 auto; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; touch-action: none;
  background: radial-gradient(circle at 50% 45%, #5a3a22, #2a180c 80%); cursor: crosshair; }
.bench-art { width: 100%; height: 100%; display: block; }
.blur-layer { position: absolute; inset: 0; filter: blur(3.5px) sepia(.4) brightness(.8); }
.lens { position: absolute; left: 0; top: 0; width: 38%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 5px solid #c49a45; opacity: 0;
  box-shadow: 0 0 0 2px var(--ink), 0 8px 18px rgba(0,0,0,.5), inset 0 0 18px rgba(0,0,0,.4); pointer-events: none; background: #3a2416; }
.lens.on { opacity: 1; }
.lens-in { position: absolute; left: 0; top: 0; }
.lens-in .bench-art { width: 100%; height: 100%; }
.flaw { position: absolute; transform: translate(-50%, -140%); padding: 2px 7px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap;
  color: #fff; background: #3d6a34; border: 1.5px solid var(--ink); animation: stampIn .3s both; pointer-events: none; }
.flaw.bad { background: #8e2a22; }
.flaw::after { content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: inherit; border: 1.5px solid var(--ink); transform: translateY(6px); }
.rub-item { position: absolute; left: 25%; top: 6%; width: 50%; transition: transform .05s; pointer-events: none; z-index: 2; filter: drop-shadow(0 6px 6px rgba(0,0,0,.5)); }
.rub-stone { position: absolute; left: 6%; right: 6%; bottom: 8%; width: 88%; height: 26%; }
.cat-book { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px;
  background: linear-gradient(90deg, #efe2bf 49.5%, #b9a07a 50%, #efe2bf 50.5%); }
.cat-entry { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; border: 1.5px dashed rgba(36,22,13,.45); border-radius: 3px; background: rgba(255,255,255,.35); }
.cat-entry svg { width: 60%; height: auto; }
.cat-entry span { font-family: var(--f-display); font-size: 12.5px; text-align: center; line-height: 1.1; }
.cat-entry small { font-family: var(--f-data); font-size: 10px; opacity: .6; }
.cat-entry.right { background: #3d6a34; color: #f5ecd4; border-style: solid; }
.cat-entry.wrong { animation: shakeX .4s; background: rgba(142,42,34,.18); }
@keyframes shakeX { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.bench-hint { margin: 0; font-size: 14px; line-height: 1.35; min-height: 2.6em; }
.bench-bar { height: 8px; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; background: rgba(36,22,13,.12); }
.bench-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c49a45, #3d6a34); transition: width .2s; }
.bench-card .btn small { font-family: var(--f-body); font-weight: 400; font-size: 12px; opacity: .75; }

/* rehber, geliştirmeler, mezat */
.guide { position: relative; padding: 9px 12px 9px 12px; border: 2px solid #23466e; border-radius: 4px; background: rgba(35,70,110,.1); font-size: 14px; line-height: 1.35; }
.guide b:first-child { display: block; font-family: var(--f-display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #23466e; margin-bottom: 2px; }
.pulse { animation: pulseRing 1.3s infinite; position: relative; z-index: 1; }
@keyframes pulseRing { 0%, 100% { box-shadow: 0 2px 0 var(--ink), 0 0 0 0 rgba(35,70,110,.55); } 50% { box-shadow: 0 2px 0 var(--ink), 0 0 0 7px rgba(35,70,110,0); } }
.upg-list { display: flex; flex-direction: column; gap: 8px; }
.upg { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 11px; border: 1.5px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.35); }
.upg-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.upg-top b { font-family: var(--f-display); font-size: 16px; }
.upg p { margin: 0; font-size: 13.5px; grid-column: 1; }
.upg small { grid-column: 1; font-size: 12px; opacity: .75; font-family: var(--f-data); }
.upg .btn, .upg-max { grid-column: 2; grid-row: 2 / span 2; }
.upg-max { font-family: var(--f-display); color: var(--green); }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.dots i.on { background: var(--brass); }
#auction { position: fixed; inset: 0; z-index: 36; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px calc(env(safe-area-inset-bottom, 0px) + 10px); background: rgba(8,5,3,0); transition: background .25s; }
#auction.open { background: rgba(8,5,3,.8); }
.auc-card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 3px solid var(--ink); border-radius: 6px; background: var(--paper); }
.auc-head { display: flex; justify-content: space-between; align-items: baseline; }
.auc-head b { font-family: var(--f-display); font-size: 20px; }
.auc-head span { font-family: var(--f-data); }
.auc-stage { position: relative; height: 150px; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; background: #3a2416; }
.auc-stage svg { width: 100%; height: 100%; }
.auc-call { position: absolute; left: 8px; top: 8px; max-width: 60%; padding: 5px 9px; background: var(--paper); border: 2px solid var(--ink); border-radius: 3px; font-size: 13.5px; }
.auc-lot { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; }
.auc-art { border: 2px solid var(--ink); border-radius: 3px; background: radial-gradient(circle, color-mix(in srgb, var(--rar) 25%, #f7ecd0), #e3cf9e 75%); aspect-ratio: 1; }
.auc-art svg { width: 100%; height: 100%; }
.auc-est { font-size: 12.5px; font-family: var(--f-data); margin-top: 3px; }
.auc-bid { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.4); }
.auc-bid b { font-family: var(--f-display); font-size: 24px; }
.auc-rivals { display: flex; flex-wrap: wrap; gap: 5px; }
.auc-rivals span { font-size: 12px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--ink); background: rgba(255,255,255,.3); }
.auc-rivals span.lead { background: #8e2a22; color: #fff; }
.auc-count { text-align: center; font-family: var(--f-display); font-size: 18px; min-height: 22px; color: var(--red); }
.auc-sum > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(36,22,13,.3); }
.svg-tabela { font-family: var(--f-display); font-weight: 700; font-size: 12px; fill: #e8c877; letter-spacing: .08em; stroke: #3a2410; stroke-width: .6; paint-order: stroke; }
.svg-tabela2 { font-family: var(--f-data); font-size: 7px; fill: #e8c877; letter-spacing: .2em; }
.svg-note { font-size: 13px; fill: #f3e6c4; stroke: #24160d; stroke-width: .5; paint-order: stroke; }
