
  html, body {
  margin: 0;
  }

/**********************************************************DEBUG HELPERS START**********************************************************/

  * {
  /*  outline: 1px solid red !important; */
  }

  /*
  .container {
  background: rgba(255,0,0,0.1) !important;
  }
  */

/**********************************************************DEBUG HELPERS END**********************************************************/

  @font-face {
  font-family: "Pixelated MS Sans Serif";
  src: url("fonts/ms-sans-serif-1.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  }

/**********************************************************BG DISPLAY START**********************************************************/

  body {
  background-image: url("images/bg_loop_.png");
  /*background-image: url("https://i.imgur.com/IhPMvI7.png");*/
  background-repeat: repeat;
  background-size: 200px 200px; 
  min-height: 100%;
  overflow-x: hidden;
  cursor: none;
  }

/**********************************************************BG DISPLAY END**********************************************************/

/**********************************************************ICON DISPLAY START**********************************************************/

  .icon-bar {
  display: flex;
  gap: 12px;      
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 16px;
  margin-top: 8px;
  
  position: fixed;
  pointer-events: auto !important;
  
  z-index: 20000 !important;
  }

  .icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 64px;      
  pointer-events: auto !important;
  cursor: pointer !important;
  }

  .icon {
  width: clamp(32px, 5vw, 52px);
  height: auto;
  object-fit: contain;
  transition: transform 0.2s;
  }

  .icon-item:hover .icon {
  transform: scale(1.1); 
  transition: transform 0.25s ease-in-out; 
  }

  .icon-label {
  margin-top: 4px;
  text-align: center;
  color: white; 
  user-select: none;
  white-space: nowrap;
  
  font-family:
  "Pixelated MS Sans Serif",
  Tahoma,
  "MS Sans Serif",
  "Microsoft Sans Serif",
  Arial,
  sans-serif;
  font-size: 11px;

  line-height: 1;
  letter-spacing: 0;

  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  font-smooth: never;

  text-rendering: optimizeSpeed;
  }

  .icon-bar,
  .icon-item,
  .icon-item * {
  pointer-events: auto !important;
  }

  .icon-item,
  .icon-item * {
  pointer-events: auto !important;
  cursor: pointer !important;
  }

  @media (max-width: 768px) {
  .icon-bar {
  flex-direction: column;   
  align-items: flex-start;   
  gap: 12px;
  margin-left: 10px;        
  margin-top: 8px;  
  }

  .icon-item {
    flex-direction: column;
    align-items: flex-start;  /* left-align icon + label */
    gap: 4px;
    width: auto;
  }

  .icon-label {
    text-align: left;
    white-space: normal;
  }

  .icon {
    width: 36px; /* optional slightly smaller for medium screen */
  }
  }

  @media (max-width: 480px) {

  .icon-bar {
  flex-direction: column;   
  align-items: flex-start;  
  gap: 12px;
  margin-left: 10px;
  }

  .icon-item {
  flex-direction: column;   
  align-items: center;      
  gap: 4px;          
  width: auto;
  }

  .icon {
  width: 38px;             
  height: auto;
  }

  .icon-label {
  font-size: 11px;          
  text-align: center;     
  white-space: normal;     
  }
  }

/*RECYCLE BIN START*/

  #recycle-bin {
  position: fixed;
  top: 20px;
  z-index: 10000;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  }

  #recycle-bin img {
  width: clamp(32px, 5vw, 52px);
  height: auto;
  object-fit: contain;
  transition: transform 0.2s;
  }

  #recycle-bin:hover img {
  transform: scale(1.1);
  }

  #recycle-bin .icon-label {
  margin-top: 4px;
  font-size: 12px;
  text-align: center;
  color: white;
  user-select: none;
  }

  @media (max-width: 480px) {
  #recycle-bin {
  top: 10px;
  right: 10px;
  }
  #recycle-bin img {
  width: 38px;
  }
  #recycle-bin .icon-label {
  font-size: 11px;
  }
  }

/*RECYCLE BIN END*/

/**********************************************************ICON DISPLAY END**********************************************************/

