.GameContent {
	width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    overflow-x: hidden;	
}
.IteractiveContainer {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    height: stretch;
    width: stretch;
    background-color: #0000009e;
    z-index: 51;
}

/* DEV visual-effects inspector: keep the actual map rendering visible while
   the debug controls are open. The overlay still captures pointer input. */
.IteractiveContainer.visualEffectsDebugHost {
    background-color: transparent;
}

.MapContainer.visualEffectsDebugLocked {
    pointer-events: none;
}
.IteractiveContentBG {
	position: absolute;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    height: stretch;
	background-color: #0000009e;
}
.MapContainer {
	width: 100%;
    display: flex;
    flex: 1;
    overflow: hidden;
	background-image: url("../assets/img/background/charSelection/BookPageBlank.webp");
	background-size: 100% 100%;
	background-repeat: no-repeat;
	position: relative;
}

.TopBarContainer {
	display: flex;
    height: 50px;
    width: stretch;
    flex-wrap: nowrap;
}

.TopBar {
    display: flex;
    padding-right: 5px;
    width: stretch;
    background-color: black;
    padding-top: 5px;
    padding-bottom: 5px;
    box-sizing: border-box;
    height: 50px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    justify-content: flex-end;
}
.TopBarCharDataContainer {
	padding-left: 10px;
    padding-right: 10px;
    height: 100%;
    align-content: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    /*background-image: url(../assets/img/background/interface/topBarSection.webp);*/
}
.TopBarCharGold { color: gold; }
.TopBarCharVital { color: white; }
.TopBarGameDate {
    user-select: none;
    width: 100px;
    position: fixed;
    top: 5px;
    right: 60px;
    background: rgba(0, 0, 0, 0.7);
    color: rgb(0, 255, 0);
    font-family: monospace;
    font-size: 12px;
    padding: 4px 6px;
}
.TopBarGameDayPeriod {
    margin-top: 1px;
	margin-right: 5px;
    margin-left: 5px;
    float: right;
    user-select: none;
    width: 35px;
    height: 35px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}
.changeLogBullet { background-image: url(../assets/img/icons/goldenBullet.webp); }
.changeLogCalendar { background-image: url(../assets/img/icons/calendar.webp); }
.changeLogDateEvent {
	height: 15px;
    position: relative;
    float: left;
    font-weight: bold;
	display: flex;
    align-items: center;
}
.changeLogEventText {
    position: relative;
}
.changeLogIcon {
	width: 15px;
    height: 15px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    float: left;
    margin-right: 5px;
}
.changeLogIconAstolfo { background-image: url(../assets/img/icons/Astolfo-Icon.webp); }
.changeLogIconBug { background-image: url(../assets/img/icons/bug.webp); }
.changeLogIconCat { background-image: url(../assets/img/icons/cat.webp); }
.changeLogIconEnd {
	width: 15px;
    height: 15px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}
