:root {
  --f: 'Pixelify Sans', 'Trebuchet MS', sans-serif;
  --wood: #6b4128; --wood-d: #3a2214; --wood-l: #9a6a40;
  --ink: #f1e6d6; --ink-d: #bfae9a; --gold: #ffd86b; --pink: #ff9ad5;
  --paper: #241a2e; --paper-2: #2e2238;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #07060b; color: var(--ink); font-family: var(--f); user-select: none; }
canvas#game { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
canvas#ui { position: absolute; left: 0; top: 0; pointer-events: none; }
.hidden { display: none !important; }
button { font-family: var(--f); cursor: pointer; }

/* ---------- ahşap çerçeve ---------- */
.frame {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border: 4px solid var(--wood);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--wood-d), inset 0 2px 0 3px #ffffff10, 0 0 0 2px var(--wood-d), 0 6px 0 2px #00000066;
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }

#clock { position: absolute; right: 14px; top: 12px; width: 178px; padding: 8px 10px 8px; }
.clk-row { display: flex; align-items: center; gap: 10px; }
#clock-dial { width: 66px; height: 36px; image-rendering: pixelated; }
.clk-txt { flex: 1; text-align: right; }
#clock-day { font-size: 15px; color: var(--ink-d); }
#clock-time { font-size: 26px; font-weight: 700; color: var(--gold); text-shadow: 2px 2px 0 #00000088; line-height: 1; }
#clock-money { margin-top: 7px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 3px 8px; background: #140e1a; border: 2px solid var(--wood-d); border-radius: 4px; }
#money-val { font-size: 20px; font-weight: 700; color: #ffe9a8; letter-spacing: 1px; }
.coin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #d4a237 55%, #8a6a14); box-shadow: 0 0 0 1px #5a4010; }

#energy { position: absolute; right: 18px; bottom: 18px; width: 30px; height: 170px; padding: 0; overflow: hidden; }
#energy-fill { position: absolute; left: 3px; right: 3px; bottom: 3px; max-height: calc(100% - 22px); background: linear-gradient(#b8ff9a, #3fa86a); border-radius: 2px; transition: height .3s; }
.e-label { position: absolute; top: 1px; left: 0; right: 0; text-align: center; font-weight: 700; color: var(--gold); font-size: 14px; }