/**********************************************************CONTAINER START**********************************************************/

  .container {
  display: none; 
  width: 90%;
  max-width: 600px;
  margin: 0 auto 20px auto;
  padding: 16px;
  background-color: #222;  
  border: 2px solid #000;
  border-radius: 8px;
  color: white;  
  box-sizing: border-box;
  }

  .container.frame-window {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  }

  .container.window {
  background: #ece9d8;
  color: #000;
  padding: 0;
  }

  .window {
  position: fixed;
  top: 120px;
  background: #ece9d8;
  border: 1px solid #000080;
  box-shadow:
  2px 2px 0 #ffffff,
  4px 4px 0 #808080,
  6px 6px 0 #000;
  border-radius: 6px;
  overflow: hidden;
  min-width: 200px;
  max-width: 90vw;
  transition: box-shadow 0.15s ease;
  }

  .window,
  .frame-window {
  position: fixed;
  z-index: 60000;
  top: 120px;
  left: 50%;
  }

  .window:hover ~ .icon-bar {
  pointer-events: none;
  }

  .window-header {
  background: linear-gradient(
  to bottom,
  #3a6ea5 0%,
  #2a5d9f 50%,
  #1e4f91 100%
  );
  padding: 6px 8px;
  font-family: Tahoma, sans-serif;
  font-size: 13px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
  }

  .window-body {
  background: #ffffff;
  padding: 12px;
  font-family: "Comic Sans MS", cursive;
  font-size: 13px;
  color: #000;
  line-height: 1.4;
  }

  .window-title {
  text-shadow: 1px 1px 0 #000080;
  }

  .close-btn {
  width: 18px;
  height: 18px;
  background: linear-gradient(#ff5c5c, #c00000);
  border: 1px solid #800000;
  border-radius: 3px;
  color: white;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  }

  .close-btn:hover {
  background: linear-gradient(#ff8080, #e00000);
  }

  .close-btn:active {
  background: linear-gradient(#a00000, #ff5c5c);
  }

  .frame-welcome {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 5 / 4;
  background: url("images/frame_welcome_1.png") no-repeat center / contain;
  padding: 16px;
  box-sizing: border-box;
  cursor: move;
  }

  .frame-welcome * {
  pointer-events: none;  
  }

  #welcome-container a {
  pointer-events: none;
  cursor: default;
  }
  
  #welcome-container .frame-welcome {
  background: url("images/frame_welcome_4.png") no-repeat center / contain !important;
  }

  .about-window .frame-welcome {
  background: url("images/frame.png") no-repeat center / contain;
  }

  .frame-welcome .icon-bar,
  .frame-welcome .icon-item,
  .frame-welcome .icon-item * {
  pointer-events: auto !important;
  cursor: pointer;
  }

  .frame-window {
  position: fixed;
  top: 120px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 90%;          
  max-width: 480px;
  touch-action: none;    
  }

  .frame-window,
  .window {
  z-index: 60000;
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  transform: none;
  }

  .frame-close {
  position: absolute;
  top: 44px !important;
  right: 36px !important;
  z-index: 5;

  width: 24px !important;
  height: 20px !important;

  background: #ccc;
  border: 1px solid #888;
  border-radius: 2px;
  color: #333;

  font-size: 12px;
  font-weight: bold;

  line-height: normal;   /* 🔑 */
  padding: 0;            /* 🔑 */

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  }
 
  @media (min-width: 481px) and (max-width: 1024px) {
  #welcome-container .frame-close {
  top: 2%;
  right: 2%;
  width: 5% !important;
  height: 5% !important;
  font-size: 2vw !important;
  }
  }

  @media (min-width: 480px) {
  #welcome-container .frame-close {
  right: 34.5px !important;
  }
  }
 
  @media (max-width: 480px) {
  .frame-close {
  top: 30px !important;
  right: 23px !important;

  width: 18px !important;
  height: 15px !important;

  font-size: 6px;
  }
  }
  
  .close-red {
  background: linear-gradient(#ff5c5c, #c00000);
  border: 1px solid #800000;
  color: white;
  }

  .close-red:hover {
  background: linear-gradient(#ff8080, #e00000);
  }

  .close-red:active {
  background: linear-gradient(#a00000, #ff5c5c);
  }

  .content-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  padding-left: 20px; 
  transform: translateX(1px);
  }

  .content-img {
  width: clamp(80px, 40%, 200px);
  height: auto;
  flex-shrink: 0;
  }

  .text {
  font-family:
  "Pixelated MS Sans Serif",
  Tahoma,
  "MS Sans Serif",
  "Microsoft Sans Serif",
  Arial,
  sans-serif;
  font-size: clamp(12px, 1.5vw, 16px);
  flex: 1;
  min-width: 120px;
  text-align: left;
  }

  .rainbow {
  font-weight: bold;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.4;
  }
  
  #wisdom-container .frame-welcome {
  background: url("images/wisdom_bg_1.png") no-repeat center / cover;
  overflow: hidden;     
  position: relative; 
  display: block; 
  pointer-events: auto;
  padding-bottom: 35px;
  }
  
  #wisdom-pet {
  position: absolute;
  bottom: 80px !important;           
  left: 50%;
  width: 55px;     
  cursor: pointer;
  transition: all 3s linear; 
  z-index: 1000;  
  pointer-events: auto;
  }

  #wisdom-text {
  position: absolute;
  bottom: 5px !important;      
  left: 20% !important;
  width: 80%;          
  text-align: left;
  transform: none; 
  font-family:
  "Pixelated MS Sans Serif",
  Tahoma,
  "MS Sans Serif",
  "Microsoft Sans Serif",
  Arial,
  sans-serif !important;
  font-size: 14px;
  color: black;
  pointer-events: none; 
  min-height: 20px;     
  z-index: 1001;
  }
  
  @media (max-width: 480px) {
  #wisdom-pet {
  width: 40px !important;      
  bottom: 48px !important;    
  }

  #wisdom-text {
  font-size: 12px !important; 
  bottom: 0px !important;      
  left: 20% !important;       
  width: 85% !important;  
  }
  }

  #bio-container .frame-welcome {
  background: url("images/bio_bg_8.gif") no-repeat center / contain !important;
  position: relative;
  }
  
  #bio-container {
  width: 85% !important;
  max-width: 620px !important; 
  }

  #bio-container .close-btn {
  position: absolute;
  top: 14px !important;
  left: 498px !important;   
  }

  #bio-container .bio-actions,
  #bio-container .bio-actions * {
  pointer-events: auto;
  }

  #bio-container .bio-btn {
  font-family:
    "Pixelated MS Sans Serif",
    Tahoma,
    "MS Sans Serif",
    Arial,
    sans-serif;

  font-size: 11px !important;
  padding: 3px 8px !important;

  color: white;

  background: linear-gradient(
    to bottom,
    #ffb347,
    #ff8c00
  );

  border: 1px solid #a34a00;
  border-radius: 2px;

  box-shadow:
    inset 1px 1px 0 #ffd9a6,
    inset -1px -1px 0 #cc6a00,
    1px 1px 0 #000;

  cursor: pointer;
  }
  
  #bio-container .bio-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

  #bio-container .bio-btn {
  position: absolute;
  top: 68px;
  left: 430px;
  pointer-events: auto;
  z-index: 20;
  }

  @media (max-width: 480px) {
  #bio-container .bio-btn {
  top: 38px;
  left: 250px;  
  font-size: 3px !important;
  padding: 2px 6px !important;
  }
  }
  
  