.changeLogIconExclamation { background-image: url(../assets/img/icons/exclamation.webp); }
.changeLogIconFire { background-image: url(../assets/img/elements/Fire.webp); }
.changeLogIconHeart { background-image: url(../assets/img/icons/hp.webp); }
.changeLogIconMap { background-image: url(../assets/img/icons/charChangelogMenuIcon.webp); }
.displayNone { display: none !important; }
.dropdown-menu {
	position: absolute;
    z-index: 10;
    max-height: 0;
    overflow: auto;
    scrollbar-width: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url(../assets/img/background/interface/menuBG.webp);
    border-radius: 5px;
    /* margin-left: -5px;*/
}
.dropdown-menu.open {
	max-height: stretch;
    opacity: 1;
    transform: translateY(0);
    z-index: 51;
    /* margin-top: 5px; */
    padding: 5px;
}
.dropdown-toggle {
	width: 50px;
	height: 50px;
	
	background-size: 60% 60%;
	background-repeat: no-repeat;
	background-position: center;
}
.dropdown-toggle-closed { background-image: url("../assets/img/icons/charMenuIcon.webp");}
.icon-hp { background-image: url("../assets/img/icons/char/hp.webp"); }
.icon-mana { background-image: url("../assets/img/icons/char/mana.webp"); }
.icon-stamin { background-image: url("../assets/img/icons/char/stamin.webp"); }
.item-icon-dragonTear { background-image: url("../assets/img/icons/dragonTear.webp"); }
.item-icon-gold { background-image: url("../assets/img/icons/gold.webp"); }
.item-icon-star { background-image: url("../assets/img/icons/star.webp"); }
.itemDisplayResumeSeparator {
	width: 100%;
    border: 1px solid #734f008f;
}
.menu-container {
	float: left;
    width: 50px;
    height: 50px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    /*background-image: url(../assets/img/background/interface/menuIconContainer.webp);*/
}
.messagePopupContainer {
	position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    background-color: #000000ad;
    z-index: 99;
}
.messagePopupText {
    width: 100%;
    height: 85%;
    padding: 5%;
    overflow: scroll;
    scrollbar-width: none;
    position: relative;
}
.npcIteractiveContainer {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    height: stretch;
    width: stretch;
    background-color: #0000009e;
    z-index: 50;
}
.npcIteractiveContent {
    display: flex;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.npcIteractiveContent {
	display: flex;
	width: 100%;
}
.npcIteractiveContentBG {
	z-index: 50;
}
.scrollHint {
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: 0px;
    right: 10px;
    opacity: 0;
    pointer-events: none;
	justify-content: center;
    background-image: url(../assets/img/icons/doubleDown.webp);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.scrollHint.show {
    animation: blinkScroll 1s ease-in-out infinite;
}
.topBarCharAttributeIcon {
    width: 12px;
    height: 12px;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 5px;
    flex-shrink: 0;
    filter: drop-shadow(1px 0 0 gray) drop-shadow(-1px 0 0 gray) drop-shadow(0 1px 0 gray) drop-shadow(0 -1px 0 gray);
}
.topBarCharDataItemContainer {
	width: 100%;
	height: 15px;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.topBarCharStatsProgressBar {
    min-width: 100px;
}

/* V6 - Responsive modal/message overlay */
.messagePopupContainer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    overflow: hidden auto;
    align-content: center;
    align-items: center;
}

.messagePopupText {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    max-height: min(62vh, 420px);
    padding: clamp(18px, 5vw, 28px);
    overflow: auto;
    line-height: 1.3;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 559px) {
    .messagePopupContainer {
        padding-inline: 10px;
    }

    .messagePopupText {
        max-height: 58vh;
        padding: 18px 16px;
    }
}

/* ========================================================================== */
/* V9 - Full-height responsive changelog                                      */
/* ========================================================================== */
.changelogPopupContainer {
    box-sizing: border-box;
    padding: 58px 12px 10px;
    overflow: hidden;
    align-content: stretch;
    align-items: stretch;
}

.changelogPopup {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: min(760px, calc(100vw - 32px));
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 760px;
    max-height: none;
    margin: 0;
    padding: clamp(20px, 3vw, 34px) clamp(20px, 4vw, 42px) clamp(14px, 2vw, 20px);
    overflow: hidden;
    color: #2f1d0f;
    background-image: url(../assets/img/background/main/messageBoard.webp);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55));
}

.changelogPopup .messagePopupText {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: none;
    padding: 2px 6px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(104, 64, 21, .7) rgba(120, 82, 42, .14);
    line-height: 1.32;
    text-align: left;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.changelogPopup .messagePopupText::-webkit-scrollbar { width: 8px; }
.changelogPopup .messagePopupText::-webkit-scrollbar-track { background: rgba(120, 82, 42, .12); border-radius: 8px; }
.changelogPopup .messagePopupText::-webkit-scrollbar-thumb { background: rgba(104, 64, 21, .68); border-radius: 8px; }

.changelogContent { width: 100%; box-sizing: border-box; }
.changelogHeader { text-align: center; margin: 0 auto 12px; }
.changelogTitle {
    font-family: 'MedievalSharp', serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: #38200d;
    text-shadow: 0 1px rgba(255,255,255,.4);
}
.changelogSubtitle {
    max-width: 600px;
    margin: 4px auto 8px;
    font-size: clamp(13px, 1.5vw, 15px);
    color: #68451f;
}
.changelogVersion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid rgba(106, 70, 28, .35);
    border-radius: 8px;
    background: rgba(255, 245, 205, .34);
    font-size: 13px;
}
.changelogVersion strong { color: #3b210d; }

.changelogQuickInfo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-top: 1px solid rgba(115, 79, 0, .36);
    border-bottom: 1px solid rgba(115, 79, 0, .36);
    background: rgba(255, 248, 218, .18);
}
.changelogQuickItem {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 6px;
    font-size: 12px;
    color: #543719;
}
.changelogQuickItem .changeLogIcon { flex: 0 0 15px; margin: 1px 0 0; float: none; }

.changelogTimeline { display: flex; flex-direction: column; gap: 10px; }
.changelogMonth {
    padding: 9px 11px 8px;
    border: 1px solid rgba(101, 65, 25, .23);
    border-radius: 8px;
    background: rgba(255, 247, 215, .20);
}
.changelogMonth-latest {
    border-color: rgba(139, 83, 15, .5);
    background: rgba(255, 230, 157, .27);
}
.changelogMonthHeader {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: #482a11;
    font-size: 15px;
}
.changelogMonthHeader .changeLogIcon { float: none; flex: 0 0 15px; margin: 0; }
.changelogLatestBadge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(119, 71, 18, .16);
    border: 1px solid rgba(119, 71, 18, .28);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.changelogItems {
    margin: 0;
    padding: 0 0 0 19px;
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #382516;
}
.changelogItems li::marker { color: #98671e; }
.changelogThanks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px 0 4px;
    font-size: 12px;
    color: #6a451d;
    text-align: center;
}
.changelogThanks .changeLogIconEnd { flex: 0 0 15px; }

