  * { box-sizing: border-box; margin: 0; padding: 0; 
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.status-bar {
	
    white-space: nowrap;      /* prevents line wrapping */
    overflow: hidden;         /* hides text that doesn't fit */
    text-overflow: ellipsis;  /* adds "..." when text is too long */

    /* your existing size rules */
    min-height: 24px;
    line-height: 24px;
}

.hidden {
  display: none !important;
}
    color: #fff;
    padding: 6px 12px;
    border-bottom: 2px solid #444;
    display: flex;
    align-items: left;
    transition: opacity 0.3s ease;
}
.status-bar.hidden {
    opacity: 0;
}

  .status-bar {
    width: 100%;
    height: 60px;
    background: #333;
    color: #fff;
    padding: 18px;
    font-size: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 300; /* makes the letters slim */
  }


  html, body {
    background: #222;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; 
  }

  mainWindow {
    background: #A28A65;
	min-height: 100vh
  }

.app-wrapper {
    width: 540px;
    height: 960px;
    margin: 0 auto;
    position: fixed;
    padding-top: env(safe-area-inset-top, 0);
    transform-origin: top center;
}

  .app-frame {
    display: none;
    width: 540px;
    height: 960px;
	/* transform-origin: top center; */
    background: #A28A65;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    /*overflow: hidden; /* Prevents scrolling if things go out of bounds */
	overflow-y: auto;
    overflow-x: hidden;

  }

  .main-window {
    padding: 5px;
    padding-right: 60px;
    background: #A28A65;
  }

  .right-menu {
    position: fixed;
    top: 80px;
    right: 0;
    width: 60px;
    height: 516px;
    background: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    gap: 10px;
    border-radius: 8px 0 0 8px;
  }

  .right-menu-mini {
    position: absolute;
    top: 80px;
    right: 0;
    width: 60px;
    height: 120px;
    background: #444;
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    gap: 10px;
    border-radius: 8px 0 0 8px;
  }

  .menu-item {
    width: 40px;
    height: 40px;
    background: #666;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    color: white;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
  }

.menu-item:hover  {
    opacity: 1;
	background: #888;
    transform: translateX(-2px);
  }

.tooltipmenu:hover {
	display: block;
}

.tooltipmenu {
    display: none;
    position: absolute;
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 20;
    margin-top: 4px;     /* Small gap */
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	pointer-events: none;
	/* Position to the LEFT of the icon */
    top: 50%;
    right: 100%;           /* This pushes it to the left */
    transform: translateY(-50%);
    margin-right: 12px;    /* Gap between icon and tooltip */
}

  .icon {
    width: 56px;
    height: 56px;
  }
  .guild-image {
    position: relative;
    display: inline-block;
}

/* 1. The Container - Keep absolute so your JS top/left works */
.guild_License, .guild_stash {
  position: absolute; 
  width: 64px;         /* Match your icon width */
  height: 64px;        /* Match your icon height */
  overflow: hidden;    /* This clips the shine so it doesn't bleed out */
}

/* 2. Your existing icon code stays as is */
.item-icon {
  width: 60px;
  display: block;
}

/* 2. The Shine Layer */
.guild_License::after,
.guild_stash::after {
  content: "";
  position: absolute;
  top: 0;
  left: -200%; /* Hidden off-side by default */
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 10000;
  
  /* This starts the 15-second loop automatically */
  animation: idleShine 15s infinite;
}

/* 3. The 15-second Loop Logic */
@keyframes idleShine {
  0% { left: -200%; }
  4% { left: 200%; }   /* The shine takes 0.6s (4% of 15s) to cross */
  100% { left: 200%; } /* It stays at the end for the remaining 14.4s */
}

/* 4. The Hover Logic */
.guild_License:hover::after,
.guild_stash:hover::after {
  /* Stop the idle animation so they don't clash */
  animation: none; 
  /* Move it across immediately on hover */
  left: 200%;
  transition: left 0.6s ease-in-out;
}

/* 5. The "No-Reset" Fix */
/* This ensures that when you STOP hovering, it snaps back to the start 
   instantly (0s) instead of sliding backwards across the icon. */
.guild_License::after,
.guild_stash::after {
  transition: left 0s; 
}

.hover-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    cursor: pointer;
}


