    :root {
      --pink: #ff69b4;
      --gold: #ffd700;
      --dark: #0f0a1f;
      --card: #1a1433;
      --accent: #a0ffa0;
      --invisible: #ffffff00;
    }
	
	/* Hidden utility */
.hidden {
  display: none !important;
}

    * { box-sizing: border-box; }

    body {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--dark);
      color: #eee;
      margin: 0;
      padding: 20px;
      line-height: 1.6;
      user-select: none;
    }

    img {
      -webkit-user-drag: none;
      user-select: none;
    }

    /* ==================== YOUR ORIGINAL STYLES (unchanged) ==================== */
    header { text-align: center; }
    h1 { font-size: 2.5rem; color: var(--pink); margin: 0 0 10px 0; }
    #last-updated { color: #aaa; font-size: 1.05rem; }

/* ==================== HEADER ACTIONS - Sticky Top ==================== */
.header-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f0a1f;
  z-index: 100;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,105,180,0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.header-actions #last-updated {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #aaa;
  padding: 0 10px;
}

/* Optional: nicer spacing on mobile */
@media (max-width: 768px) {
  .header-actions {
    padding: 6px 8px;
  }
  .header-actions #last-updated {
    font-size: 12px;
  }
}

    .settings-btn {
      background: #1a1433;
      color: var(--pink);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s;
    }

    .settings-btn:hover {
      background: var(--pink);
      color: white;
    }

    .date-navigator {
      display: flex; align-items: center; justify-content: center; gap: 25px;
    }
    .nav-arrow {
      background: #1a1433; color: var(--pink); border: 2px solid var(--pink);
      width: 36px; height: 36px; border-radius: 50%; font-size: 1.8rem;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: all 0.2s;
    }
    .nav-arrow:hover { background: var(--pink); color: white; transform: scale(1.1); }
    .nav-arrow.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

    .current-date { font-weight: bold; color: var(--gold); min-width: 160px; text-align: center; }

    /* ==================== TABLE LAYOUT ==================== */
    .table-container {
      overflow-x: auto;
      overflow-y: auto;
      max-height: calc(100vh - 190px);
      -webkit-overflow-scrolling: touch;
      padding: 10px 0;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
          cursor: grab;
}

.table-container::-webkit-scrollbar {
  display: none;                /* Chrome/Safari/Edge */
}

.table-container:active {
  cursor: grabbing;
}

    .schedule-table {
      width: max-content;
      min-width: 1680px;
      border-collapse: collapse;
      background: var(--dark);
    }
    .schedule-table th {
      background: #1a1433;
      color: var(--pink);
      position: sticky;
      top: 0;
      z-index: 10;
      font-size: 1.0rem;
    }
    .schedule-table td {
      padding: 10px;
      vertical-align: top;
      width: 340px;
      min-height: 168px;
    }

    /* Horizontal Card - based on your design */
    .cast-card {
      background: var(--card);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 6px 20px rgba(255, 105, 180, 0.15);
      transition: all 0.25s ease;
      border: 3px solid transparent;
      display: flex;
      height: 158px;
      min-width: max-content;
    }
    .cast-card.birthday-card {
      border-color: var(--gold);
      box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
      animation: birthday-glow 2s infinite alternate;
    }

    .cast-image {
      position: relative;
      flex-shrink: 0;
      background: #000;
      overflow: hidden;
    }
    .cast-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .cast-name-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(0,0,0,0.9));
      color: white;
      padding: 20px 10px 12px;
      text-align: center;
      font-size: 1.25rem;
      font-weight: bold;
      text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    }

    .cast-info {
      flex: 1;
      padding: 0 14px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
	  margin-top: 3px;
    }

    .time-top-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }
    .cast-mark { font-size: 30px; }
	.shift-icon-container {align-self: center;margin-top: 10px;}
    .shift-icon-container img { height: 30px; }