#questlog { position: absolute; left: 14px; top: 12px; width: 320px; pointer-events: auto; padding: 0; overflow: hidden; }
.ql-head { display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; background: linear-gradient(#7a4a2c, #5a3420); border-bottom: 2px solid var(--wood-d); }
.ql-title { font-size: 17px; font-weight: 700; color: #ffe9c8; text-shadow: 1px 1px 0 #2a1408; flex: 1; }
.ql-count { background: var(--gold); color: #3a2214; font-weight: 700; font-size: 12px; border-radius: 8px; padding: 0 7px; }
.ql-arrow { color: #ffe9c8; transition: transform .2s; }
.key { font-size: 11px; color: #ffe9c8; border: 1px solid #ffe9c888; border-radius: 4px; padding: 0 4px; }
#questlog.closed .ql-body { display: none; }
#questlog.closed .ql-arrow { transform: rotate(-90deg); }
.ql-body { max-height: 46vh; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.ql-item { padding: 6px 9px 7px; background: #1a1222; border-left: 4px solid #6b4f9a; border-radius: 3px; }
.ql-item.main { border-color: var(--gold); }
.ql-item.tut { border-color: #7dff9a; }
.ql-item.req { border-color: #ffb45a; }
.ql-item.cat { border-color: var(--pink); }
.ql-item.sunak { border-color: #b18cff; }
.ql-item.fest { border-color: #ff6b9a; }
.ql-item.dim { opacity: .7; }
.ql-t { font-size: 14px; font-weight: 700; color: var(--ink); }
.ql-d { font-size: 12.5px; color: var(--ink-d); margin-top: 2px; line-height: 1.3; }

#hotbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 3px; padding: 5px; pointer-events: auto; }
.slot { position: relative; width: 48px; height: 48px; background: #e8c890; border: 2px solid #a8784a; box-shadow: inset 2px 2px 0 #f8e0b0, inset -2px -2px 0 #c89860; border-radius: 3px; cursor: pointer; }
.slot.sel { border-color: #ff4a4a; box-shadow: 0 0 0 2px #ff4a4a, inset 2px 2px 0 #f8e0b0, inset -2px -2px 0 #c89860; }
.slot canvas { width: 36px; height: 36px; position: absolute; left: 4px; top: 4px; image-rendering: pixelated; }
.slot .n { position: absolute; right: 2px; bottom: 0; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.slot .k { position: absolute; left: 3px; top: 0; font-size: 10px; color: #8a5a3a; }
#hotbar-label { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); font-size: 16px; color: var(--ink); text-shadow: 2px 2px 0 #000; white-space: nowrap; }
#help { position: absolute; left: 14px; bottom: 14px; font-size: 12px; color: #a898b8; max-width: 230px; line-height: 1.5; text-shadow: 1px 1px 0 #000; }
#help b { color: var(--gold); font-weight: 500; }
@media (max-width: 1100px) { #help { display: none; } }

/* ---------- Toast ---------- */
#toasts { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 20; }
.toast { padding: 7px 16px; font-size: 15px; background: #241a2ef0; border: 3px solid var(--wood); border-radius: 6px; box-shadow: 0 0 0 2px var(--wood-d), 0 4px 0 #0006; animation: tin .25s ease-out; }
.toast.gold { border-color: #b8862a; color: #ffe9a8; }
.toast.out { opacity: 0; transition: opacity .5s; }
@keyframes tin { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- Diyalog ---------- */
#dialog { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(880px, 96vw); display: flex; gap: 8px; z-index: 10; }
.dlg-main { flex: 1; min-height: 168px; padding: 16px 20px; position: relative; background: linear-gradient(#f3e2c0, #e6cfa4); box-shadow: inset 0 0 0 2px var(--wood-d), inset 0 0 0 5px #f8ecd0, 0 0 0 2px var(--wood-d), 0 6px 0 2px #00000066; }
.dlg-text { font-size: 21px; line-height: 1.45; color: #3a2214; min-height: 60px; }
.dlg-options { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; }
.dlg-options button { text-align: left; padding: 5px 10px 5px 8px; font-size: 18px; color: #4a2e1a; background: transparent; border: 2px solid transparent; border-radius: 4px; }
.dlg-options button .arrow { display: inline-block; width: 20px; color: transparent; }
.dlg-options button.sel { background: #d9b884; border-color: #a8784a; color: #2a1408; }
.dlg-options button.sel .arrow { color: #c0392b; }
.dlg-next { position: absolute; right: 14px; bottom: 8px; color: #8b2e1f; font-size: 16px; animation: bob 0.7s infinite alternate; }
@keyframes bob { to { transform: translateY(4px); } }
.dlg-side { flex: 0 0 170px; display: flex; flex-direction: column; align-items: center; padding: 8px; }
.dlg-portrait { width: 140px; height: 120px; background: radial-gradient(#3e2c52, #18101f); border: 3px solid var(--wood-d); border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.dlg-portrait canvas { width: 102px; height: 126px; image-rendering: pixelated; margin-bottom: -6px; }
.dlg-name { margin-top: 6px; width: 100%; text-align: center; font-size: 19px; font-weight: 700; color: #3a2214; background: linear-gradient(#f3e2c0, #dcc090); border: 2px solid var(--wood-d); border-radius: 4px; padding: 2px 4px; }
.dlg-sub { margin-top: 4px; font-size: 12px; text-align: center; color: var(--ink-d); line-height: 1.2; }
.dlg-sub .h { color: #ff6b9a; } .dlg-sub .e { color: #4a3a58; }

/* ---------- Paneller ---------- */
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, 94vw); max-height: 86vh; display: flex; flex-direction: column; z-index: 12; padding: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: linear-gradient(#7a4a2c, #5a3420); border-bottom: 3px solid var(--wood-d); }
.panel-title { font-size: 22px; font-weight: 700; color: #ffe9c8; flex: 1; text-shadow: 2px 2px 0 #2a1408; }
.panel-money { color: #ffe9a8; font-size: 17px; }
.panel .close { background: #3a2214; border: 2px solid #2a1408; color: #ffe9c8; font-size: 16px; width: 30px; height: 30px; border-radius: 4px; }
.panel .close:hover { background: #8b2e1f; }
.tabs { display: flex; gap: 4px; padding: 8px 16px 0; }
.tabs button { padding: 6px 16px; font-size: 15px; background: #1a1222; color: var(--ink-d); border: 2px solid var(--wood-d); border-bottom: none; border-radius: 6px 6px 0 0; }
.tabs button.on { background: #e6cfa4; color: #3a2214; }
.panel-list { overflow-y: auto; padding: 12px 16px 16px; display: grid; gap: 7px; }
.row { display: flex; align-items: center; gap: 12px; padding: 7px 10px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 4px; font-size: 15px; }
.row canvas { width: 36px; height: 36px; image-rendering: pixelated; background: #e8c890; border: 2px solid #a8784a; border-radius: 3px; padding: 1px; }
.row .nm { flex: 1; }
.row .nm b { color: var(--ink); font-weight: 500; }
.row .nm div { font-size: 12.5px; color: #9a8aaa; }
.row .pr { color: var(--gold); min-width: 80px; text-align: right; }
.row button, .bundle button { padding: 5px 14px; font-size: 15px; background: linear-gradient(#8a5a34, #6b4128); color: #ffe9c8; border: 2px solid var(--wood-d); border-radius: 4px; }
.row button:disabled, .bundle button:disabled { opacity: .35; cursor: default; }
.row button:not(:disabled):hover, .bundle button:hover { filter: brightness(1.2); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 8px; }
.card { display: flex; gap: 12px; padding: 10px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 6px; }
.card.romance { border-color: #6a2a5a; }
.card canvas { width: 68px; height: 84px; image-rendering: pixelated; flex: 0 0 auto; background: radial-gradient(#3e2c52, #140f1c); border: 2px solid var(--wood-d); border-radius: 4px; }
.card .info { font-size: 13px; line-height: 1.45; color: #c9bfdc; }
.card .info b.n { font-size: 18px; color: var(--pink); }
.card .info .tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: #2e2238; color: #b8a8d8; margin-left: 4px; }
.card .info .hearts { color: #ff6b9a; letter-spacing: 1px; }
.card .info .k { color: var(--gold); }
.group-title { font-size: 17px; color: #c084fc; margin: 8px 0 2px; font-weight: 700; grid-column: 1 / -1; }
.quest { padding: 9px 12px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 4px; font-size: 14px; color: #c9bfdc; }
.quest b { color: var(--gold); font-size: 15px; }
.quest.done { opacity: .55; }
.quest.done b::after { content: '  ✓'; color: #7dff9a; }

/* ---------- Fener Sunağı ---------- */
.sunak-intro { font-size: 14px; color: var(--ink-d); line-height: 1.4; padding: 2px 2px 6px; }
.bundle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: #1a1222; border: 2px solid #3a2a48; border-left: 5px solid var(--fc); border-radius: 4px; }
.bundle.done { background: #1e1a14; border-color: #5a4a20; border-left-color: var(--fc); }
.b-head { display: flex; align-items: center; gap: 8px; width: 100%; }
.b-head b { font-size: 17px; color: var(--ink); }
.b-rew { margin-left: auto; font-size: 12.5px; color: var(--gold); }
.bundle.done .b-head b::after { content: ' ✓ yandı'; color: #7dff9a; font-size: 13px; }
.flame { width: 12px; height: 16px; border-radius: 50% 50% 40% 40%; background: #333; box-shadow: none; }
.bundle.done .flame { background: var(--fc); box-shadow: 0 0 10px var(--fc), 0 0 20px var(--fc); animation: flick .4s infinite alternate; }
@keyframes flick { to { transform: scaleY(1.15); } }
.b-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.b-it { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 8px 4px 4px; background: #241a2e; border: 2px solid #3a2a48; border-radius: 4px; }
.b-it canvas { width: 28px; height: 28px; image-rendering: pixelated; background: #e8c890; border: 2px solid #a8784a; border-radius: 3px; }
.b-it small { color: #8a7a9a; }
.b-it.ok { border-color: #3fa86a; }
.b-it.ok span { color: #9dffa8; }

/* ---------- Başlık ---------- */
#title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30; background: radial-gradient(ellipse at center, #07060b44, #07060bdd 75%); }
.title-box { width: 390px; text-align: center; padding: 24px 28px; }
.title-eyes { color: #ff3b5c; font-size: 18px; letter-spacing: 12px; text-shadow: 0 0 10px #ff3b5c; animation: blink 4s infinite; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: 0; } }
#title h1 { font-size: 52px; font-weight: 700; color: #e8d8ff; text-shadow: 0 0 18px #9b6bff, 3px 3px 0 #2b1f4a; letter-spacing: 2px; }
.subtitle { color: #b18cff; margin-bottom: 14px; font-size: 17px; }
#new-game { display: flex; flex-direction: column; gap: 6px; text-align: left; }
#new-game label { font-size: 13px; color: var(--ink-d); margin-top: 6px; }
#name-input { padding: 8px 10px; font-size: 18px; font-family: var(--f); background: #f3e2c0; color: #3a2214; border: 3px solid var(--wood-d); border-radius: 4px; outline: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches div { width: 28px; height: 28px; border-radius: 4px; border: 3px solid var(--wood-d); cursor: pointer; }
.swatches div.on { border-color: var(--gold); box-shadow: 0 0 8px var(--gold); }
.pills { display: flex; gap: 6px; }
.pills button { flex: 1; padding: 5px; font-size: 15px; background: #1a1222; color: var(--ink-d); border: 2px solid var(--wood-d); border-radius: 4px; }
.pills button.on { background: #e6cfa4; color: #3a2214; }
.title-preview { display: flex; justify-content: center; margin: 6px 0; }
.title-preview canvas { width: 68px; height: 84px; image-rendering: pixelated; }
button.big { padding: 10px; font-size: 20px; font-weight: 700; color: #3a2214; background: linear-gradient(#ffe08a, #d4a237); border: 3px solid var(--wood-d); border-radius: 6px; margin-top: 4px; box-shadow: 0 4px 0 #2a1408; }
button.big.alt { color: #ffe9c8; background: linear-gradient(#8a5a34, #6b4128); }
button.big:hover { filter: brightness(1.1); }
button.big:active { transform: translateY(2px); box-shadow: 0 2px 0 #2a1408; }

#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s; z-index: 25; }
#fade.on { opacity: 1; }

/* ---------- Kalpler butonu ---------- */
#btn-social { position: absolute; right: 14px; top: 148px; width: 178px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; pointer-events: auto; color: #ffe9c8; font-size: 16px; }
#btn-social .bh { color: #ff6b9a; font-size: 20px; text-shadow: 0 0 8px #ff6b9a; }
#btn-social span:nth-child(2) { flex: 1; text-align: left; font-weight: 700; }
#btn-social:hover { filter: brightness(1.2); }

/* ---------- Kalpler paneli ---------- */
.srow { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 4px; }
.srow.rom { border-color: #5a2a4a; }
.srow > canvas { width: 68px; height: 60px; image-rendering: pixelated; flex: 0 0 auto; background: radial-gradient(#3e2c52, #140f1c); border: 2px solid var(--wood-d); border-radius: 4px; }
.s-name { width: 150px; flex: 0 0 auto; }
.s-name b { font-size: 18px; color: var(--ink); }
.srow.rom .s-name b { color: var(--pink); }
.s-role { font-size: 12px; color: #8a7a9a; }
.chip { display: inline-block; margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 4px; background: #2e2238; color: #c9b0ff; vertical-align: middle; }
.chip.rom { color: #ff9ad5; } .chip.wed { background: #6b2150; color: #ffe9f2; } .chip.bd { background: #b8862a; color: #2a1408; font-weight: 700; margin: 0; }
.s-mid { flex: 1; }
.hearts { display: flex; gap: 2px; }
.hrt { width: 18px; height: 16px; display: inline-block; background: linear-gradient(90deg, #ff4a7a var(--f), #3a2a48 var(--f));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h2v1h1V0h2v1h1v2H6v1H5v1H4v1H3V5H2V4H1V3H0V1h1z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h2v1h1V0h2v1h1v2H6v1H5v1H4v1H3V5H2V4H1V3H0V1h1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.s-taste { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; min-height: 22px; }
.tst { display: inline-flex; padding: 1px; border-radius: 3px; border: 2px solid; }
.tst canvas { width: 18px; height: 18px; image-rendering: pixelated; }
.tst.love { border-color: #ff4a7a; background: #4a1a2a; } .tst.like { border-color: #3fa86a; background: #1a3a2a; } .tst.dis { border-color: #6a6a72; background: #2a2a30; opacity: .7; }
.unk { font-size: 12px; color: #6a5a7a; font-style: italic; }
.s-right { width: 150px; flex: 0 0 auto; text-align: right; }
.bdt { font-size: 13px; color: var(--ink-d); }
.ticks { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.ticks span { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #241a2e; color: #5a4a6a; border: 1px solid #3a2a48; }
.ticks span.on { background: #1e3a2a; color: #9dffa8; border-color: #3fa86a; }
.ticks span.on::before { content: '✓ '; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cday { position: relative; height: 78px; background: #e6cfa4; border: 2px solid var(--wood-d); border-radius: 3px; color: #3a2214; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; }
.cday .dn { position: absolute; left: 4px; top: 2px; font-weight: 700; font-size: 14px; }
.cday canvas { width: 46px; height: 40px; image-rendering: pixelated; }
.cday .cn { font-size: 11px; font-weight: 700; padding-bottom: 2px; }
.cday .cn.f { color: #8b2e1f; padding-bottom: 20px; }
.cday.today { box-shadow: inset 0 0 0 3px #ff4a4a; }
.cday.has { background: #f3e2c0; }

/* ---------- Tanıtım turu ---------- */
#cine { position: absolute; inset: 0; pointer-events: none; z-index: 15; }
.cine-bar { position: absolute; left: 0; right: 0; height: 9vh; background: #000; }
.cine-bar.top { top: 0; } .cine-bar.bot { bottom: 0; }
.cine-card { position: absolute; left: 50%; bottom: calc(9vh + 18px); transform: translateX(-50%); width: min(640px, 92vw); padding: 14px 20px 12px; text-align: center; opacity: 0; }
.cine-card.show { animation: cardin 0.8s ease-out forwards; }
@keyframes cardin { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cine-step { font-size: 12px; color: #8a7a9a; }
.cine-title { font-size: 28px; font-weight: 700; color: var(--gold); text-shadow: 2px 2px 0 #2a1408, 0 0 14px #ffb45a66; }
.cine-text { font-size: 17px; line-height: 1.45; color: var(--ink); margin-top: 6px; }
.cine-hint { font-size: 12px; color: #8a7a9a; margin-top: 8px; }

/* ---------- Karakter oluşturma ---------- */
.title-box { width: min(560px, 96vw); max-height: 96vh; overflow-y: auto; }
.cc-wrap { display: flex; gap: 14px; align-items: stretch; }
.cc-fields { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.title-preview { flex: 0 0 160px; flex-direction: column; align-items: center; justify-content: center; padding: 10px 0 6px; margin: 0; background: radial-gradient(#3e2c52, #140f1c 70%); border: 3px solid var(--wood-d); border-radius: 6px; }
.title-preview canvas { width: 136px; height: 168px; }
#preview-name { font-size: 18px; font-weight: 700; color: #fff; padding: 1px 12px; background: #0c0814b8; border: 2px solid #8a7aa6; border-radius: 10px; min-height: 28px; max-width: 150px; overflow: hidden; }
.preview-farm { font-size: 12px; color: var(--gold); min-height: 15px; text-align: center; }
.turn-row { display: flex; gap: 8px; margin-top: 4px; }
.turn-row button, .cycler button { background: #e6cfa4; color: #3a2214; border: 2px solid var(--wood-d); border-radius: 4px; padding: 1px 9px; font-size: 14px; }
.name-row { display: flex; gap: 6px; }
.name-row input { flex: 1; min-width: 0; }
#btn-dice { width: 42px; font-size: 18px; background: #e6cfa4; border: 3px solid var(--wood-d); border-radius: 4px; }
input.txt { padding: 6px 10px; font-size: 16px; font-family: var(--f); background: #f3e2c0; color: #3a2214; border: 3px solid var(--wood-d); border-radius: 4px; outline: none; }
#name-input:focus, input.txt:focus { border-color: var(--gold); }
#name-input.shake { animation: shake .35s; border-color: #c0392b; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.cc-outfit { display: flex; gap: 8px; margin-top: 6px; }
.cc-col { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 4px; min-width: 0; }
.cc-col label { margin: 0 !important; }
.cycler { display: flex; align-items: center; gap: 4px; }
.cycler span { flex: 1; text-align: center; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatches.sm div { width: 20px; height: 20px; border-width: 2px; }

.title-box { overflow-x: hidden; }
.pills { flex-wrap: wrap; }
.pills button { min-width: 64px; }

/* kontroller görev günlüğünün altında */
#help { display: none !important; }
.ql-keys { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px 8px; border-top: 2px solid #3a2a48; font-size: 12px; color: #a898b8; }
.ql-keys b { color: var(--gold); font-weight: 500; }
#questlog.closed .ql-keys { display: none; }

/* dar ekranlara uyum */
.slot { width: clamp(30px, 7.6vw, 48px); height: clamp(30px, 7.6vw, 48px); }
.slot canvas { width: 75%; height: 75%; left: 12%; top: 12%; }
#questlog { width: min(320px, calc(100vw - 230px)); }

/* gizli kod kutusu */
#cheat { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 300px; padding: 14px 16px; z-index: 40; text-align: center; }
#cheat .ch-title { font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
#cheat input { width: 100%; padding: 8px 10px; font-size: 18px; font-family: var(--f); text-align: center; letter-spacing: 2px; background: #f3e2c0; color: #3a2214; border: 3px solid var(--wood-d); border-radius: 4px; outline: none; text-transform: uppercase; }
#cheat .ch-msg { min-height: 18px; font-size: 13px; color: #ff6b6b; margin: 6px 0; }
#cheat .ch-btns { display: flex; gap: 8px; }
#cheat .ch-btns button { flex: 1; padding: 6px; font-size: 16px; color: #ffe9c8; background: linear-gradient(#8a5a34, #6b4128); border: 2px solid var(--wood-d); border-radius: 4px; }
#cheat.shake { animation: shake2 .35s; }
@keyframes shake2 { 25% { transform: translate(calc(-50% - 6px), -50%); } 75% { transform: translate(calc(-50% + 6px), -50%); } }

/* ---------- hava ikonu ---------- */
.day-row { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
#weather-ico { font-size: 15px; filter: drop-shadow(0 0 4px #b18cff); }

/* ---------- eşya bildirimleri ---------- */
#itempops { position: absolute; left: 14px; bottom: 16px; display: flex; flex-direction: column; gap: 5px; z-index: 18; pointer-events: none; }
.ipop { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; font-size: 15px; animation: popin .25s ease-out; }
.ipop canvas { width: 30px; height: 30px; image-rendering: pixelated; background: #e8c890; border: 2px solid #a8784a; border-radius: 3px; }
.ipop .ip-n { color: #9dffa8; font-weight: 700; margin-left: 4px; }
.ipop.out { opacity: 0; transform: translateX(-20px); transition: all .5s; }
@keyframes popin { from { transform: translateX(-30px); opacity: 0; } }

/* ---------- çanta menüsü ---------- */
#invmenu { width: min(760px, 96vw); }
.inv-body { padding: 12px 16px 14px; overflow-y: auto; }
.bag-wrap { display: flex; gap: 14px; }
.bag-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; flex: 1; padding: 8px; background: #3a2214; border-radius: 4px; }
.islot { position: relative; aspect-ratio: 1; background: #e8c890; border: 2px solid #a8784a; box-shadow: inset 2px 2px 0 #f8e0b0, inset -2px -2px 0 #c89860; border-radius: 3px; cursor: pointer; }
.islot:nth-child(-n+10) { margin-bottom: 6px; }
.islot.sel { border-color: #ff4a4a; }
.islot:hover { filter: brightness(1.1); }
.islot canvas { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; image-rendering: pixelated; }
.islot .n { position: absolute; right: 2px; bottom: 0; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.islot .k { position: absolute; left: 2px; top: 0; font-size: 9px; color: #8a5a3a; }
.bag-side { width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: #1a1222; border: 2px solid #3a2a48; border-radius: 4px; }
.bag-side canvas { width: 102px; height: 126px; image-rendering: pixelated; background: radial-gradient(#3e2c52, #140f1c); border: 2px solid var(--wood-d); border-radius: 4px; }
.bs-name { font-size: 18px; font-weight: 700; color: var(--pink); }
.bs-farm { font-size: 12px; color: var(--gold); }
.bs-stat { font-size: 12px; color: var(--ink-d); }
.trash { margin-top: auto; width: 100%; padding: 6px; text-align: center; font-size: 20px; background: #2a1a1a; border: 2px solid #5a2a2a; border-radius: 4px; cursor: pointer; }
.trash span { display: block; font-size: 11px; color: #c08080; }
.trash:hover { background: #4a1a1a; }
.bag-hint { margin-top: 8px; font-size: 12px; color: #8a7a9a; text-align: center; }
#hand-item { position: fixed; width: 40px; height: 40px; pointer-events: none; z-index: 60; }
#hand-item canvas { width: 40px; height: 40px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 #000); }
#hand-item .n { position: absolute; right: 0; bottom: 0; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #000; }
.row.craft .ings { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ing { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 6px 1px 2px; background: #2a1a2a; border: 1px solid #5a2a3a; border-radius: 3px; color: #d08a9a; }
.ing.ok { background: #1a2a1e; border-color: #3fa86a; color: #9dffa8; }
.ing canvas { width: 18px !important; height: 18px !important; background: none !important; border: none !important; padding: 0 !important; }
.row.skill .lv { color: var(--gold); font-size: 14px; margin-left: 6px; }
.pips { display: flex; gap: 3px; margin: 5px 0; }
.pip { width: 14px; height: 14px; background: #2a2038; border: 2px solid #4a3a58; border-radius: 2px; }
.pip.big { width: 18px; }
.pip.on { background: var(--gold); border-color: #b8862a; box-shadow: 0 0 6px #ffd86b88; }
.xpbar { height: 6px; background: #241a2e; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.xpbar span { display: block; height: 100%; background: linear-gradient(90deg, #9b6bff, #ff9ad5); }

/* ---------- balık oyunu ---------- */
#fishgame { position: absolute; left: calc(50% + 60px); top: 50%; transform: translateY(-60%); padding: 8px 8px 6px; z-index: 16; text-align: center; }
#fishgame canvas { width: 92px; height: 300px; image-rendering: pixelated; display: block; }
.fg-title { font-size: 20px; font-weight: 700; color: #ff6b6b; }
.fg-hint { font-size: 11px; color: var(--ink-d); margin-top: 4px; width: 92px; }

/* ---------- gün sonu ---------- */
#summary { width: min(560px, 94vw); }
.sum-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px 14px; border-top: 2px solid #3a2a48; }
.sum-total { flex: 1; font-size: 20px; color: var(--ink); }
.sum-total b { color: var(--gold); }
#sum-ok { padding: 8px 28px; }

/* ---------- mektup ---------- */
#letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 22; background: #00000077; }
.l-paper { width: min(460px, 92vw); padding: 26px 30px 20px; background: linear-gradient(#f3e2c0, #e0c898); border: 4px solid #8a5a34; border-radius: 4px; box-shadow: 0 0 0 3px #3a2214, 0 10px 30px #000; color: #3a2214; position: relative; }
.l-paper::before { content: '✉'; position: absolute; right: 16px; top: 10px; font-size: 22px; color: #8b2e1f; }
.l-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: #6b2150; }
.l-text { font-size: 17px; line-height: 1.5; }
.l-from { text-align: right; margin-top: 8px; font-size: 15px; color: #6b4128; }
.l-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.l-items span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; background: #d9b884; border: 2px solid #a8784a; border-radius: 4px; font-size: 14px; }
.l-items canvas { width: 26px; height: 26px; image-rendering: pixelated; }
#l-ok { margin-top: 14px; width: 100%; }

/* düzeltmeler: dar ekran */
#itempops { bottom: 92px; }
.bag-grid, .islot { min-width: 0; }
.inv-body { overflow-x: hidden; }
@media (max-width: 760px) {
  .bag-wrap { flex-direction: column; }
  .bag-side { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .bag-side canvas { width: 51px; height: 63px; }
  .bag-grid { gap: 2px; padding: 4px; }
  .islot .k { display: none; }
}

/* ---------- hedefler ---------- */
.ql-item.ms { border-color: #ffb45a; background: linear-gradient(90deg, #2a1a14, #1a1222); }
.ms-bar { height: 6px; margin: 5px 0 3px; background: #120c18; border: 1px solid #3a2a48; border-radius: 3px; overflow: hidden; }
.ms-bar span { display: block; height: 100%; background: linear-gradient(90deg, #ffb45a, #ffd86b); }
.ms-num { color: var(--gold); }

/* ---------- duraklatma ---------- */
#btn-pause { position: absolute; right: 14px; top: 198px; width: 178px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; pointer-events: auto; color: #ffe9c8; font-size: 16px; }
#btn-pause .bh { color: var(--gold); font-size: 18px; }
#btn-pause span:nth-child(2) { flex: 1; text-align: left; font-weight: 700; }
#btn-pause:hover { filter: brightness(1.2); }
#pause { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #0a0612aa, #000000dd); backdrop-filter: blur(2px); }
.pz-box { width: min(420px, 92vw); padding: 18px 22px 14px; text-align: center; }
.pz-title { font-size: 30px; font-weight: 700; color: var(--gold); text-shadow: 2px 2px 0 #2a1408, 0 0 14px #ffd86b55; }
.pz-sub { margin: 4px 0 14px; color: var(--ink-d); font-size: 15px; min-height: 18px; }
.pz-opts { display: flex; flex-direction: column; gap: 8px; }
.pz-opt { padding: 9px 12px; font-size: 19px; font-weight: 700; color: #ffe9c8; background: linear-gradient(#5a3420, #3a2214); border: 2px solid var(--wood-d); border-radius: 6px; }
.pz-opt.sel { background: linear-gradient(#8a5a34, #6b4128); color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.pz-opt.sel::before { content: '🐾 '; }
.pz-keys { margin-top: 14px; padding-top: 10px; border-top: 2px dashed #6b412888; font-size: 13px; line-height: 1.6; color: var(--ink-d); }
.pz-keys b { color: var(--gold); }

/* ---------- dar ekran HUD düzeni (sıkışıklık düzeltmesi) ---------- */
@media (max-width: 760px) {
  #clock { right: 8px; top: 8px; width: 150px; padding: 5px 7px 6px; }
  .clk-row { gap: 6px; }
  #clock-dial { width: 52px; height: 28px; }
  #clock-day { font-size: 12px; }
  #clock-time { font-size: 20px; }
  #clock-money { margin-top: 4px; padding: 2px 6px; }
  #money-val { font-size: 15px; }
  .coin { width: 11px; height: 11px; }
  #btn-social, #btn-pause { top: 104px; width: 72px; padding: 4px 6px; gap: 4px; font-size: 13px; justify-content: center; }
  #btn-social { right: 86px; }
  #btn-pause { right: 8px; }
  #btn-social span:nth-child(2), #btn-pause span:nth-child(2) { display: none; }
  #btn-social .bh, #btn-pause .bh { font-size: 16px; }
  #questlog { left: 8px; top: 8px; width: calc(100vw - 174px); max-width: 320px; }
  .ql-head { padding: 6px 8px; gap: 5px; }
  .ql-title { font-size: 15px; }
  #energy { right: 8px; bottom: auto; top: 148px; width: 22px; height: 110px; }
  #toasts { top: 150px; width: calc(100vw - 60px); }
  .toast { font-size: 13px; text-align: center; }
}

/* ---------- 32'lik çanta + ⋯ butonu + çöp ---------- */
.bag-grid { grid-template-columns: repeat(8, 1fr); }
.islot:nth-child(-n+10) { margin-bottom: 0; }
.islot.hot { background: #f0d49c; box-shadow: inset 2px 2px 0 #fff0c8, inset -2px -2px 0 #c89860, 0 0 0 1px #ffd86b88; }
.slot.more { display: flex; align-items: center; justify-content: center; background: #5a3420; border-color: #3a2214; box-shadow: inset 2px 2px 0 #7a4a2c, inset -2px -2px 0 #2a1408; }
.slot.more .dots { font-size: 26px; font-weight: 700; color: #ffe9c8; line-height: 1; margin-top: -6px; }
.slot.more .k { color: #c8a080; }
.slot.more:hover { filter: brightness(1.25); }
.trash.armed { background: #6a1a1a; border-color: #ff6b6b; animation: trashPulse .8s infinite alternate; }
.trash.armed span { color: #ffd0d0; }
@keyframes trashPulse { to { box-shadow: 0 0 10px #ff6b6b; } }
.bag-hint b { color: var(--gold); font-weight: 500; }
.ql-item.ekim { border-color: #6fd47a; background: linear-gradient(90deg, #14261a, #1a1222); }
.ql-item.ekim .ms-bar span { background: linear-gradient(90deg, #4c8a4a, #9dffa8); }

/* güncelleme uyarısı */
#update-banner { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 70; padding: 8px 12px; font-size: 15px; color: #ffe9c8; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; width: max-content; max-width: 94vw; text-align: center; }
#update-banner b { color: var(--gold); }
#update-banner span { font-size: 12px; color: var(--ink-d); }
#update-banner button { padding: 4px 10px; font-size: 14px; color: #3a2214; background: var(--gold); border: 2px solid var(--wood-d); border-radius: 4px; }

/* sınırsız enerji */
#energy.inf #energy-fill { background: linear-gradient(#fff2b0, #ffd86b, #c084fc); animation: infGlow 1.2s infinite alternate; }
#energy.inf .e-label { font-size: 16px; color: #fff2b0; text-shadow: 0 0 6px #ffd86b; }
@keyframes infGlow { to { filter: brightness(1.35); } }

/* ---------- köy haritası ---------- */
#mapmenu { width: min(940px, 96vw); }
.map-wrap { display: flex; gap: 10px; padding: 10px; min-height: 0; overflow: hidden; }
.map-cv { flex: 1; min-width: 0; width: 100%; max-height: 64vh; object-fit: contain; image-rendering: pixelated; border: 3px solid var(--wood-d); border-radius: 4px; background: #0e1a14; cursor: crosshair; }
.map-list { width: 230px; max-height: 64vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.map-group { margin: 6px 0 2px; font-size: 13px; font-weight: 700; color: var(--gold); border-bottom: 1px solid #6b412888; }
.map-item { text-align: left; padding: 5px 8px; font-size: 14px; color: #ffe9c8; background: #2a1d26; border: 2px solid #3a2a30; border-radius: 4px; display: flex; gap: 6px; align-items: center; }
.map-item .mi-ic { width: 18px; text-align: center; }
.map-item.sel { background: #5a3420; border-color: var(--gold); }
.map-item.on { box-shadow: inset 3px 0 0 #c8c8d2; }
.map-item.clear { color: #ffb0b0; background: #3a1a1a; border-color: #6a2a2a; }
@media (max-width: 760px) {
  .map-wrap { flex-direction: column; }
  .map-cv { max-height: 34vh; }
  .map-list { width: 100%; max-height: 30vh; }
}

/* görev → yere götür */
.ql-item.go { cursor: pointer; transition: background .15s; }
.ql-item.go:hover { background: #2a1d36; filter: brightness(1.15); }
.ql-go { margin-right: 4px; font-size: 12px; opacity: .85; }