@media (max-width: 604px) {
  #avatar-container > .close-btn {
    position: absolute;
    top: 5px !important;       /* visible distance from top */
    left: 5px !important;      /* pull it into view */
    right: auto !important;    /* cancel desktop overrides */
    width: 18px !important;    /* smaller button for mobile */
    height: 14px !important;
    font-size: 8px !important; /* smaller ✕ symbol */
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1000 !important;  /* ensure above frame background */
    visibility: visible !important;
    pointer-events: auto !important;
    background: red !important; /* temporary debug: remove after confirming */
  }
}

  @media (max-width: 480px) {
  #bio-container .frame-welcome .bio-links {
  top: 85px;
  left: 70px;
  font-size: 6px;
  }
  
  #bio-container .bio-links a {
  line-height: 3px !important;  
  margin-bottom: 0;  
  font-size: 7px;   
  }
  }

  @media (max-width: 375px) {
  #bio-container .frame-welcome .bio-links {
  top: 70px;
  left: 60px !important;
  font-size: 5px;
  }
  
  #bio-container .bio-links a {
  line-height: 3px !important;  
  margin-bottom: 0;  
  font-size: 6px;   
  }
  
  #bio-container .bio-btn {
  top: 30px;
  left: 210px;  
  font-size: 5px !important;
  padding: 2px 6px !important;
  }
  }

  #avatar-container .frame-welcome {
  background: url("images/avatar_kero_1.gif") no-repeat center / contain !important;
  }
  
  #avatar-container .close-btn {
  position: absolute;  
  top: 15px !important;       
  left: 384px !important;        
  z-index: 20;
  width: 20px !important;        
  height: 16px !important; 
  }
  
  #bio-container .bio-links {
  position: absolute;
  top: 142px;
  left: 120px;
  z-index: 20;

  font-family:
  "Pixelated MS Sans Serif",
  Tahoma,
  "MS Sans Serif",
  Arial,
  sans-serif;
  font-size: 11px;
  }

  #bio-container .bio-links a {
  display: block;
  margin-bottom: 0;
  line-height: 5px;  
  }

  #bio-container .bio-links,
  #bio-container .bio-links * {
  pointer-events: auto;
  }

  @media (max-width: 480px) {
  #welcome-container .content-wrapper {
    transform: translateX(-8px); 
  }
  }

  @media (max-width: 480px) {
  .gif-icon { width: 50px; height: 50px; }
  .text { font-size: 12px; }
  .content-img { width: clamp(60px, 35%, 150px); }
  }