.premium-time {
  color: var(--accent);
  font-family: monospace;
  font-size: 1.0rem;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(160, 255, 160, 0.1);
  border-radius: 6px;
  display: flex;
}

    .cast-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 6px 0;
    }
    .badge {
      font-size: 0.78rem;
      padding: 3px 9px;
      border-radius: 12px;
      font-weight: bold;
    }
    .badge.visiting { background: #00b7eb; color: white; }
    .badge.birthday { background: var(--gold); color: #000; }

    .sns-links {
      margin-top: auto;
      display: flex;
      gap: 12px;
	  margin: 0 10px;
    }
    .sns-icon {
      color: #bbb;
      font-size: 1.45rem;
      transition: all 0.2s;
    }
    .sns-icon:hover { color: var(--pink); transform: scale(1.25); }

/* Colored Store Headers */
.schedule-table th.east-group   { background: #E85F97 !important; color: white; }   /* Pink */
.schedule-table th.west-group   { background: #4CAADE !important; color: white; }   /* Blue */
.schedule-table th.osaka-group   { background: #8b5cf6 !important; color: white; }   /* Purple */
.schedule-table th.nagoya-group  { background: #14b8a6 !important; color: white; }   /* Teal */
.schedule-table th.other-group   { background: #f59e0b !important; color: white; }   /* Orange */

    /* Birthday effects (your original) */
    @keyframes birthday-glow {
      from { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
      to   { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
    }

    /* ==================== YOUR MOBILE OPTIMIZATIONS ==================== */
    @media (max-width: 768px) {
      body { padding: 12px; }
      h1 { font-size: 1.0rem; }
      .schedule-table { min-width: 1480px; }
      .cast-card { height: 142px; }
      .cast-name-overlay { font-size: 1.05rem; padding: 18px 8px 10px; }
      td { width: 300px; min-height: 142px; }
    }

/* ==================== PROMO SLIDESHOW ==================== */
.promo-screen {
  position: fixed;
  inset: 0;
  background: #0f0a1f;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom); /* Important for iOS/Android */
}

.promo-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(20px + env(safe-area-inset-bottom)); /* Extra breathing room */
}

.promo-slide {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: #0f0a1f;           /* Prevents flash */
}

.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* Shows full image, no cropping */
  object-position: center;
  transition: opacity 0.4s ease; /* Smoother crossfade */
  background: #0f0a1f;
}

.promo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(rgba(15,10,31,0.95), transparent);
  padding: 40px 30px 60px;
  text-align: center;
  color: white;
}

.promo-overlay h2 {
  font-size: 2.8rem;
  margin: 0 0 8px 0;
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
}

.promo-overlay p {
  font-size: 1.3rem;
  margin: 0;
  opacity: 0.9;
}

.promo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: all 0.2s;
}

.promo-nav:hover {
  background: var(--pink);
  transform: translateY(-50%) scale(1.1);
}

.prev { left: 20px; }
.next { right: 20px; }

.promo-dots {
  position: absolute;
  bottom: calc(70px + env(safe-area-inset-bottom));   /* ← Moved up */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}

.promo-dot {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.promo-dot.active {
  background: var(--pink);
  transform: scale(1.4);
}

.enter-btn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  color: white;
  border: none;
  padding: 6px 16px;
  font-size: 1.0rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255,105,180,0.4);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
}

.enter-btn:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 12px 30px rgba(255,105,180,0.6);
}

.promo-actions {
  position: absolute;
  bottom: calc(55px + env(safe-area-inset-bottom));   /* ← Button safe */
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .promo-overlay h2 { font-size: 2.1rem; }
  .promo-overlay p { font-size: 1.05rem; }
  
  .promo-dots {
    bottom: calc(65px + env(safe-area-inset-bottom));
  }
}

/* Progress timer bar */
.promo-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--pink);
  width: 100%;
  transform-origin: left;
  z-index: 15;
  border-radius: 0 0 20px 20px;
}

/* ==================== DAILY PASSWORD SCREEN ==================== */
.password-screen {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 31, 0.98);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-container {
  background: #1a1433;
  padding: 40px 30px;
  border-radius: 20px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.password-container h2 {
  margin: 0 0 8px 0;
  color: white;
}

.password-hint {
  color: #ff69b4;
  margin-bottom: 25px;
}

#daily-pw-input {
  width: 100%;
  padding: 16px;
  font-size: 1.3rem;
  background: #2a2255;
  border: 2px solid #ff69b4;
  border-radius: 12px;
  color: white;
  text-align: center;
  margin-bottom: 20px;
}

.password-buttons {
  display: flex;
  gap: 12px;
}

.cancel-btn, .submit-btn {
  flex: 1;
  padding: 14px;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
}

.cancel-btn {
  background: #444;
  color: white;
}

.submit-btn {
  background: var(--pink);
  color: white;
  font-weight: bold;
}

.pw-error {
  color: #ff6666;
  margin-top: 12px;
  min-height: 1.2em;
}

/* ==================== MAID EDIT MODE - Final ==================== */
.maid-btn {
  background: #1a1433;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: bold;
}

.maid-btn:hover {
  background: #22c55e;
  transform: scale(1.1);
}

.edit-mode-active .maid-btn {
  background: #f87171;
  color: white;
}

.edit-mode-active .cast-card {
  border: 3px dashed #4ade80;
  position: relative;
}

/* おやすみ overlay */
.absent .cast-name-overlay::after {
  content: "おやすみ";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ef4444;
  color: white;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: bold;
  white-space: nowrap;
  z-index: 3;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

/* Wrench */
.edit-wrench {
  position: absolute;
  right: 2px;
  background: #5c5c5cf2;
  color: #111;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.edit-wrench:hover {
  transform: scale(1.2) rotate(25deg);
  background: #4ade80;
}

/* Tooltip */
.edit-tooltip {
  position: absolute;
  background: #1f2937;
  border: 2px solid #4ade80;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  z-index: 100;
  min-width: 170px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .edit-tooltip {
    min-width: 160px;
    font-size: 0.9rem;
  }
}

.edit-tooltip button {
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.edit-tooltip button:hover {
  background: #4ade80;
  color: #111;
}

.mode-btn {
  background: #1a1433;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  background: #8b5cf6;
  transform: scale(1.1);
}

.edit-mode-active .mode-btn { background: #f87171; }
.admin-mode-active .mode-btn { background: #f87171; }

.restore-btn {
  background: #60a5fa;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}

.restore-btn:hover {
  background: #3b82f6;
  transform: scale(1.1);
}

.admin-mode-active #admin-restore-btn {
  display: flex !important;
}

/* Time Edit Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1a1433;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.modal-content h3 {
  margin: 0 0 20px 0;
  color: #ff69b4;
}

.time-inputs {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}

.time-inputs div {
  text-align: center;
}

.time-inputs label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #ccc;
}

.time-inputs input[type="time"] {
  background: #2a2255;
  color: white;
  border: 2px solid #ff69b4;
  border-radius: 8px;
  padding: 10px;
  font-size: 1.3rem;
  width: 130px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 1;
  padding: 14px;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
}

.cancel-btn {
  background: #444;
  color: white;
}

.save-btn {
  background: #4ade80;
  color: #111;
  font-weight: bold;
}

/* Events Row */
.events-row td {
  background: rgba(255, 105, 180, 0.08);
  padding: 8px 6px !important;
  vertical-align: middle;
  border-top: 1px solid rgba(255,105,180,0.2);
  border-bottom: 2px solid rgba(255,105,180,0.15);
  font-size: 0.9rem;
}

.event-name {
  background: rgba(255, 105, 180, 0.15);
  color: #ff69b4;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Calendar Button */
.calendar-btn {
  background: ##1a1433;
  color: white;
  font-size: 1.0rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}

.calendar-btn:hover {
  background: #3b82f6;
  transform: scale(1.1);
}

.add-global-btn {
  background: #4ade80;
  color: #111;
  font-size: 1.6rem;
  font-weight: bold;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}

.add-global-btn:hover {
  background: #22c55e;
  transform: scale(1.12);
}

.admin-mode-active .add-global-btn,
.edit-mode-active .add-global-btn {
  display: flex !important;
}