.tooltip {
    position: fixed;
    left: 50%;
    transform: translate(-50%, -50%); /* centers it horizontally + vertically */
    display: none;
    background: rgba(0,0,0,0.8);
    padding: 4px 8px;
    border: 1px solid #333;
    color: white;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}


.tooltip img {
    width: 500px; /* large image size */
}

.login-wrapper {
    display: flex;
    justify-content: center;
}

@media (max-width: 3600px) {
    .login-box {
        transform: scale(2);
        transform-origin: top center;
    }    
}

.login-box {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    text-align: center;
    color: white;
}

.login-box input {
    width: 90%;
    padding: 8px;
    margin: 8px 0;
    border: none;
    border-radius: 5px;
}

.login-box button {
    width: 95%;
    padding: 10px;
    background: #4CAF50;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #45a049;
}

#status {
    margin-top: 10px;
    color: #ccc;
}

/* 1. The Container */
.shine-container {
  position: relative;
  overflow: hidden;
  display: inline-block;
  line-height: 0; /* Removes bottom gap */
}

/* 2. Creating the Shine Layer */
.shine-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%; /* Start off-screen */
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg); /* Slant the shine */
}

/* 3. The Hover Animation */
.shine-container:hover::after {
  left: 150%; /* Move across to the other side */
  transition: left 0.7s ease-in-out;
}

#window-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.4); /* dim background */
  z-index:20;
}

.window {
  background: #222;
  border: 2px solid #555;
  padding: 20px;
  border-radius: 8px;
  color: white;
  min-width: 300px;
  max-width: 600px;
  text-align: center;
}

.window-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
}

.window-body img {
  max-width: 100%;
}

/* This hides images that haven't loaded their source yet */
img:not([src]), img[src=""] {
  visibility: hidden;
}

/* Optional: Prevent the "broken" border in some browsers */
img:not([src]) {
  opacity: 0;
}
#contracts-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#contract_parchment {
  width: 100%;
  height: auto;
  display: block;
}

#contracts-container p {
  position: absolute;
  top: 20%;
  left: 10%;
  right: 10%;
  color: black;
  font-size: 18px;
  z-index: 2;
}

#journal-container {
  position: relative;
  width: 100%;
  height: auto;
}

#journal-text {
  position: absolute;
  top: 15%;      /* adjust to fit your parchment */
  left: 10%;
  right: 10%;
  bottom: 10%;
  overflow-y: auto;
  font-family: "YourFancyFont";
  font-size: 1.1rem;
  white-space: pre-wrap;
}
#missions-container {
  position: relative;
}

#missions-container #missions_line1 {
  position: absolute;
  top: 83px;
  left: 100px;
  color: white;
}

#missions-container #missions_line2 {
  position: absolute;
  top: 271px;
  left: 100px;
  color: white;
}
#missions-container #missions_line21 {
  position: absolute;
  top: 271px;
  left: 250px;
  color: white;
}

#missions-container #missions_line3 {
  position: absolute;
  top: 360px;
  left: 100px;
  color: white;
}

.mission-selection-button {
  display: block;
  margin: 10px 0;
}

#tutorial-button, #mission-start-button {
  position: absolute;
  top: 520px;
  right: 80px;
  padding: 10px 16px;
  background: #4a90e2;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: none; /* hidden by default */
  z-index: 20;
}
#continue-mission-A {
  position: absolute;
  top: 593px;
  right: 80px;
  padding: 10px 16px;
  background: #4a90e2;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: none; /* hidden by default */
  z-index: 20;
}
.mission-display {
    margin-top: 10px;
    padding: 8px 12px;
    background: #222;
    color: #9fdf9f;
    border-left: 4px solid #4caf50;
    font-weight: bold;
}


#dynamic-mission-list {
  position: absolute;
  top: 520px;
  left: 20px;
}

.tutorial-window {
  position: fixed;
  top: 200px;

  width: 480px;
  height: 300px;
  border-radius: 6px;
  background: #B2BEB5;
  font-size: 14px;
  display: none; /* hidden by default */
  z-index: 22;
  color: Navy;
}
  
.tutorial-window.active {
    display: block;
}
  
#tutorial-choices button {
    margin-top: 10px;
    display: block;
    width: 100%;
}

.marching-path {
  stroke-dashoffset: 0; /* Add this starting point */
  animation: march 1s linear infinite;
}