/* The action stays outside the scrollable body and keeps the original game-button look. */
.changelogPopup > .changelogPopupClose {
    flex: 0 0 auto !important;
    align-self: center;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    align-content: center !important;
    justify-content: center !important;
    gap: 5px;
    line-height: 1;
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px;
    min-height: 42px;
    height: 42px;
    margin: 8px auto 0 !important;
    padding: 5px 12px !important;
    box-sizing: border-box;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    font-size: 16px;
}

.changelogPopup > .changelogPopupClose .item-icon {
    flex: 0 0 20px;
    float: none;
    margin: 0 !important;
    align-self: center;
}

.changelogPopup > .changelogPopupClose .buttonText {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto !important;
    margin: 0;
    padding: 0;
    line-height: 1;
}

@media (max-width: 559px) {
    .changelogPopupContainer {
        padding: max(56px, calc(50px + env(safe-area-inset-top))) max(7px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
    }

    .changelogPopup {
        width: min(100%, 430px);
        height: 100%;
        min-height: 0;
        max-height: none;
        padding: 24px 20px 13px;
        font-size: 14px;
    }

    .changelogPopup .messagePopupText {
        padding: 0 3px 8px;
    }

    .changelogHeader { margin-bottom: 9px; }
    .changelogTitle { font-size: 22px; }
    .changelogSubtitle { font-size: 12px; margin-bottom: 6px; }
    .changelogVersion { font-size: 11px; padding: 4px 8px; }

    .changelogQuickInfo {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 8px 7px;
        margin-bottom: 9px;
    }
    .changelogQuickItem { font-size: 11px; line-height: 1.25; }

    .changelogTimeline { gap: 7px; }
    .changelogMonth { padding: 7px 8px 6px; }
    .changelogMonthHeader { font-size: 14px; margin-bottom: 4px; }
    .changelogItems { font-size: 12px; gap: 3px; padding-left: 17px; }

    .changelogPopup > .changelogPopupClose {
        flex: 0 0 42px !important;
        width: 164px !important;
        min-width: 164px !important;
        max-width: 164px !important;
        min-height: 42px !important;
        height: 42px !important;
        margin-top: 7px !important;
        font-size: 15px !important;
    }
}

@media (max-height: 620px) {
    .changelogPopupContainer {
        padding-top: max(52px, calc(48px + env(safe-area-inset-top)));
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }
    .changelogPopup {
        height: 100%;
        min-height: 0;
        padding-top: 16px;
        padding-bottom: 9px;
    }
    .changelogSubtitle { display: none; }
    .changelogQuickInfo { margin-bottom: 7px; padding-block: 6px; }
}

/* Level-up affordance: reuse the existing Sparkle.webp, not a separate effect.
   Server-rendered classes disappear when all points for the destination are spent. */
#dropdown-toggle.lorPointsPending,
#dropdown-menu .charTopBarMenuItem.lorPointsPending { position: relative; }
#dropdown-toggle.lorPointsPending::after,
#dropdown-menu .charTopBarMenuItem.lorPointsPending::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 3;
    background: url('../assets/img/icons/Sparkle.webp') center / contain no-repeat;
    image-rendering: pixelated;
    width: 26px;
    height: 26px;
    top: -5px;
    right: -4px;
    opacity: 0;
    animation: lorMenuLevelSparkle 2.8s ease-in-out infinite;
}
/* The primary menu notification belongs to the CENTER of the icon.
   Keep the existing right-aligned placement on the dropdown entries. */
#dropdown-toggle.lorPointsPending::after {
    left: 50%;
    top: 50%;
    right: auto;
    margin: -13px 0 0 -13px;
    transform-origin: center center;
}
#dropdown-menu .charTopBarMenuItem.lorPointsPending::after {
    width: 23px;
    height: 23px;
    right: 22px;
    top: 50%;
    margin-top: -13px;
    animation-delay: .6s;
}
#dropdown-menu .charTopBarMenuItem.lorPointsPending:nth-child(3)::after { animation-delay: 1.5s; }
.lorMenuPointsCount {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 17px;
    height: 17px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #65401c;
    border: 1px solid #c69a53;
    color: #ffe4a4;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    padding: 0 3px;
}
@keyframes lorMenuLevelSparkle {
    0%, 10%, 88%, 100% { opacity: 0; transform: scale(.4) rotate(-12deg); }
    28%, 48% { opacity: 1; transform: scale(1.05) rotate(15deg); }
    68% { opacity: .35; transform: scale(.65) rotate(35deg); }
}
@media(prefers-reduced-motion:reduce) {
    #dropdown-toggle.lorPointsPending::after,
    #dropdown-menu .charTopBarMenuItem.lorPointsPending::after {
        animation: none; opacity: .9; transform: none;
    }
}