/*MUSIC PLAYER START*/

  #music-player {
  display: none; 

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: clamp(220px, 60vw, 360px);
  height: clamp(220px, 60vw, 360px);

  background: url("images/player_.png") no-repeat center / contain;

  border: 2px solid #000;
  border-radius: 8px;
  outline: 4px solid red;

  z-index: 100000;
  }

/* Close button */
  .music-close {
  position: absolute;    
  top: 8px;             
  right: 8px;           
  width: 16px;          
  height: 16px;
  font-size: 10px;       
  font-weight: bold;

  background: #ccc;
  border: 1px solid #888;
  color: #333;
  border-radius: 2px;

  cursor: pointer;
  text-align: center;
  line-height: 16px;     

  flex: none;            
  }

  .music-close:hover {
  background: #eee;
  }

/* GIF inside the player */
  .music-gif {
  width: 90%;
  max-width: 320px;
  height: auto;
  }

/*MUSIC PLAYER END*/

/**********************************************************CONTAINER END**********************************************************/

/**********************************************************STINKY SNAIL START**********************************************************/

  .snail {
  position: fixed;
  width: clamp(60px, 5vw, 90px);  
  z-index: 9000;
  bottom: 5px;  
  left: 0;
  transform: scaleX(1);
  cursor: pointer;
  pointer-events: auto;
  }

  @media (min-width: 769px) {
  .snail {
  width: clamp(80px, 6vw, 120px);  
  bottom: 20px;  
  }
  }

  .snail img {
  width: 100%;
  height: auto;
  display: block;
  }

  .background,
  .snail {
  z-index: 20000;
  }

/**********************************************************STINKY SNAIL END**********************************************************/

/**********************************************************COIN COLLECTOR START**********************************************************/

  .coin {
  position: fixed;
  width: 30px;
  height: 30px;
  pointer-events: none;
  z-index: 30000;
  transition: transform 0.1s linear;
  background-image: url("images/coin_.gif");  
  background-size: cover;
  background-position: center;
  }

  .coin,
  .coin-container,
  .falling-coin {
  z-index: 30000;
  pointer-events: none;
  }

  .explosion {
  position: fixed;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 9600;
  background-image: url("images/explosion.gif");  
  background-size: cover;
  background-position: center;
  }

  .coin-counter {
  position: fixed;
  left: 12px;
  bottom: clamp(3px, 3vh, 36px);
  width: clamp(64px, 8vw, 96px);
  height: clamp(64px, 8vw, 96px);

  background-image: url("images/feesh_bowl.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 900;
  pointer-events: auto;

  cursor: grab;       
  touch-action: none;  
  }

  .coin-counter .coin-value {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  font-family: "Tahoma", sans-serif;
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: bold;
  color: white;

  line-height: 1;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;  

  text-shadow:
  1px 1px 0 #000,
  -1px 1px 0 #000,
  1px -1px 0 #000,
  -1px -1px 0 #000;
  }

  @media (max-width: 480px) {
  .coin-counter {
  bottom: 12px;  
  }
  }

  .fish {
  position: fixed;
  width: 60px;
  height: auto; 
  pointer-events: auto;
  cursor: pointer;
  z-index: 10001;
  }

  #fish-background {
  pointer-events: auto;  
  }

  img, .fish, .carnivore, .coin, #coin-counter, #recycle-bin, #stinky {
  user-select: none;               /* Standard */
  -webkit-user-select: none;       /* Chrome, Safari, Brave */
  -moz-user-select: none;          /* Firefox */
  -ms-user-select: none;           /* IE/Edge */
  -webkit-tap-highlight-color: transparent; /* Mobile/touch highlight */
  outline: none;                   /* Prevent focus outline */
  }