@keyframes march {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -20; /* Moves the pattern by 1 full dash+gap */
  }
}
/* Remove the redundant grid styles from the first block */
#guild-patron-inventory,
#guild2-patron-inventory,
#party-a-patron-inventory,
#party-a-guide-inventory,
#party-b-patron-inventory,
#secret-patron-inventory {
    display: flex;          /* Use Flexbox */
    flex-wrap: wrap;        /* Wrap to next line if too many items */
    gap: 0px;               /* Space between your icons */
    
    /* Layout positioning */
    position: absolute;
    width: 360px;           /* Defined width */
    z-index: 5;             /* Ensures it sits above backgrounds */
}

/* Specific position overrides */
#guild-patron-inventory { top: 100px; left: 71px; }
#guild2-patron-inventory { top: 160px; left: 71px; }
#party-a-patron-inventory { top: 283px; left: 71px; }
#party-a-guide-inventory { top: 285px; left: 14px; }
#party-b-patron-inventory { top: 374px; left: 71px; }
#secret-patron-inventory { top: 714px; left: 4px; }

.patron-slot {
    width: 57px;            /* Match your container size */
    height: 57px;
    flex: 0 0 auto;         /* Prevents squishing */
    position: relative;     /* Required so the hover-zone stays inside */
}

.dropzone {
    min-height: 60px; /* matches your 57px patron-slot size */
    background: rgba(255, 255, 255, 0.08); /* faint white tint */
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

#missions_line1 {
  position: absolute;
  top: 120px;
  left: 180px;
  z-index: 10;
}
#missions_line6 {
  color: white;
  background: #52463A;
  position: absolute;
  top: 270px;
  left: 18px;
  z-index: 10;
  padding: 2px 4px;
  border-radius: 4px;
}

#missions_line2 {
  position: absolute;
  top: 200px;
  left: 180px;
  z-index: 10;
}

#missions_line2 {
  position: absolute;
  top: 200px;
  left: 380px;
  z-index: 10;
}

#missions_line3 {
  position: absolute;
  top: 280px;
  left: 180px;
  z-index: 10;
}

#missions_line9 {
  color: white;
  background: #52463A;
  position: absolute;
  top: 697px;
  left: 4px;
  z-index: 10;
  padding: 2px 4px;
  border-radius: 4px;
}


#mail-dialog {
    position: fixed;
    top: 0;
	width: 100%;
	height: 100%;
	left: 0;

    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

#mail-dialog.hidden {
    display: none;
}

#mail-dialog-content {
    background: #fff;
    padding: 20px;
    width: 400px;
    max-width: 90%;
    border-radius: 8px;
}

#mail-body {
    white-space: pre-line;
}

.confirm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid #c9a86a;
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    z-index: 500; /* above mainWindow but below menus */
}

.confirm.hidden {
    display: none;
}

.confirm-box {
    text-align: center;
    color: #fff;
}

.confirm-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: space-around;
}

/* .hover-zone, */
/* .tooltip { */
    /* pointer-events: none; */
/* } */

.patron-slot img {
    pointer-events: none;
    user-drag: none;
    -webkit-user-drag: none;
}

.patron-slot.selected {
    outline: 3px solid gold;
    background: rgba(255, 215, 0, 0.25);
    transform: scale(1.1);
    box-shadow: 0 0 15px gold;
    z-index: 20;
}

.patron-slot {
    transition: all 0.2s ease;
}


#portrait-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 120px;
    overflow-x: auto;
    white-space: nowrap;
    background: rgba(0,0,0,0.6);
}

#portrait-bar img {
    height: 100px;
    margin: 10px;
    cursor: pointer;
    border-radius: 6px;
}
/* Main container */
.char-container {
    padding: 20px;
    font-family: "Georgia", serif;
    color: #eee;
}

/* Header layout */
.char-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

/* Portrait */
.char-portrait {
    height: 150px;
    width: 150px;
    border-radius: 8px;
    border: 2px solid #666;
    object-fit: cover;
}

/* Name + basic info */
.char-basic-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.char-name {
    margin: 0;
    font-size: 28px;
    color: #fff;
}

/* Section titles */
.char-section h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 20px;
    color: #ffd27f;
}

