:root {
  --night: #10151f; --ink: #2e2118; --paper: #e9dcc0; --paper2: #dccba6; --red: #8a3a2a; --amber: #f0b860;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --serif: 'Alegreya', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); color: #e8e2d2; font-family: var(--serif); font-size: 17px; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }

button.primary { background: var(--ink); color: var(--paper); padding: .6em 1.5em; border-radius: 3px; font-weight: 600; letter-spacing: .02em; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
button.primary:hover { background: #46331f; }
button.primary:active { transform: translateY(1px); }
button.ghost { color: inherit; opacity: .6; text-decoration: underline; padding: .5em; }
button.small { font-size: .85em; display: block; margin: 1.6em auto 0; }

/* --- başlık --- */
#title { text-align: center; padding: 24px; }
.title-inner { max-width: 560px; }
#title .over { font-style: italic; letter-spacing: .14em; opacity: .65; font-size: .9rem; }
#title h1 { font-family: var(--hand); font-weight: 700; font-size: clamp(3.4rem, 13vw, 6.4rem); line-height: .9; margin: .25em 0 .3em; color: #f6e7c4; text-shadow: 0 0 36px rgba(240,184,96,.45), 0 0 90px rgba(240,184,96,.25); }
#title .sub { opacity: .8; line-height: 1.5; margin: 0 0 2em; }
#title button.primary { background: var(--amber); color: #23180c; font-size: 1.1rem; box-shadow: 0 0 34px rgba(240,184,96,.35); }
#title button.primary:hover { background: #ffd08a; }

#title { align-items: flex-start; padding-top: clamp(24px, 9vh, 110px); }
.menu { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.menu button { width: min(78vw, 270px); padding: .62em 1em; border-radius: 4px; font-size: 1.05rem; letter-spacing: .03em; color: #efe6d0; background: rgba(14,20,36,.72); border: 1px solid rgba(236,224,196,.35); transition: background .15s, transform .1s; }
.menu button:hover { background: rgba(40,52,84,.85); border-color: rgba(236,224,196,.7); }
.menu button:active { transform: translateY(1px); }
#title .menu button.primary { border: 0; font-size: 1.25rem; padding: .7em 1em; }
#startInfo { font-family: var(--hand); font-size: 1.15rem; opacity: .8; min-height: 1.2em; margin: -4px 0 4px; }
.ver { position: fixed; right: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); font-size: .75rem; opacity: .4; letter-spacing: .08em; }
html.bigtext { font-size: 118%; }
html, body { font-size: 17px; }
html.bigtext body { font-size: 20px; }

/* --- yükleme ekranı --- */
#loader { transition: opacity .6s ease; }
#loader.out { opacity: 0; pointer-events: none; }
.ld-lantern { overflow: visible; filter: drop-shadow(0 0 22px rgba(240,184,96,.45)); }
.ld-glow { opacity: .16; transform-origin: 60px 88px; animation: ldglow 1.6s ease-in-out infinite; }
.ld-flame { transform-origin: 60px 96px; animation: ldflame .5s ease-in-out infinite alternate; }
@keyframes ldglow { 50% { opacity: .3; transform: scale(1.12); } }
@keyframes ldflame { from { transform: scale(.9, 1.06) rotate(-3deg); } to { transform: scale(1.06, .92) rotate(3deg); } }
.ld-text { font-family: var(--hand); font-size: 1.7rem; letter-spacing: .02em; opacity: .9; }
.ld-bar { width: min(60vw, 240px); height: 5px; border-radius: 3px; background: rgba(236,224,196,.16); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, #d9862f, #ffd27a); transition: width .35s ease; }

/* --- ana menünün açılışı --- */
#title.intro .over { animation: fadeUp .9s calc(var(--d, 1) * .3s) both; }
#title.intro h1 { animation: titleIn calc(var(--d, 1) * 1.7s) calc(var(--d, 1) * .7s) both; }
#title.intro .sub { animation: fadeUp .9s calc(var(--d, 1) * 2.1s) both; }
#title.intro .menu > * { animation: fadeUp .7s both; }
#title.intro .menu > :nth-child(1) { animation-delay: calc(var(--d, 1) * 2.7s); }
#title.intro .menu > :nth-child(2) { animation-delay: calc(var(--d, 1) * 2.85s); }
#title.intro .menu > :nth-child(3) { animation-delay: calc(var(--d, 1) * 3s); }
#title.intro .menu > :nth-child(4) { animation-delay: calc(var(--d, 1) * 3.15s); }
#title.intro .menu > :nth-child(5) { animation-delay: calc(var(--d, 1) * 3.3s); }
#title.intro .ver { animation: fadeUp 1s calc(var(--d, 1) * 3.6s) both; }
#title.quick { --d: .22; }
#title.skip * { animation-duration: .01s !important; animation-delay: 0s !important; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes titleIn { from { opacity: 0; clip-path: inset(-30% 100% -30% -10%); filter: blur(5px); } 35% { opacity: 1; filter: blur(0); } to { clip-path: inset(-30% -20% -30% -10%); } }

/* --- ekranlar arası sis perdesi --- */
#veil { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; opacity: 0; transition: opacity .48s ease; background: radial-gradient(ellipse at 50% 55%, #34446c 0%, #1a2440 45%, #0d1326 100%); }
#veil.on { opacity: 1; }
.veil-in { opacity: 0; transform: translateY(10px); transition: opacity .5s .3s ease, transform .7s .3s ease; }
#veil.on .veil-in { opacity: 1; transform: none; }
#veilTitle { font-family: var(--hand); font-weight: 700; font-size: clamp(3rem, 12vw, 5.5rem); line-height: 1; color: #f6e7c4; text-shadow: 0 0 40px rgba(240,184,96,.45); }
#veilSub { font-family: var(--hand); font-size: clamp(1.2rem, 4vw, 1.7rem); opacity: .8; max-width: 26em; margin-top: .5em; line-height: 1.15; }
@media (prefers-reduced-motion: reduce) { #title.intro * { animation: none !important; } #veil, .veil-in { transition-duration: .01s; } }

/* --- menü pencereleri --- */
#sheet { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,9,18,.72); }
.sheet-box { width: min(100%, 400px); max-height: 100%; overflow-y: auto; background: #151d33; color: #e8e2d2; border: 1px solid rgba(236,224,196,.3); border-radius: 6px; padding: 22px 24px 20px; box-shadow: 0 24px 70px rgba(0,0,0,.7); animation: cin .22s ease-out; }
.sheet-box h2 { font-family: var(--hand); font-size: 2.2rem; margin: 0 0 .5em; text-align: center; color: #f6e7c4; }
.menu-list { display: flex; flex-direction: column; gap: 9px; }
.menu-list button, .set-btn { padding: .65em 1em; border-radius: 4px; border: 1px solid rgba(236,224,196,.3); background: rgba(255,255,255,.04); color: #e8e2d2; font-size: 1rem; }
.menu-list button:hover, .set-btn:hover { background: rgba(255,255,255,.1); }
.menu-list button.primary, .sheet-foot button.primary { background: var(--amber); color: #23180c; border: 0; font-weight: 600; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: .7em 0; border-bottom: 1px solid rgba(236,224,196,.12); cursor: pointer; }
.set-label small { display: block; opacity: .55; font-size: .8rem; margin-top: .1em; }
.set-row input[type=range] { width: 45%; accent-color: var(--amber); }
.set-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--amber); }
.sheet-foot { margin-top: 18px; text-align: center; }
.sheet-foot button { min-width: 9em; }
.tabs .menu-btn { flex: 0 0 auto; padding: .8em .9em; opacity: .8; }

#objective { align-self: center; margin-top: 8px; max-width: min(92vw, 34em); text-align: center; padding: 7px 16px; border-radius: 4px; font-size: .95rem; line-height: 1.3; color: #f3ead2; background: rgba(12,16,28,.78); border: 1px solid rgba(240,184,96,.45); text-shadow: none; }
#objective:empty { display: none; }
#objective i { font-style: normal; color: var(--amber); font-weight: 600; margin-right: .35em; }
#objective.flash { animation: objflash .9s ease-out; }
@keyframes objflash { from { background: rgba(240,184,96,.85); color: #23180c; transform: scale(1.05); } }
body #hud { justify-content: flex-start; }
.hud-bottom { margin-top: auto; }
.set-two { display: flex; flex-direction: column; gap: 6px; }
.set-two .set-btn { padding: .4em .8em; font-size: .9rem; }
select.set-btn { font: inherit; padding: .45em .7em; }
select.set-btn option { color: #111; }
.achs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ach { padding: .5em .6em; border: 1px dashed rgba(46,33,24,.3); border-radius: 3px; opacity: .55; font-size: .85rem; line-height: 1.25; }
.ach b, .ach span { display: block; }
.ach.got { opacity: 1; border-style: solid; border-color: var(--red); background: rgba(255,250,235,.6); }
.ach.got b { color: var(--red); }
.card.ach { border-top: 5px solid var(--amber); }

/* --- atlas ekranı --- */
#hub { padding: 14px; background: radial-gradient(ellipse at 50% 40%, rgba(60,45,30,.5), rgba(10,13,20,.86)); }
.book { display: grid; grid-template-columns: auto minmax(300px, 400px); width: fit-content; max-width: 100%; height: min(100%, 780px); background: var(--paper2); color: var(--ink); border-radius: 5px; box-shadow: 0 22px 70px rgba(0,0,0,.65), inset 0 0 60px rgba(120,85,40,.25); overflow: hidden; }
.mapside { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; gap: 6px; background: rgba(90,60,25,.16); min-width: 0; }
#atlas { height: calc(min(100vh - 28px, 780px) - 58px); max-width: 100%; aspect-ratio: 1; width: auto; border-radius: 3px; box-shadow: 0 3px 14px rgba(60,35,10,.4); cursor: pointer; }
#atlasInfo { font-size: .85rem; opacity: .8; }
.panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid rgba(46,33,24,.25); }
.tabs { display: flex; border-bottom: 1px solid rgba(46,33,24,.3); }
.tabs button { flex: 1; padding: .8em .2em; font-size: .88rem; letter-spacing: .03em; opacity: .55; border-bottom: 3px solid transparent; }
.tabs button.on { opacity: 1; border-bottom-color: var(--red); font-weight: 600; }
#tabBody { flex: 1; overflow-y: auto; padding: 14px 16px 18px; min-height: 0; -webkit-overflow-scrolling: touch; }
#tabBody h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 1.5em 0 .5em; font-weight: 600; }
.lead { margin: 0 0 .9em; font-style: italic; opacity: .85; line-height: 1.4; }
.rumor, .equip { display: block; width: 100%; text-align: left; padding: .7em .8em; margin-bottom: .55em; border: 1px solid rgba(46,33,24,.3); border-radius: 3px; background: rgba(255,250,235,.35); transition: background .15s; }
.rumor:not(:disabled):hover, .equip:hover { background: rgba(255,250,235,.7); }
.rumor.sel, .equip.sel { background: rgba(255,250,235,.85); border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.rumor .q { display: block; font-family: var(--hand); font-size: 1.35rem; line-height: 1.12; }
.rumor .where { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; opacity: .65; margin-top: .35em; }
.rumor .why { display: block; font-size: .85rem; color: var(--red); margin-top: .35em; line-height: 1.3; }
.rumor.locked { opacity: .75; border-style: dashed; }
.rumor.free .q { font-size: 1.15rem; }
.route, .doneRumor, .entry { padding: .55em .1em; border-bottom: 1px dotted rgba(46,33,24,.3); font-size: .92rem; line-height: 1.35; }
.route b, .route span, .doneRumor span { display: block; }
.route.ok { opacity: .65; }
.doneRumor .q { font-family: var(--hand); font-size: 1.15rem; }
.entry p { margin: .4em 0; }
.entry .later { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-top: .8em; }
.stats { display: flex; gap: 1.2em; margin-bottom: .9em; font-size: .92rem; }
.equip { display: flex; gap: .8em; align-items: flex-start; }
.equip .glyph { font-size: 1.5rem; width: 1.5em; text-align: center; line-height: 1.1; color: var(--red); }
.equip .txt b, .equip .txt span { display: block; }
.equip .txt span { font-size: .88rem; line-height: 1.3; opacity: .82; margin-top: .15em; }
.upg { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .7em .1em; border-bottom: 1px dotted rgba(46,33,24,.3); }
.upg b, .upg span { display: block; }
.upg span { font-size: .88rem; opacity: .8; }
.upg button { background: var(--ink); color: var(--paper); padding: .45em .9em; border-radius: 3px; white-space: nowrap; font-size: .9rem; }
.upg button:disabled { opacity: .35; }
.go { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(46,33,24,.3); background: rgba(90,60,25,.14); text-align: center; }
#goInfo { font-family: var(--hand); font-size: 1.15rem; line-height: 1.1; margin-bottom: .5em; opacity: .85; }
#goBtn { width: 100%; font-size: 1.05rem; padding: .75em; }

blockquote.note { font-family: var(--hand); font-size: 1.3rem; line-height: 1.18; margin: .8em 0; padding: .5em .8em; border-left: 3px solid rgba(138,58,42,.55); background: rgba(255,250,235,.4); color: #3a2a1c; }
blockquote.note cite { display: block; text-align: right; font-size: 1.05rem; opacity: .7; font-style: normal; margin-top: .2em; }
blockquote.note.own { border-left-color: rgba(46,33,24,.5); font-style: italic; }

/* --- keşif arayüzü --- */
#hud { position: fixed; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
.hud-top, .hud-bottom .row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; background: rgba(12,16,24,.72); border: 1px solid rgba(232,226,210,.2); border-radius: 999px; padding: 7px 13px; font-size: .92rem; color: #e8e2d2; min-height: 38px; }
button.chip:active { background: rgba(40,48,64,.9); }
.gauge { color: var(--amber); }
.gauge .bar { width: clamp(70px, 22vw, 150px); height: 8px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
.gauge .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #d9862f, #ffd27a); transition: width .2s; }
.gauge b { color: #f3e6c8; min-width: 1.8em; text-align: right; }
.gauge.low { color: #ff7a4a; animation: pulse 1s infinite; }
.gauge.low .bar i { background: #e2542a; }
@keyframes pulse { 50% { opacity: .6; } }
.coin { width: 12px; height: 12px; border-radius: 50%; background: #e2b454; box-shadow: inset -2px -2px 0 rgba(90,64,18,.5); }
#btnSound.off { opacity: .4; text-decoration: line-through; }
#btnFlare { background: rgba(240,184,96,.9); color: #23180c; border-color: #ffe2a0; font-weight: 600; box-shadow: 0 0 18px rgba(240,184,96,.35); }
#btnFlare.cool { opacity: .4; box-shadow: none; }
#bell { --p: 100%; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #e8e2d2; background: radial-gradient(closest-side, rgba(12,16,24,.92) 76%, transparent 78%), conic-gradient(#9db4e8 var(--p), rgba(255,255,255,.12) 0); }
#bell.soon { color: #ff9a6a; background: radial-gradient(closest-side, rgba(12,16,24,.92) 76%, transparent 78%), conic-gradient(#ff7a4a var(--p), rgba(255,255,255,.12) 0); animation: pulse .6s infinite; }
.card.event { border-top: 5px solid #7b5ad0; }
.card.event .kicker { color: #6a48c0; }
.card:not(.dark) .btns button:not(.primary) { background: rgba(255,250,235,.5); }
#btnChalk.on { background: #ece8dc; color: #1a1f2a; border-color: #fff; }
#compass { width: 42px; height: 42px; border-radius: 50%; background: rgba(12,16,24,.72); border: 1px solid rgba(232,226,210,.35); position: relative; }
#needle { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#needle::before { content: ''; position: absolute; left: -5px; top: -17px; border: 5px solid transparent; border-bottom: 17px solid var(--amber); border-top: 0; }
#needle::after { content: ''; position: absolute; left: -5px; top: 0; border: 5px solid transparent; border-top: 15px solid rgba(232,226,210,.35); border-bottom: 0; }
.hud-bottom { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; text-shadow: 0 1px 4px #000, 0 0 12px #000; }
#rumorLine { font-family: var(--hand); font-size: 1.25rem; opacity: .85; line-height: 1.1; max-width: 34em; }
#bagLine { font-size: .88rem; color: var(--amber); }
#backLine { font-size: .9rem; opacity: .9; }
#backLine.danger { color: #ff7a4a; font-weight: 600; }

#toasts { position: fixed; left: 0; right: 0; top: calc(116px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 14px; z-index: 5; }
.toast { background: rgba(12,16,24,.84); border: 1px solid rgba(232,226,210,.18); padding: 8px 15px; border-radius: 4px; font-size: .95rem; max-width: 30em; text-align: center; line-height: 1.3; animation: tin .35s ease-out; transition: opacity .5s; }
.toast.gone { opacity: 0; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* --- kartlar --- */
#modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,9,14,.6); z-index: 10; }
.card { background: var(--paper); color: var(--ink); width: min(100%, 470px); max-height: 100%; overflow-y: auto; padding: 24px 26px 20px; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 0 50px rgba(120,85,40,.22); text-align: center; animation: cin .28s ease-out; }
@keyframes cin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.card .kicker { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); font-weight: 600; }
.card h2 { font-family: var(--hand); font-size: 2.3rem; line-height: 1; margin: .12em 0 .2em; font-weight: 700; }
.card .sub { font-family: var(--hand); color: var(--red); font-size: 1.3rem; transform: rotate(-2deg); margin-bottom: .3em; }
.card .body { text-align: left; line-height: 1.5; }
.card .body p { margin: .6em 0; }
.card .gain { text-align: center; font-weight: 600; color: #6a4a12; }
.card-icon { width: 76px; height: 76px; display: block; margin: 0 auto 2px; }
.card-icon.big { width: 150px; height: 150px; margin-top: -14px; }
.card .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.card .btns button { padding: .6em 1.3em; border-radius: 3px; border: 1px solid rgba(46,33,24,.45); min-width: 7em; }
.card .btns button.primary { border-color: var(--ink); }
.card ul.sum { margin: .5em 0; padding-left: 1.2em; }
.card ul.sum li { margin: .3em 0; }
.card.dialog { border-top: 5px solid var(--red); }
.card.dark { background: #171d29; color: #dcd6c6; box-shadow: 0 20px 60px rgba(0,0,0,.7), inset 0 0 60px rgba(0,0,0,.5); }
.card.dark .kicker { color: #ff9a6a; }
.card.dark .btns button { border-color: rgba(220,214,198,.4); color: #dcd6c6; }
.card.dark .btns button.primary { background: #dcd6c6; color: #171d29; }
.card.atlas-card { width: min(100%, 78vh, 640px); padding: 10px 10px 14px; }
.card-canvas { width: 100%; aspect-ratio: 1; display: block; border-radius: 3px; }

#err { position: fixed; left: 8px; bottom: 8px; right: 8px; max-height: 40%; overflow: auto; margin: 0; padding: 8px; background: #400; color: #fdd; font: 12px monospace; z-index: 99; white-space: pre-wrap; }
#selftest { position: fixed; inset: 0; margin: 0; padding: 12px; background: #000; color: #0f0; z-index: 100; }

/* --- dar ekran: harita üstte, panel altta --- */
@media (max-width: 840px), (max-aspect-ratio: 1/1) {
  #hub { padding: 0; align-items: stretch; }
  /* bütün sayfa birlikte kayar; sekmeler üste, "Sise gir" alta yapışır */
  .book { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mapside { padding: 10px 10px 6px; flex: 0 0 auto; }
  #atlas { height: auto; width: min(100%, 58vh); }
  .panel { border-left: 0; flex: 1 0 auto; min-height: auto; }
  .tabs { position: sticky; top: 0; z-index: 2; background: var(--paper2); border-top: 1px solid rgba(46,33,24,.25); box-shadow: 0 4px 8px -6px rgba(46,33,24,.5); }
  .tabs button { padding: .95em .2em; font-size: .95rem; }
  #tabBody { flex: 1 0 auto; overflow: visible; padding: 16px 16px 20px; }
  .go { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(90,60,25,.16), rgba(90,60,25,.16)), var(--paper2); box-shadow: 0 -4px 10px -6px rgba(46,33,24,.55); text-align: left; }
  #goInfo { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #goBtn { width: auto; flex: 0 0 auto; padding: .7em 1.1em; white-space: nowrap; }
  #rumorLine { font-size: 1.1rem; }
}

/* === ortak tasarım dili: simgeler, köşeler, basma tepkisi, geçişler === */
:root { --r: 6px; --line: rgba(236,224,196,.28); --ease: cubic-bezier(.2,.8,.2,1); }
.ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ic.fill { fill: currentColor; stroke-width: 1.2; }
button { transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s, opacity .15s; }
button:not(:disabled):active { transform: scale(.955); }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
button.primary, .menu button, .menu-list button, .set-btn, .card .btns button, .upg button, .rumor, .equip, .toast, #objective, .ach { border-radius: var(--r); }
.card, .sheet-box { border-radius: calc(var(--r) + 2px); }
.sheet-box, .chip, .toast, #objective { border-color: var(--line); }
.chip { border: 1px solid var(--line); background: rgba(12,16,28,.8); box-shadow: 0 2px 10px rgba(0,0,0,.35); font-weight: 600; letter-spacing: .01em; }
.chip.round { width: 42px; height: 42px; padding: 0; justify-content: center; }
.chip .ic { width: 1.25em; height: 1.25em; }
#bell .ic { width: 20px; height: 20px; }
.gauge .ic { width: 18px; height: 18px; }
.equip .glyph .ic { width: 1.5rem; height: 1.5rem; }
.route b .ic, .ach b .ic { width: 1em; height: 1em; }
.ach.got b .ic { fill: currentColor; }
.tabs .menu-btn .ic { width: 1.3em; height: 1.3em; }
.chip.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.22); background: rgba(240,184,96,.9); color: #23180c; } }
@media (max-width: 420px) { #btnAtlas .lbl { display: none; } #btnAtlas { width: 42px; height: 42px; padding: 0; justify-content: center; } }

/* keşif şeridi */
#banner { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 20; transform: translate(-50%, -30px) scale(.92); opacity: 0; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 9px 30px 11px; text-align: center; color: #23180c; background: linear-gradient(#ffdc98, #f0b860); border-radius: var(--r); box-shadow: 0 0 0 2px rgba(35,24,12,.85), 0 10px 34px rgba(0,0,0,.55), 0 0 46px rgba(240,184,96,.5); transition: opacity .3s, transform .45s var(--ease); max-width: 92vw; }
#banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#banner span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; opacity: .8; }
#banner b { font-family: var(--hand); font-size: 1.9rem; line-height: 1; }

/* logo */
.logo-mark { width: clamp(64px, 13vh, 104px); height: auto; display: block; margin: 0 auto 8px; overflow: visible; stroke: #ecdfc4; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 16px rgba(240,184,96,.4)); }
.logo-mark .lm-glow { fill: #f0b860; stroke: none; opacity: .2; transform-origin: 60px 62px; animation: ldglow 2.4s ease-in-out infinite; }
.logo-mark .lm-solid { fill: #2a2238; }
.logo-mark .lm-body { fill: #1b2440; }
.logo-mark .lm-flame { fill: #ffd27a; stroke: none; transform-origin: 60px 74px; animation: ldflame .55s ease-in-out infinite alternate; }
.logo-route { display: block; width: min(70vw, 300px); height: auto; margin: -6px auto 14px; fill: none; stroke: #f0b860; stroke-width: 2.4; stroke-linecap: round; opacity: .85; }
.logo-route circle { fill: #f0b860; stroke: none; }
#title h1 { margin-top: .1em; letter-spacing: .01em; }
#title.intro .logo-mark { animation: fadeUp 1s calc(var(--d, 1) * .1s) both; }
#title.intro .logo-route { animation: routeIn 1.2s calc(var(--d, 1) * 1.9s) both; }
@keyframes routeIn { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ekranlar arası geçiş: ortadan yayılan mürekkep */
#veil { opacity: 1; transition: -webkit-mask-size .5s cubic-bezier(.6,0,.3,1), mask-size .5s cubic-bezier(.6,0,.3,1); -webkit-mask: radial-gradient(circle closest-side, #000 72%, transparent 100%) center / 0% 0% no-repeat; mask: radial-gradient(circle closest-side, #000 72%, transparent 100%) center / 0% 0% no-repeat; }
#veil.on { opacity: 1; -webkit-mask-size: 340vmax 340vmax; mask-size: 340vmax 340vmax; }
#hub:not(.hidden) .book { animation: bookIn .5s var(--ease) both; transform-origin: 0 50%; }
@keyframes bookIn { from { opacity: 0; transform: perspective(1600px) rotateY(-9deg) translateX(-14px); } }
#hud:not(.hidden) .hud-top { animation: hudDown .45s var(--ease) both; }
#hud:not(.hidden) .hud-bottom { animation: hudUp .45s var(--ease) both; }
@keyframes hudDown { from { opacity: 0; transform: translateY(-14px); } }
@keyframes hudUp { from { opacity: 0; transform: translateY(14px); } }
#tabBody > * { animation: fadeUp .3s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
html.noanim *, html.noanim *::before, html.noanim *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #hub .book, #hud .hud-top, #hud .hud-bottom, #tabBody > *, .logo-mark *, .chip.bump { animation: none !important; } #veil { transition-duration: .01s; } }
/* kısa ekranlarda ana menü taşmasın */
#title h1 { font-size: clamp(2.8rem, min(13vw, 12.5vh), 6.4rem); }
#title .sub { margin-bottom: clamp(.8em, 3vh, 2em); }
@media (max-height: 700px) { .logo-mark { width: 54px; margin-bottom: 4px; } #title { padding-top: 14px; } .menu { gap: 7px; } #title .over { font-size: .8rem; } .logo-route { margin-bottom: 8px; } }
@media (max-height: 540px) { .logo-mark, .logo-route { display: none; } }