/* Game calendar — theme-native, accessible and independent of the inventory modal. */
#TopBarGameDayPeriod{cursor:pointer;-webkit-tap-highlight-color:transparent}
#TopBarGameDayPeriod:hover{filter:brightness(1.16)}
#TopBarGameDayPeriod:focus-visible{outline:2px solid #d6b073;outline-offset:2px}
.lorGameClockOverlay{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;
    padding:12px;box-sizing:border-box;background:rgba(0,0,0,.72);z-index:10000015}
.lorGameClockDialog{box-sizing:border-box;width:min(400px,96vw);max-height:min(88dvh,600px);
    overflow:hidden;padding:10px 13px 16px;background:#15100d url('../assets/img/themes/darkfantasy/background/pannelBG.webp') center/100% 100% no-repeat;
    color:#eacb93;font:15px Georgia,serif;box-shadow:0 15px 38px #000d;border:0}
.lorGameClockOverlay[data-lor-theme="wood"] .lorGameClockDialog{
    background-image:url('../assets/img/themes/wood/background/pannelBG.webp')}
.lorGameClockHeader{position:relative;display:flex;justify-content:center;align-items:center;
    box-sizing:border-box;min-height:49px;width:calc(100% + 16px);margin:-5px -8px 0;
    padding:5px 43px;background:url('../assets/img/themes/darkfantasy/background/pannelTitleBG.webp') center/100% 100% no-repeat}
.lorGameClockOverlay[data-lor-theme="wood"] .lorGameClockHeader{
    background-image:url('../assets/img/themes/wood/background/pannelTitleBG.webp')}
.lorGameClockHeader strong{text-align:center;width:100%;font-size:18px;color:#f7da97}
.lorGameClockClose{position:absolute;top:50%;right:4px;transform:translateY(-50%);
    box-sizing:border-box;appearance:none;width:36px;height:36px;padding:0;border:0;cursor:pointer;
    background:transparent url('../assets/img/themes/darkfantasy/buttons/close.webp') center/100% 100% no-repeat}
.lorGameClockOverlay[data-lor-theme="wood"] .lorGameClockClose{
    background-image:url('../assets/img/themes/wood/buttons/close.webp')}
.lorGameClockOverlay[data-close-button-position="Bottom"] .lorGameClockClose{display:none}
.lorGameClockOverlay:not([data-close-button-position="Bottom"]) .lorGameClockFooter{display:none}
.lorGameClockFooter{display:flex;justify-content:center;align-items:center;padding:8px 5px 0}
.lorGameClockBottomClose{display:inline-flex;align-items:center;justify-content:center;gap:6px;
    min-width:116px;min-height:42px;box-sizing:border-box;padding:6px 14px;cursor:pointer;appearance:none;border:0;
    color:#f7ddad;font:700 15px Georgia,serif;text-shadow:0 1px 2px #000;
    background:transparent url('../assets/img/themes/darkfantasy/buttons/button.webp') center/100% 100% no-repeat}
.lorGameClockOverlay[data-lor-theme="wood"] .lorGameClockBottomClose{
    background-image:url('../assets/img/themes/wood/buttons/button.webp')}
.lorGameClockBottomClose .item-icon{flex:none;margin-top:2px}
.lorGameClockBottomClose:hover{filter:brightness(1.18)}
.lorGameClockBottomClose:focus-visible{outline:2px solid #d6b073;outline-offset:1px}
.lorGameClockClose:hover{filter:brightness(1.2)}
.lorGameClockClose:focus-visible{outline:2px solid #d6b073;outline-offset:1px}
.lorGameClockContent{padding:16px 10px 5px;display:grid;gap:6px}
.lorGameClockRow{display:flex;align-items:center;justify-content:space-between;gap:12px;
    min-height:39px;box-sizing:border-box;padding:9px 11px;
    background:url('../assets/img/themes/darkfantasy/background/pannelSectionBG.webp') center/100% 100% no-repeat}
.lorGameClockOverlay[data-lor-theme="wood"] .lorGameClockRow{
    background-image:url('../assets/img/themes/wood/background/pannelSectionBG.webp')}
.lorGameClockRow strong{color:#ffe19a;font-variant-numeric:tabular-nums;text-align:right}
@media(max-width:400px){.lorGameClockDialog{padding:8px 9px 12px}.lorGameClockHeader{width:calc(100% + 8px);margin:-3px -4px 0}.lorGameClockContent{padding:12px 5px 4px}}