/* Stats list */
.char-stats,
.char-traits {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 90px;   /* adjust to your layout */
}

.char-stats-grid {
    display: flex;
    gap: 20px;
}

.char-stats li,
.char-traits li {
    padding: 4px 0;
    border-bottom: 1px solid #444;
}
.char-stats li:last-child {
    border-bottom: none;
}

.patron-window {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.patron-portrait {
  width: 180px;
  border-radius: 6px;
}

.patron-stats p {
  margin: 4px 0;
}

.infoPopupPatron {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.60); /* 25% opacity */
  max-width: 360px; /* keeps normal windows tidy */

}
.infoPopupPatron.applicant-mode {
  max-width: 450px; /* expands ONLY for applicants */
}

.status-bar {
    display: flex;
    align-items: center;        /* vertically center the text block */
    justify-content: flex-start;/* no horizontal centering */
    min-height: 24px;
    line-height: 24px;
    overflow: hidden;
}

/* Inner text: max 2 lines with ellipsis */
.status-bar-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;      /* limit to 2 lines */
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;        /* allow wrapping */
}

#loadingScreen {
    display: none; /* default hidden */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 99999;
}

#guild-stash {
	position: absolute;
	top: 200px; 
	left: 80px;
}

.stash-grid {
  display: grid;
  grid-template-columns: repeat(4, 64px);
  grid-gap: 2px;
  position: absolute;
  top: 70px;   /* below the chest */
  left: 0;
  z-index: 19999; /* above everything */
}

.stash-slot {
  width: 64px;
  height: 64px;
  position: relative;
  background: rgba(0,0,0,0.3);
  border: 1px solid #555;
}

.stash-slot .qty {
  position: absolute;
  bottom: 2px;
  right: 4px;
  color: white;
  font-size: 14px;
  text-shadow: 1px 1px 2px black;
}

.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

#stash-chest-icon:hover {
  cursor: pointer;
}

#overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0,0,0,0.3);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}


#overlay.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: white;
}

.slot {
    width: 48px;
    height: 48px;
    border: 2px solid #444;
    margin: 4px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.slot.empty {
    background: rgba(255,255,255,0.1);
}

.slot.locked {
    background: rgba(100,100,100,0.4);
    pointer-events: none; /* cannot click */
}

.lock-icon {
    filter: grayscale(100%) brightness(60%);
    opacity: 0.6; /* optional */
}

#satchel {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    width: 500px;
    max-width: 90vw;
}

.satchel-window {
    position: relative;
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 8px;

    padding: 20px;
    width: 600px;
    min-height: 400px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    z-index: 9999;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    z-index: 10000;
}

.satchel-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adv-satchel {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 6px;
}

.adv-items {
    display: flex;
    gap: 6px;
}

.adv-name {
	color: white; 
}
/* .slot { */
    /* width: 48px; */
    /* height: 48px; */
    /* background: #333; */
    /* border: 1px solid #555; */
    /* border-radius: 4px; */
    /* position: relative; */
/* } */

.slot.locked {
    background: #222;
    border-color: #666;
}

.lock-icon {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

#portrait-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;

    gap: 3px;
    padding: 2px;

    -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
    scroll-behavior: smooth;           /* smooth Android scrolling */
    touch-action: pan-x;               /* allow horizontal swiping */
}

#portrait-scroll img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 1px;
    cursor: pointer;
    flex-shrink: 0;
}


#portrait-scroll img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0; /* prevents images from shrinking */
}

/* Optional: prettier scrollbars (Chrome/Edge) */
#portrait-scroll::-webkit-scrollbar {
    height: 6px;
}
#portrait-scroll::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}
#portrait-scroll::-webkit-scrollbar-track {
    background: #222;
}

.poi {
    font-size: 20px; /* base size */
}

.poi[style*="scale(1.5)"] {
    font-size: 30px;
}

.poi[style*="scale(0.25)"] {
    font-size: 200px;
}

.mapLight::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 7px;
    width: 0.25em;
    height: 0.25em;
    background: radial-gradient(circle, MediumSlateBlue 0%, transparent 70%);
    animation: twinkle 1.2s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.9;
}

@keyframes twinkle {
    0%, 100% { transform: scale(0.4); opacity: 0.5; }
    50%      { transform: scale(1.4); opacity: 1; }
}