/**********************************************************COIN COLLECTOR END**********************************************************/

/**********************************************************EYESEYESEYES START**********************************************************/

  .background-eye {
  position: fixed;
  pointer-events: none;
  z-index: 5000;
  opacity: 0.7;
  mix-blend-mode: multiply;
  transition: opacity 0.3s;
  }

/**********************************************************EYESEYESEYES END**********************************************************/

/**********************************************************COIN COLLECTOR END**********************************************************/

/**********************************************************FOOTER START**********************************************************/

  footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;    
  z-index: 1000;
  }

  .footer-img {
  width: 100%;       
  height: auto;     
  display: block;     
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;        
  }

  .taskbar-content {
  position: relative;
  z-index: 1;        
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 0 10px;
  }

  .clock {
  font-family: "Tahoma", sans-serif;
  font-size: 1.3vw; 
  color: white;    
  }

  .tooltip {
  position: relative;
  display: inline-block;
  cursor: default; /* optional */
  font-family: "Comic Sans MS", cursive;
  }

  .tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #e0e0e0;        
  color: black;
  text-align: center;
  padding: 4px 8px;
  border: 2px solid #000080;      
  border-radius: 4px;
  position: absolute;
  bottom: 125%;                    
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  
  opacity: 0;
  transition: opacity 0.3s;
  }

  .tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  }

  .tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%; 
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #e0e0e0 transparent transparent transparent;
  }

  @media (max-width: 480px) {
  .clock {
  position: absolute;
  right: 0px;     
  bottom: 0px;    
  font-size: 0.9vw; 
  white-space: nowrap;  
  }
  }

/**********************************************************FOOTER END**********************************************************/

/**********************************************************CLIPPY START**********************************************************/

  .assistant {
  position: fixed;
  bottom: 18px;    
  right: 18px;     
  width: clamp(60px, 8vw, 120px);  
  height: auto;
  cursor: grab;
  z-index: 9500;
  padding-bottom: env(safe-area-inset-bottom);
  padding-right: env(safe-area-inset-right);
  }

  @media (max-width: 768px) {
  .assistant {
  width: clamp(80px, 15vw, 160px);  
  height: auto;
  bottom: auto;
  right: auto;
  }
  }

  .assistant,
  .assistant * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  }

  .assistant img {
  width: 100%;
  height: auto;
  }

  .speech-bubble {
  position: absolute;
  bottom: 100%;
  right: 0;
  transform: translateY(-10px);

  max-width: 200px;
  padding: 8px 10px;
  background: #ffffe1;
  border: 2px solid #000;
  border-radius: 8px;

  font-family: Tahoma, sans-serif;
  font-size: clamp(11px, 1.2vw, 13px);
  color: #000;

  box-shadow: 2px 2px 0 #000;

  opacity: 0;
  transition: opacity 0.2s ease;
  }

  .speech-bubble::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -10px;
  border-width: 6px;
  border-style: solid;
  border-color: #000 transparent transparent transparent;
  }

  .speech-bubble::before {
  content: "";
  position: absolute;
  right: 21px;
  bottom: -8px;
  border-width: 5px;
  border-style: solid;
  border-color: #ffffe1 transparent transparent transparent;
  }

  .speech-bubble.show {
  opacity: 1;
  }

/**********************************************************CLIPPY END**********************************************************/

.custom-cursor {
  position: fixed;
  pointer-events: none; 
  width: 32px;
  height: 32px;
  z-index: 9999;
  top: 0;
  left: 0;
  transform: translate(0,0);
  mix-blend-mode: difference;  
}
