/* Birodalom — festett térkép-felület (Claude projekt, 2026-11-16) */
:root {
  --pergamen: #f2e4c4; --pergamen2: #e8d5aa; --tinta: #3a2816; --tinta2: #6b5236; --arany: #b5832a; --pecset: #8e2a1f;
  --ok: #3f8a3c; --lassu: #c9901c; --figyelem: #c9901c; --hiba: #b3382b; --fa: #1e150d;
  --cim: 'Cinzel', 'EB Garamond', Georgia, serif; --szoveg: 'EB Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fa); color: var(--tinta); font-family: var(--szoveg); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

/* --- a térkép-világ: húzható/nagyítható réteg --- */
#vilag { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background: radial-gradient(ellipse at center, #3a2a19 0%, #120c07 100%); }
#vilag.huz { cursor: grabbing; }
#lap { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#lap img.alap { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
#lap.sima { transition: transform .45s cubic-bezier(.2,.7,.2,1); }

/* napszak-rétegek */
.reteg { position: absolute; inset: 0; pointer-events: none; transition: opacity 2s; }
#ej { background: radial-gradient(ellipse at 50% 40%, rgba(20,30,70,.45), rgba(5,8,25,.78)); mix-blend-mode: multiply; opacity: 0; }
#alkony { background: linear-gradient(180deg, rgba(255,140,60,.28), rgba(140,60,110,.22)); mix-blend-mode: soft-light; opacity: 0; }
.fenyek { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 2s; mix-blend-mode: screen; }
.feny { position: absolute; width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,110,.75) 0%, rgba(255,150,60,.28) 30%, rgba(255,120,40,0) 65%); animation: pislog 3.5s ease-in-out infinite alternate; }
@keyframes pislog { 0% { opacity: .75; } 40% { opacity: 1; } 70% { opacity: .82; } 100% { opacity: .95; } }
.csillagok { position: absolute; inset: 0 0 72% 0; pointer-events: none; opacity: 0; transition: opacity 2s;
  background-image: radial-gradient(1.5px 1.5px at 12% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 47% 15%, #fff, transparent),
    radial-gradient(1px 1px at 63% 6%, #fff, transparent), radial-gradient(1.5px 1.5px at 78% 22%, #fff, transparent), radial-gradient(1px 1px at 90% 10%, #fff, transparent), radial-gradient(1px 1px at 22% 30%, #fff, transparent), radial-gradient(1px 1px at 56% 28%, #fff, transparent); }
/* vándorló felhőárnyékok */
.felho { position: absolute; width: 38%; aspect-ratio: 2 / 1; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse, rgba(30,20,10,.22), rgba(30,20,10,0) 70%);
  mix-blend-mode: multiply; animation: vandor linear infinite; }
@keyframes vandor { from { transform: translateX(-60vw); } to { transform: translateX(160vw); } }

/* --- helyjelzők --- */
.jel { position: absolute; transform-origin: 50% 11px; transform: translate(-50%, -11px) scale(var(--inv, 1)); border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 2; }
.jel .gyongy { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #f6e7c3; box-shadow: 0 0 0 2px rgba(58,40,22,.55), 0 2px 6px rgba(0,0,0,.5);
  background: radial-gradient(circle at 35% 30%, #c8f0b8, var(--ok) 55%, #1f4a1d); transition: transform .2s; }
.jel[data-a="lassu"] .gyongy, .jel[data-a="figyelem"] .gyongy { background: radial-gradient(circle at 35% 30%, #ffe7a8, var(--lassu) 55%, #6b4a08); }
.jel[data-a="hiba"] .gyongy { background: radial-gradient(circle at 35% 30%, #ffb3a8, var(--hiba) 55%, #5a130c); animation: lukter 1.2s ease-in-out infinite; }
.jel[data-a="ok"] .gyongy::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(160,230,140,.6); animation: hullam 3s ease-out infinite; }
.jel .gyongy { position: relative; }
@keyframes hullam { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
@keyframes lukter { 50% { transform: scale(1.25); } }
.jel .felirat { font-family: var(--cim); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; color: var(--tinta); padding: 3px 10px 4px;
  background: linear-gradient(180deg, #f8ecd0, #ead6a9); border: 1px solid rgba(90,62,30,.55); border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.45); position: relative; }
.jel .felirat small { display: block; font-family: var(--szoveg); font-weight: 500; font-size: 11px; color: var(--tinta2); letter-spacing: 0; text-align: center; }
.jel:hover .gyongy, .jel:focus-visible .gyongy, .jel.aktiv .gyongy { transform: scale(1.3); }
.jel:focus-visible { outline: none; } .jel:focus-visible .felirat { outline: 2px solid var(--arany); outline-offset: 2px; }
.jel.aktiv .felirat { background: linear-gradient(180deg, #fff6df, #f1dfb4); border-color: var(--arany); }
/* füst a bajban lévő helyek fölött */
.fust { position: absolute; left: 50%; bottom: 100%; width: 0; height: 0; pointer-events: none; }
.fust i { position: absolute; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: rgba(60,55,50,.55); filter: blur(4px); animation: fust 3s ease-out infinite; opacity: 0; }
.fust i:nth-child(2) { animation-delay: 1s; } .fust i:nth-child(3) { animation-delay: 2s; }
@keyframes fust { 0% { transform: translate(0, 0) scale(.4); opacity: .8; } 100% { transform: translate(14px, -70px) scale(2.2); opacity: 0; } }
body.kicsi .jel .felirat small { display: none; }
body.apro .jel .felirat { display: none; }

/* --- fejléc-kartus --- */
.kartus { position: fixed; left: 16px; top: 16px; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, rgba(248,236,208,.96), rgba(232,213,170,.96)); border: 1px solid rgba(90,62,30,.6); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.kartus img { width: 54px; height: 54px; flex: none; border-radius: 50%; }
.kartus h1 { margin: 0; font-family: var(--cim); font-size: 21px; line-height: 1.1; letter-spacing: .03em; }
.kartus .al { font-size: 14px; color: var(--tinta2); margin-top: 2px; }
.kartus .al b { color: var(--tinta); }
.gombok { position: fixed; right: 16px; top: 16px; z-index: 10; display: flex; gap: 8px; }
.gomb { border: 1px solid rgba(90,62,30,.6); background: linear-gradient(180deg, #f8ecd0, #e3cd9b); border-radius: 6px; padding: 8px 13px; font-family: var(--cim); font-weight: 700; font-size: 13px;
  cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.4); color: var(--tinta); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.gomb:hover { background: linear-gradient(180deg, #fff6df, #ead6a9); }
.gomb:focus-visible { outline: 2px solid var(--arany); outline-offset: 2px; }

/* --- hírnök-szalag --- */
.hirnok { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10; max-width: min(760px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; background: linear-gradient(180deg, rgba(248,236,208,.96), rgba(232,213,170,.96)); border: 1px solid rgba(90,62,30,.6); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.45);
  font-size: 15px; cursor: pointer; text-align: left; }
.hirnok .kurt { font-size: 20px; flex: none; }
.hirnok span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- részletek tekercs --- */
.tekercs { position: fixed; z-index: 20; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); overflow-y: auto; padding: 22px 22px 30px; transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
  background: linear-gradient(90deg, #e2cc9b 0, #f3e5c6 18px, #f6ead0 50%, #efdfba 100%); border-left: 1px solid rgba(90,62,30,.7); box-shadow: -10px 0 40px rgba(0,0,0,.5); }
.tekercs.nyitva { transform: none; }
.tekercs .x { position: sticky; top: 0; float: right; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(90,62,30,.5); background: #f8ecd0; cursor: pointer; font-size: 18px; z-index: 2; }
.tekercs h2 { font-family: var(--cim); margin: 4px 44px 2px 0; font-size: 24px; line-height: 1.15; }
.tekercs .leiras { margin: 0 0 12px; color: var(--tinta2); font-size: 16px; font-style: italic; }
.tekercs h3 { font-family: var(--cim); font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pecset); margin: 18px 0 6px; border-bottom: 1px solid rgba(142,42,31,.3); padding-bottom: 3px; }
.allapotsor { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.allapotsor .gyongy { width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 2px #f6e7c3, 0 0 0 3px rgba(58,40,22,.5); }
.allapotsor[data-a="lassu"] .gyongy, .allapotsor[data-a="figyelem"] .gyongy { background: var(--lassu); } .allapotsor[data-a="hiba"] .gyongy { background: var(--hiba); }
.adatok { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.adatok div { background: rgba(255,250,235,.6); border: 1px solid rgba(90,62,30,.25); border-radius: 5px; padding: 6px 8px; text-align: center; }
.adatok b { display: block; font-size: 19px; font-family: var(--cim); } .adatok small { font-size: 12.5px; color: var(--tinta2); }
.sav { display: flex; gap: 2px; height: 22px; margin-top: 4px; }
.sav i { flex: 1; border-radius: 2px; background: var(--ok); opacity: .85; }
.sav i.r { background: var(--lassu); } .sav i.h { background: var(--hiba); } .sav i.n { background: rgba(90,62,30,.18); }
.savfelirat { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--tinta2); margin-top: 3px; }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: 7px 0; border-bottom: 1px dashed rgba(90,62,30,.3); font-size: 15.5px; line-height: 1.35; }
.lista li time { font-family: var(--cim); font-size: 12px; color: var(--pecset); margin-right: 6px; font-weight: 700; }
.lista li.ures { color: var(--tinta2); font-style: italic; border: 0; }
.kuldetes { display: flex; gap: 8px; flex-wrap: wrap; }
.kuldetes span { background: rgba(255,250,235,.6); border: 1px solid rgba(90,62,30,.25); border-radius: 999px; padding: 3px 11px; font-size: 14.5px; }
.belep { display: block; margin-top: 20px; text-align: center; padding: 12px; border-radius: 6px; background: linear-gradient(180deg, #9c3326, #7a2219); color: #fbecd0; font-family: var(--cim); font-weight: 700;
  text-decoration: none; letter-spacing: .04em; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.belep:hover { background: linear-gradient(180deg, #ad3b2c, #862519); }
.kronikaszoveg { font-size: 17.5px; line-height: 1.6; white-space: pre-line; }
.kronikaszoveg::first-letter { font-family: var(--cim); font-size: 3.1em; float: left; line-height: .85; margin: 4px 8px 0 0; color: var(--pecset); }
.kronikanap { font-family: var(--cim); color: var(--pecset); font-size: 14px; letter-spacing: .06em; margin-top: 18px; }
.helylista { list-style: none; padding: 0; margin: 0; }
.helylista button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px dashed rgba(90,62,30,.3); background: none; padding: 9px 2px; cursor: pointer; text-align: left; font-size: 16.5px; }
.helylista button small { margin-left: auto; color: var(--tinta2); font-size: 13.5px; }
.helylista .gyongy { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.helylista [data-a="lassu"] .gyongy, .helylista [data-a="figyelem"] .gyongy { background: var(--lassu); } .helylista [data-a="hiba"] .gyongy { background: var(--hiba); }

/* --- belépés --- */
body.kapu { overflow: auto; display: grid; place-items: center; min-height: 100vh; background: linear-gradient(rgba(18,12,7,.55), rgba(18,12,7,.75)), url('/static/terkep-1600.webp') center / cover; }
.kapu form { width: min(380px, calc(100vw - 32px)); text-align: center; padding: 28px 26px 26px; background: linear-gradient(180deg, #f8ecd0, #e8d5aa); border: 1px solid rgba(90,62,30,.7); border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.kapu img { width: 120px; height: 120px; border-radius: 50%; margin: -4px auto 6px; display: block; }
.kapu h1 { font-family: var(--cim); margin: 0 0 4px; font-size: 25px; }
.kapu p { margin: 0 0 18px; color: var(--tinta2); font-style: italic; }
.kapu input { width: 100%; font: inherit; font-size: 18px; padding: 11px 12px; border-radius: 6px; border: 1px solid rgba(90,62,30,.6); background: #fffaf0; color: var(--tinta); }
.kapu button { margin-top: 12px; width: 100%; border: 0; padding: 12px; border-radius: 6px; background: linear-gradient(180deg, #9c3326, #7a2219); color: #fbecd0; font-family: var(--cim); font-weight: 700; font-size: 16px; letter-spacing: .05em; cursor: pointer; }
.kapu .hiba { color: var(--pecset); font-weight: 600; margin: 10px 0 0; font-style: normal; }

@media (max-width: 640px) {
  .kartus { left: 10px; top: 10px; padding: 7px 12px 7px 7px; gap: 9px; max-width: calc(100vw - 20px - 96px); }
  .kartus img { width: 40px; height: 40px; } .kartus h1 { font-size: 16px; } .kartus .al { font-size: 12.5px; }
  .gombok { right: 10px; top: 10px; flex-direction: column; }
  .gomb { padding: 7px 10px; font-size: 12px; }
  .gomb .szo { display: none; }
  .hirnok { bottom: 10px; font-size: 14px; padding: 8px 12px; }
  .tekercs { top: auto; height: 72vh; width: 100vw; border-left: 0; border-top: 1px solid rgba(90,62,30,.7); border-radius: 14px 14px 0 0; transform: translateY(105%);
    background: linear-gradient(180deg, #e2cc9b 0, #f3e5c6 14px, #f6ead0 50%, #efdfba 100%); }
}
@media (prefers-reduced-motion: reduce) { .felho, .feny, .fust i, .jel .gyongy::after, .jel[data-a="hiba"] .gyongy { animation: none !important; } #lap.sima { transition: none; } }
