* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #222;
}

/* =========================
   Normal App Pages
   login / setup / rules / admin
========================= */

html {
  min-height: 100%;
  background: #000000;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000000;
  color: #ffffff;
}

body.app-page {
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 64px) 16px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%),
    radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.10), transparent 34%),
    linear-gradient(135deg, #020202 0%, #070707 48%, #000 100%);
  overscroll-behavior-y: none;
}

.card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 40px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 24px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  pointer-events: none;
}

.card.wide,
.wide {
  max-width: 1160px;
}

.app-brand-mini {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.app-brand-mark {
  width: min(260px, 76vw);
  text-align: center;
}

.app-brand-mark img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.16));
}

.app-brand-mark span {
  display: block;
  margin-top: -6px;
  font-family: "Times New Roman", serif;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1;
  letter-spacing: 0.38em;
  padding-left: 0.38em;
  color: #d4af37;
  text-shadow:
    0 0 10px rgba(212, 175, 55, 0.28),
    0 2px 10px rgba(0, 0, 0, 0.55);
}

h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.08em;
}

h2 {
  color: #ffffff;
  font-size: 20px;
}

p {
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.78);
}

form {
  margin-top: 26px;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  letter-spacing: 0.04em;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;
  font-size: 16px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(212, 175, 55, 0.82);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

select option {
  color: #111111;
}

.form-help {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.6;
}

.age-preview {
  color: rgba(212, 175, 55, 0.92);
  font-weight: 700;
}

button,
.button-link {
  width: 100%;
  margin-top: 26px;
  padding: 14px 18px;
  border: 1px solid rgba(212, 175, 55, 0.72);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.96), rgba(139, 99, 18, 0.96));
  color: #111111;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.label-invalid {
  color: #ff8f8f;
}

.field-invalid {
  border-color: rgba(255, 95, 95, 0.95) !important;
  background: rgba(95, 0, 0, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 95, 95, 0.13);
}

.field-invalid:focus {
  border-color: rgba(255, 115, 115, 1) !important;
  box-shadow: 0 0 0 4px rgba(255, 95, 95, 0.18);
}

.form-help-invalid {
  color: #ff8f8f !important;
  font-weight: 700;
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  filter: grayscale(0.35);
}


a {
  color: #d4af37;
}

.error,
.success,
.note,
.info,
.content-box,
.rules-box {
  position: relative;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.error {
  color: #ffd7d7;
  border-left: 4px solid #e35b5b;
}

.success {
  color: #d7ffe4;
  border-left: 4px solid #49c878;
}

.note {
  color: rgba(255, 255, 255, 0.74);
  border-left: 4px solid #d4af37;
}

.info,
.content-box,
.rules-box {
  color: rgba(255, 255, 255, 0.80);
  border-color: rgba(212, 175, 55, 0.22);
}

.rules-box {
  max-height: 52vh;
  overflow: auto;
  line-height: 1.85;
}

.rules-box h1,
.rules-box h2,
.rules-box h3,
.content-box h1,
.content-box h2,
.content-box h3 {
  margin-top: 0;
  color: #ffffff;
}

.rules-box ul {
  padding-left: 24px;
}

.rules-box li {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-label input {
  width: auto;
  accent-color: #d4af37;
}

.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}

.menu a {
  display: block;
  padding: 17px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(212, 175, 55, 0.30);
  border-radius: 16px;
  font-weight: 700;
}

.menu a:hover {
  border-color: rgba(212, 175, 55, 0.76);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(255, 255, 255, 0.04));
}

.logout {
  display: inline-block;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.68);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 26px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #ffffff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #111111;
  background: rgba(212, 175, 55, 0.92);
}

td {
  background: rgba(0, 0, 0, 0.20);
}

code {
  background: rgba(255, 255, 255, 0.10);
  color: #f8dfa0;
  padding: 2px 6px;
  border-radius: 6px;
}

/* =========================
   Dashboard Only
========================= */


html.dashboard-root {
  min-height: 100%;
  background: #000000;
  overscroll-behavior-y: none;
}

html.dashboard-root body.dashboard-page {
  min-height: 100dvh;
  background-color: #000000;
  overscroll-behavior-y: none;
}

html.dashboard-root .dashboard-main {
  min-height: 100dvh;
}

body.dashboard-page {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%),
    radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.10), transparent 34%),
    linear-gradient(135deg, #020202 0%, #070707 48%, #000 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

.dashboard-page a {
  color: inherit;
}

.dashboard-main {
  min-height: 100vh;
}

.dashboard-hidden {
  opacity: 0;
  visibility: hidden;
}

.dashboard-show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease;
}

.dashboard-hero {
  padding: clamp(30px, 5vw, 62px) clamp(20px, 5vw, 64px) 18px;
}

.dashboard-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 26px;
}


.dashboard-center-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 92px;
}

.dashboard-center-image {
  width: clamp(170px, 22vw, 240px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 22px rgba(219, 184, 100, 0.26));
}

.dashboard-user-name strong {
  font-size: clamp(1.05rem, 3.8vw, 1.45rem);
  letter-spacing: 0.08em;
}

.dashboard-brand-card {
  position: relative;
  width: min(92vw, 470px);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 74px 44px 70px;
}

.dashboard-brand-frame {
  position: absolute;
  inset: 0;
  border: 2px solid #b88713;
  opacity: 0.95;
  pointer-events: none;
}

.dashboard-brand-frame::before,
.dashboard-brand-frame::after {
  content: "";
  position: absolute;
  background: #020202;
  pointer-events: none;
}

.dashboard-brand-frame::before {
  left: -4px;
  top: 118px;
  width: 8px;
  height: 76px;
}

.dashboard-brand-frame::after {
  right: -4px;
  bottom: 78px;
  width: 8px;
  height: 58px;
}

.dashboard-brand-image {
  display: block;
  width: 88%;
  height: auto;
  object-fit: contain;
  transform: translateY(-18px);
  filter:
    drop-shadow(0 0 6px rgba(212, 175, 55, 0.18))
    drop-shadow(0 0 18px rgba(212, 175, 55, 0.10));
}

.dashboard-brand-sub {
  margin-top: -8px;
  text-align: center;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: #f3f3f3;
  font-family: "Times New Roman", serif;
  line-height: 1;
}

.dashboard-user-panel {
  min-width: min(100%, 320px);
  max-width: 560px;
  width: min(100%, 560px);
  padding: 24px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.36);
}

.dashboard-user-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.dashboard-user-line:last-child {
  border-bottom: none;
}

.dashboard-user-line span {
  color: rgba(255, 255, 255, 0.64);
  letter-spacing: 0.08em;
}

.dashboard-user-line strong {
  color: #ffffff;
  text-align: right;
  font-weight: 700;
  word-break: break-word;
}

.dashboard-content {
  padding: 26px clamp(20px, 5vw, 64px) 108px;
  display: grid;
  gap: 36px;
}

.dashboard-section {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.dashboard-section-head h1,
.dashboard-section-head h2 {
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.dashboard-section-head p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  padding: 22px;
  border-radius: 18px;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(212, 175, 55, 0.30);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.76);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(255, 255, 255, 0.04));
}

.dashboard-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.dashboard-card-sub {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.7;
}

.dashboard-notice-section {
  padding: clamp(14px, 2vw, 20px);
}

.dashboard-notice-section .dashboard-section-head p {
  margin-top: 6px;
}

.dashboard-notice-box {
  margin-top: 12px;
  padding: 13px 16px;
  max-height: 124px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  line-height: 1.65;
  color: #ffffff;
  scrollbar-width: thin;
}

.dashboard-notice-box p,
.dashboard-notice-box li {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
}

.dashboard-notice-box h1,
.dashboard-notice-box h2,
.dashboard-notice-box h3,
.dashboard-notice-box p,
.dashboard-notice-box li,
.dashboard-notice-box strong {
  color: #ffffff;
}

.dashboard-profile-section {
  border-color: rgba(212, 175, 55, 0.18);
}

.dashboard-profile-section .dashboard-user-panel {
  margin-top: 18px;
}

.dashboard-footer {
  position: fixed;
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 20;
  padding: 0;
}

.dashboard-logout {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 235, 235, 0.92);
  background: rgba(55, 0, 0, 0.28);
  border: 1px solid rgba(255, 96, 96, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-logout:hover {
  background: rgba(120, 0, 0, 0.34);
  border-color: rgba(255, 125, 125, 0.68);
  transform: translateY(-2px);
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
  .card {
    margin: 24px 16px;
    padding: 24px;
  }

  .menu {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-inner {
    justify-items: center;
    align-items: center;
  }

  .dashboard-brand-card {
    width: min(92vw, 420px);
    margin: 0 auto;
    padding: 66px 34px 62px;
  }

  .dashboard-brand-frame::before {
    top: 104px;
    height: 66px;
  }

  .dashboard-brand-frame::after {
    bottom: 68px;
    height: 50px;
  }

  .dashboard-brand-sub {
    font-size: clamp(26px, 8vw, 44px);
    letter-spacing: 0.34em;
    padding-left: 0.34em;
  }


  .dashboard-center-image-wrap {
    min-height: 96px;
  }

  .dashboard-center-image {
    width: clamp(138px, 42vw, 180px);
  }

  .dashboard-user-panel {
    min-width: 100%;
  }

  .dashboard-content {
    padding-bottom: 40px;
  }

  .dashboard-footer {
    position: static;
    padding: 0 20px 34px;
    display: flex;
    justify-content: flex-end;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Dashboard menu / rules modal / page transition
========================= */
.dashboard-card-button {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.30);
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.rules-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.rules-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rules-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.rules-modal-panel {
  position: relative;
  width: min(1120px, calc(100vw - 32px));
  height: min(860px, calc(100dvh - 32px));
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 30%),
    linear-gradient(135deg, #050505, #111111 48%, #020202);
  color: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.66);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.5s ease;
  overflow: hidden;
}

.rules-modal.is-open .rules-modal-panel {
  transform: translateY(0) scale(1);
}

.rules-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px clamp(20px, 4vw, 38px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.rules-modal-head h2 {
  margin: 0;
  letter-spacing: 0.12em;
}

.rules-modal-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.rules-modal-close {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.rules-modal-body {
  overflow: auto;
  padding: clamp(20px, 4vw, 38px);
  line-height: 1.9;
}

body.modal-open {
  overflow: hidden;
}

.page-mickey-transition,
.subpage-mickey-transition {
  position: fixed;
  left: 0;
  right: 0;
  top: env(safe-area-inset-top, 0px);
  bottom: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.page-mickey-transition.is-active,
.subpage-mickey-transition.is-active {
  opacity: 1;
  visibility: visible;
}

.page-mickey-shape,
.subpage-mickey-shape {
  position: relative;
  width: 170px;
  height: 148px;
  transform: scale(0.02);
  transform-origin: center;
}

.page-mickey-transition.is-active .page-mickey-shape,
.subpage-mickey-transition.is-active .subpage-mickey-shape {
  animation: pageMickeyExpand 2s cubic-bezier(0.58, 0, 0.18, 1) forwards;
}

.page-mickey-head,
.page-mickey-ear,
.subpage-mickey-head,
.subpage-mickey-ear {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #ffffff;
}

.page-mickey-head,
.subpage-mickey-head {
  width: 104px;
  height: 104px;
  left: 33px;
  top: 44px;
}

.page-mickey-ear,
.subpage-mickey-ear {
  width: 72px;
  height: 72px;
  top: 0;
}

.page-mickey-ear-left,
.subpage-mickey-ear-left {
  left: 0;
}

.page-mickey-ear-right,
.subpage-mickey-ear-right {
  right: 0;
}

@keyframes pageMickeyExpand {
  0% { transform: scale(0.02); }
  100% { transform: scale(24); }
}

/* =========================
   Sample pages
========================= */
.sample-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.sample-page-kicker {
  margin: 0 0 8px;
  color: rgba(212, 175, 55, 0.86);
  letter-spacing: 0.16em;
  font-size: 0.82rem;
}

.sample-page-title {
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.sample-back-link {
  flex: 0 0 auto;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.045);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.sample-panel {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  line-height: 1.8;
}

.sample-panel h2,
.sample-panel h3 {
  margin-top: 0;
  color: #ffffff;
}

.sample-panel p {
  color: rgba(255, 255, 255, 0.74);
}

.sample-action-card {
  display: block;
  min-height: 128px;
  padding: 22px;
  border-radius: 18px;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.30);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.sample-action-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.76);
}

.sample-action-card strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.sample-action-card span {
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .rules-modal-panel {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .rules-modal-head {
    align-items: flex-start;
  }

  .sample-page-header {
    flex-direction: column;
  }
}

/* =========================
   Cast proper pages
========================= */
.cast-subpage {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.13), transparent 34%),
    linear-gradient(135deg, #030303, #101010 52%, #000000);
  color: #ffffff;
}

.cast-page-shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0 72px;
}

.cast-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 30px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 28px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 32%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.cast-page-kicker {
  margin: 0 0 10px;
  color: rgba(212, 175, 55, 0.88);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.cast-page-header h1 {
  margin: 0;
  letter-spacing: 0.08em;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.cast-page-header p:not(.cast-page-kicker) {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.cast-back-link {
  flex: 0 0 auto;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 999px;
  padding: 11px 17px;
  background: rgba(255, 255, 255, 0.055);
}

.cast-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.cast-panel,
.cast-action-card {
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.cast-panel {
  padding: clamp(20px, 3vw, 30px);
}

.cast-wide-panel {
  margin-bottom: 22px;
}

.cast-panel h2,
.cast-panel h3 {
  margin-top: 0;
  letter-spacing: 0.08em;
}

.cast-panel p,
.cast-action-card span,
.cast-status-list {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.cast-action-card {
  display: block;
  min-height: 160px;
  padding: 26px;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.cast-action-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.78);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0.035));
}

.cast-action-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.16rem;
  letter-spacing: 0.06em;
}

.cast-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 22px;
}

.cast-form-row {
  display: grid;
  gap: 8px;
}

.cast-form-full {
  grid-column: 1 / -1;
}

.cast-form-row label {
  color: rgba(212, 175, 55, 0.9);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.cast-form-row input,
.cast-form-row select,
.cast-form-row textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.38);
  color: #ffffff;
  padding: 12px 13px;
}

.cast-form-row textarea {
  resize: vertical;
}

.cast-primary-button,
.cast-danger-button {
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.cast-primary-button {
  border: 1px solid rgba(212, 175, 55, 0.58);
  background: rgba(212, 175, 55, 0.16);
}

.cast-danger-button {
  border: 1px solid rgba(255, 115, 115, 0.48);
  background: rgba(255, 80, 80, 0.10);
}

.cast-status-list {
  margin-bottom: 0;
  padding-left: 1.25em;
}

/* Rules modal corrected to true full-screen popup */
.rules-modal {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.rules-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rules-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
}

.rules-modal-panel {
  position: relative;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: 0;
  background:
    radial-gradient(circle at top center, rgba(212, 175, 55, 0.14), transparent 32%),
    linear-gradient(135deg, #030303, #111111 52%, #000000);
  color: #ffffff;
  transform: translateY(14px);
  transition: transform 0.5s ease;
  overflow: hidden;
}

.rules-modal.is-open .rules-modal-panel {
  transform: translateY(0);
}

.rules-modal-body {
  height: calc(100dvh - 96px);
  overflow: auto;
  padding: clamp(20px, 4vw, 46px);
  line-height: 1.9;
}

@media (max-width: 768px) {
  .cast-page-header {
    flex-direction: column;
  }

  .cast-back-link {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .cast-form-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
   Attraction operation popup page
========================= */
.attraction-page-shell {
  max-width: 1280px;
}

.attraction-guide-panel {
  margin-bottom: 22px;
}

.attraction-type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.attraction-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.attraction-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.attraction-card {
  width: 100%;
  min-height: 156px;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.attraction-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.58);
}

.attraction-card strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.attraction-card small {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.attraction-card-type {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.attraction-type-boat { background: linear-gradient(135deg, rgba(54, 144, 220, 0.18), rgba(212, 175, 55, 0.05)); }
.attraction-type-story { background: linear-gradient(135deg, rgba(180, 105, 220, 0.18), rgba(212, 175, 55, 0.05)); }
.attraction-type-spin { background: linear-gradient(135deg, rgba(255, 195, 75, 0.17), rgba(212, 175, 55, 0.05)); }
.attraction-type-adventure { background: linear-gradient(135deg, rgba(67, 190, 132, 0.17), rgba(212, 175, 55, 0.05)); }
.attraction-type-omnimover { background: linear-gradient(135deg, rgba(140, 150, 170, 0.19), rgba(212, 175, 55, 0.05)); }
.attraction-type-dark { background: linear-gradient(135deg, rgba(88, 82, 160, 0.20), rgba(212, 175, 55, 0.05)); }
.attraction-type-theater { background: linear-gradient(135deg, rgba(230, 90, 130, 0.16), rgba(212, 175, 55, 0.05)); }
.attraction-type-coaster { background: linear-gradient(135deg, rgba(230, 90, 55, 0.18), rgba(212, 175, 55, 0.05)); }
.attraction-type-carousel { background: linear-gradient(135deg, rgba(255, 145, 190, 0.18), rgba(212, 175, 55, 0.05)); }

.attraction-operation-modal {
  position: fixed;
  inset: 0;
  z-index: 2700;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.attraction-operation-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.attraction-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.attraction-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(82dvh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(17, 17, 17, 0.98), rgba(3, 3, 3, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  color: #ffffff;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s ease;
}

.attraction-operation-modal.is-open .attraction-modal-panel {
  transform: translateY(0) scale(1);
}

.attraction-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.attraction-modal-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.35;
  letter-spacing: 0.03em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.attraction-modal-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.attraction-modal-close {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.attraction-modal-close:hover {
  border-color: rgba(212, 175, 55, 0.58);
}

.attraction-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 22px 26px 28px;
}

.attraction-modal-lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.attraction-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.attraction-command-form {
  margin: 0;
}

.attraction-command-button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  white-space: nowrap;
}

.attraction-empty-note {
  margin: 0;
}

@media (max-width: 768px) {
  .attraction-card-grid {
    grid-template-columns: 1fr;
  }

  .attraction-operation-modal {
    padding: 12px;
    place-items: end center;
  }

  .attraction-modal-panel {
    width: 100%;
    max-height: 86dvh;
    border-radius: 24px 24px 0 0;
  }

  .attraction-modal-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 20px 18px 14px;
  }

  .attraction-modal-head h2 {
    font-size: 20px;
    line-height: 1.35;
  }

  .attraction-modal-close {
    min-width: 64px;
    max-width: 76px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .attraction-modal-body {
    padding: 18px;
  }

  .attraction-command-grid {
    grid-template-columns: 1fr;
  }
}


/* Attraction type filter */
.attraction-type-chip {
  border: 1px solid rgba(212, 175, 55, 0.26);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
}

.attraction-type-chip:hover,
.attraction-type-chip.is-active {
  border-color: rgba(212, 175, 55, 0.78);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.16), 0 12px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.attraction-type-all {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(212, 175, 55, 0.10));
}

.attraction-card.is-hidden-by-type {
  display: none;
}


/* Teleport page: premium command cards */
.teleport-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(218, 184, 95, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(218, 184, 95, 0.13), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(17, 16, 15, 0.94), rgba(7, 7, 8, 0.92));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.teleport-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(218, 184, 95, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 12px);
  opacity: 0.75;
}

.teleport-panel > * {
  position: relative;
  z-index: 1;
}

.teleport-panel h2 {
  letter-spacing: 0.05em;
}

.teleport-player-select-row,
.teleport-card-select-row {
  gap: 14px;
}

.teleport-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.teleport-player-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid rgba(218, 184, 95, 0.30);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(218, 184, 95, 0.12), rgba(255, 255, 255, 0.045));
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 28px rgba(0,0,0,0.20);
}

.teleport-player-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #72ffac;
  box-shadow: 0 0 0 4px rgba(114, 255, 172, 0.10), 0 0 18px rgba(114, 255, 172, 0.95);
  animation: teleportLivePulse 1.6s ease-in-out infinite;
}

.teleport-choice-grid,
.teleport-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
}

.teleport-choice-grid-attractions,
.teleport-choice-grid-areas {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.teleport-choice-card,
.teleport-player-card,
.teleport-player-empty-card {
  position: relative;
  isolation: isolate;
  min-height: 142px;
  border: 1px solid rgba(218, 184, 95, 0.20);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(218, 184, 95, 0.24), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.10), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.teleport-choice-card::before,
.teleport-player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 234, 171, 0.00), rgba(255, 234, 171, 0.12), rgba(255, 234, 171, 0.00));
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

.teleport-choice-card::after,
.teleport-player-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(218, 184, 95, 0.18);
  background: rgba(0,0,0,0.16);
}

.teleport-choice-card,
.teleport-player-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-top: 0;
  padding: 18px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.teleport-choice-card:hover,
.teleport-choice-card:focus-visible,
.teleport-player-card:hover,
.teleport-player-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 221, 138, 0.78);
  box-shadow: 0 30px 76px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(218, 184, 95, 0.18), inset 0 1px 0 rgba(255,255,255,0.10);
  outline: none;
}

.teleport-choice-card:hover::before,
.teleport-choice-card:focus-visible::before,
.teleport-player-card:hover::before,
.teleport-player-card:focus-visible::before {
  transform: translateX(120%);
}

.teleport-choice-card[aria-pressed="true"],
.teleport-player-card[aria-pressed="true"] {
  border-color: rgba(255, 221, 138, 0.98);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 221, 138, 0.38), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.15), transparent 30%),
    linear-gradient(145deg, rgba(218, 184, 95, 0.24), rgba(255, 255, 255, 0.055));
  box-shadow: 0 34px 82px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 221, 138, 0.24), inset 0 1px 0 rgba(255,255,255,0.12);
}

.teleport-choice-card[aria-pressed="true"]::after,
.teleport-player-card[aria-pressed="true"]::after {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  color: #15100a;
  background: linear-gradient(135deg, #ffe7a0, #d8af37);
  border-color: rgba(255, 231, 160, 0.86);
  font-weight: 900;
  box-shadow: 0 0 24px rgba(218, 184, 95, 0.36);
}

.teleport-choice-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teleport-choice-icon,
.teleport-player-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 236, 170, 0.98), rgba(216, 175, 55, 0.90));
  color: #15100a;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(218, 184, 95, 0.28), inset 0 1px 0 rgba(255,255,255,0.42);
}

.teleport-choice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.20);
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.teleport-player-badge {
  color: rgba(132, 255, 184, 0.88);
  border-color: rgba(132, 255, 184, 0.22);
}

.teleport-player-cast-badge {
  color: rgba(255, 235, 176, 0.98);
  border-color: rgba(218, 184, 95, 0.46);
  background: linear-gradient(135deg, rgba(218, 184, 95, 0.24), rgba(255, 255, 255, 0.06));
}

.teleport-choice-body,
.teleport-player-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  padding-right: 42px;
}

.teleport-choice-name,
.teleport-player-name {
  overflow: hidden;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

.teleport-choice-sub,
.teleport-player-sub {
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.teleport-choice-arrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(218, 184, 95, 0.24);
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  color: rgba(255, 221, 138, 0.78);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.teleport-choice-arrow::after {
  content: "→";
  font-size: 0.9rem;
  line-height: 1;
}

.teleport-player-empty-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
  text-align: center;
}

.teleport-submit-button {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 38px rgba(0,0,0,0.24), 0 0 0 1px rgba(255,255,255,0.04) inset;
}


.teleport-submit-button.is-teleport-moving,
.teleport-submit-button.is-teleport-moving:disabled {
  cursor: wait;
  opacity: 0.86;
  filter: saturate(1.08);
}

.teleport-submit-button.is-teleport-moving::after {
  content: "";
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  vertical-align: -0.08em;
  animation: teleportMovingSpin 0.72s linear infinite;
}

@keyframes teleportMovingSpin {
  to { transform: rotate(360deg); }
}

@keyframes teleportLivePulse {
  0%, 100% { transform: scale(1); opacity: 0.78; }
  50% { transform: scale(1.55); opacity: 1; }
}

@media (max-width: 640px) {
  .teleport-choice-grid,
  .teleport-choice-grid-attractions,
  .teleport-choice-grid-areas,
  .teleport-player-grid {
    grid-template-columns: 1fr;
  }

  .teleport-choice-card,
  .teleport-player-card,
  .teleport-player-empty-card {
    min-height: 128px;
    border-radius: 22px;
  }

  .teleport-choice-name,
  .teleport-player-name {
    font-size: 1rem;
  }
}

/* Teleport page: accordion card selector refinement */
.teleport-accordion-stack {
  display: grid;
  gap: 18px;
  width: 100%;
}

.teleport-accordion-panel {
  padding: 0;
}

.teleport-panel-trigger {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 118px;
  padding: 26px 28px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.teleport-panel-trigger:hover,
.teleport-panel-trigger:focus-visible {
  outline: none;
}

.teleport-trigger-kicker,
.teleport-trigger-title,
.teleport-trigger-text {
  display: block;
}

.teleport-trigger-kicker {
  margin-bottom: 8px;
  color: rgba(218, 184, 95, 0.92);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.20em;
}

.teleport-trigger-title {
  color: #fff;
  font-size: clamp(1.28rem, 2.5vw, 1.9rem);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.teleport-trigger-text {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.65;
}

.teleport-trigger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 92px;
  padding: 11px 18px;
  border: 1px solid rgba(218, 184, 95, 0.36);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 231, 160, 0.92);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.teleport-panel-trigger:hover .teleport-trigger-action,
.teleport-panel-trigger:focus-visible .teleport-trigger-action,
.teleport-accordion-panel.is-open .teleport-trigger-action {
  border-color: rgba(255, 221, 138, 0.82);
  background: rgba(218, 184, 95, 0.16);
  color: #ffe7a0;
}

.teleport-panel-content {
  position: relative;
  z-index: 1;
  padding: 0 28px 28px;
}

.teleport-panel-content[hidden] {
  display: none !important;
}

.teleport-panel-content form {
  display: grid;
  gap: 18px;
  padding-top: 2px;
}

.teleport-choice-grid,
.teleport-player-grid {
  max-height: min(54vh, 540px);
  overflow-y: auto;
  padding: 4px 4px 8px;
  scrollbar-width: thin;
}

.teleport-choice-card,
.teleport-player-card,
.teleport-player-empty-card {
  min-height: 104px;
  border-radius: 22px;
}

.teleport-choice-card,
.teleport-player-card {
  gap: 12px;
  padding: 18px 20px;
}

.teleport-choice-card::after,
.teleport-player-card::after {
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
}

.teleport-choice-topline {
  justify-content: flex-start;
}

.teleport-choice-icon,
.teleport-player-avatar {
  display: none !important;
}

.teleport-choice-badge {
  min-width: 0;
  padding: 5px 10px;
  font-size: 0.58rem;
}

.teleport-choice-body,
.teleport-player-body {
  padding-right: 36px;
}

.teleport-choice-name,
.teleport-player-name {
  font-size: 1rem;
}

.teleport-choice-arrow {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 221, 138, 0.70);
}

.teleport-submit-button {
  margin-top: 2px;
}

@media (max-width: 640px) {
  .teleport-panel-trigger {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 22px;
  }

  .teleport-trigger-title {
    white-space: normal;
  }

  .teleport-panel-content {
    padding: 0 18px 22px;
  }

  .teleport-trigger-action {
    width: 100%;
  }
}

/* Teleport page: modal selector layout */
.teleport-modal-launch-stack {
  display: grid;
  gap: 18px;
  width: 100%;
}

.teleport-launch-panel {
  padding: 0;
}

.teleport-launch-panel .teleport-panel-trigger {
  min-height: 112px;
}

html.teleport-modal-opened,
body.teleport-modal-opened {
  overflow: hidden;
  overscroll-behavior: none;
}

body.teleport-modal-opened .teleport-modal {
  touch-action: none;
}

body.teleport-modal-opened .teleport-modal-choice-grid {
  touch-action: pan-y;
}

.teleport-modal[hidden] {
  display: none !important;
}

.teleport-modal {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.teleport-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(218, 184, 95, 0.16), transparent 32%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  animation: teleportModalFadeIn 160ms ease both;
}

.teleport-modal-box {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(218, 184, 95, 0.30);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0% 0%, rgba(218, 184, 95, 0.18), transparent 34%),
    radial-gradient(circle at 100% 8%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(16, 15, 15, 0.98), rgba(6, 6, 7, 0.98));
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: teleportModalPopIn 190ms ease both;
}

.teleport-modal-box:focus {
  outline: none;
}

.teleport-modal-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(218, 184, 95, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 12px);
}

.teleport-modal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 20px;
  border-bottom: 1px solid rgba(218, 184, 95, 0.16);
}

.teleport-modal-kicker {
  margin: 0 0 8px;
  color: rgba(218, 184, 95, 0.92);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.20em;
}

.teleport-modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.36rem, 2.5vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.teleport-modal-header p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.7;
}

.teleport-modal-close {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 10px 16px;
  border: 1px solid rgba(218, 184, 95, 0.34);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 231, 160, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.teleport-modal-close:hover,
.teleport-modal-close:focus-visible {
  border-color: rgba(255, 221, 138, 0.86);
  background: rgba(218, 184, 95, 0.16);
  color: #ffe7a0;
  outline: none;
}

.teleport-modal-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 22px 30px 30px;
  min-height: 0;
}

.teleport-modal-choice-grid {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 4px 8px;
  scrollbar-width: thin;
}

.teleport-modal .teleport-submit-button {
  position: sticky;
  bottom: 0;
  margin-top: 0;
}

.teleport-modal .teleport-player-toolbar {
  margin-bottom: -2px;
}

.teleport-modal .teleport-choice-card,
.teleport-modal .teleport-player-card,
.teleport-modal .teleport-player-empty-card {
  min-height: 104px;
}

@keyframes teleportModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes teleportModalPopIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .teleport-modal {
    align-items: flex-end;
    padding: 14px;
  }

  .teleport-modal-box {
    max-height: 88vh;
    border-radius: 24px;
  }

  .teleport-modal-header {
    flex-direction: column;
    padding: 22px 20px 16px;
  }

  .teleport-modal-header h2 {
    white-space: normal;
  }

  .teleport-modal-close {
    width: 100%;
  }

  .teleport-modal-form {
    padding: 18px 18px 22px;
  }

  .teleport-modal-choice-grid {
    max-height: 48vh;
  }
}


/* Teleport page: unavailable state overlay */
.teleport-launch-panel.is-server-locked .teleport-panel-trigger {
  cursor: not-allowed;
  opacity: 1;
  filter: none;
  transform: none !important;
}

.teleport-launch-panel.is-server-locked .teleport-panel-trigger > span {
  opacity: 0.24;
  filter: grayscale(0.75);
}

.teleport-launch-panel.is-server-locked .teleport-panel-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.teleport-launch-panel.is-server-locked .teleport-panel-trigger::after {
  content: "サーバーに参加後にご利用いただけます";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(86%, 420px);
  transform: translate(-50%, -50%);
  padding: 13px 18px;
  border: 1px solid rgba(218, 184, 95, 0.46);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.86);
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92), 0 0 18px rgba(255, 255, 255, 0.18);
  text-align: center;
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.teleport-launch-panel.is-server-locked {
  border-color: rgba(218, 184, 95, 0.11);
}

.teleport-launch-panel.is-server-locked::before {
  opacity: 0.28;
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger::after {
  content: "テレポートできるプレイヤーが居ません。";
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 3;
  max-width: min(78%, 360px);
  padding: 10px 14px;
  border: 1px solid rgba(218, 184, 95, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.92), rgba(44, 36, 18, 0.88));
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.teleport-player-empty-card-premium {
  min-height: 178px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px;
  border-color: rgba(218, 184, 95, 0.28);
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 184, 95, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  color: #ffffff;
}

.teleport-player-empty-card-premium .teleport-empty-kicker {
  display: inline-flex;
  padding: 6px 11px;
  border: 1px solid rgba(218, 184, 95, 0.30);
  border-radius: 999px;
  color: rgba(255, 231, 160, 0.86);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.teleport-player-empty-card-premium strong {
  color: #ffffff;
  font-size: clamp(1.06rem, 3.5vw, 1.36rem);
  letter-spacing: 0.04em;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
}

.teleport-player-empty-card-premium span:last-child {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.7;
}

/* Teleport player card: keep empty-target message away from the select button */
.teleport-launch-panel.is-player-empty .teleport-panel-trigger {
  cursor: not-allowed;
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger > span:first-child {
  opacity: 0.26;
  filter: grayscale(0.65);
}

.teleport-launch-panel.is-player-empty .teleport-trigger-action {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(2px);
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger::after {
  content: "テレポートできるプレイヤーが居ません。";
  position: absolute;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  z-index: 5;
  width: min(86%, 460px);
  max-width: none;
  transform: translate(-50%, -50%);
  padding: 13px 18px;
  border: 1px solid rgba(218, 184, 95, 0.48);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 8, 8, 0.94), rgba(48, 39, 18, 0.92));
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 255, 255, 0.18);
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  font-weight: 950;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}


/* Teleport player empty state: no overlap with action button */
.teleport-launch-panel.is-player-empty .teleport-panel-trigger {
  align-items: flex-start !important;
  flex-direction: column !important;
  gap: 18px !important;
  cursor: default !important;
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger::before,
.teleport-launch-panel.is-player-empty .teleport-panel-trigger::after {
  content: none !important;
  display: none !important;
}

.teleport-launch-panel.is-player-empty .teleport-panel-trigger > span:first-child {
  opacity: 0.42 !important;
  filter: grayscale(0.7) !important;
}

.teleport-launch-panel.is-player-empty .teleport-trigger-action {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
  align-self: stretch !important;
  padding: 14px 18px !important;
  border-color: rgba(218, 184, 95, 0.54) !important;
  background: linear-gradient(135deg, rgba(8, 8, 8, 0.94), rgba(48, 39, 18, 0.92)) !important;
  color: #ffffff !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.45 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.teleport-launch-panel.is-player-empty .teleport-trigger-action::before {
  content: "テレポートできるプレイヤーが居ません。";
}

.teleport-launch-panel.is-player-empty .teleport-trigger-action {
  font-size: 0 !important;
}

.teleport-launch-panel.is-player-empty .teleport-trigger-action::before {
  font-size: clamp(0.9rem, 2.8vw, 1.05rem) !important;
  font-weight: 950 !important;
  letter-spacing: 0.06em !important;
}


/* Dashboard profile: rank-focused compact card */
.dashboard-rank-profile-card {
  position: relative;
  display: grid;
  gap: 16px;
  max-width: 680px;
  width: min(100%, 680px);
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
  border-color: rgba(218, 184, 95, 0.34);
  background:
    radial-gradient(circle at 12% 0%, rgba(218, 184, 95, 0.22), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(18, 17, 15, 0.92), rgba(4, 4, 5, 0.96));
}

.dashboard-rank-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(218, 184, 95, 0.08), transparent);
}

.dashboard-rank-profile-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-rank-main {
  display: grid;
  gap: 6px;
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(218, 184, 95, 0.20);
}

.dashboard-rank-main span {
  color: rgba(218, 184, 95, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.dashboard-rank-main strong {
  color: #ffffff;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-shadow: 0 0 26px rgba(218, 184, 95, 0.20), 0 16px 34px rgba(0,0,0,0.45);
}

.dashboard-profile-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-profile-mini-grid .dashboard-user-line {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.dashboard-profile-mini-grid .dashboard-user-line span {
  font-size: 0.68rem;
  color: rgba(218, 184, 95, 0.76);
}

.dashboard-profile-mini-grid .dashboard-user-line strong {
  text-align: left;
  color: #ffffff;
  font-size: 0.98rem;
}

.dashboard-profile-mini-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid rgba(218, 184, 95, 0.40);
  border-radius: 999px;
  background: rgba(218, 184, 95, 0.10);
  color: rgba(255, 231, 160, 0.95);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.dashboard-profile-mini-button:hover {
  border-color: rgba(255, 221, 138, 0.82);
  background: rgba(218, 184, 95, 0.18);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .dashboard-profile-mini-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-mini-button {
    width: 100%;
  }
}

/* Dashboard profile: rebuilt as a single refined card */
.dashboard-profile-single-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(218, 184, 95, 0.26);
  background:
    radial-gradient(circle at 8% 0%, rgba(218, 184, 95, 0.15), transparent 30%),
    radial-gradient(circle at 100% 8%, rgba(255, 255, 255, 0.055), transparent 30%),
    linear-gradient(145deg, rgba(18, 17, 15, 0.92), rgba(5, 5, 6, 0.92));
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.dashboard-profile-single-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(218, 184, 95, 0.07), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 12px);
  opacity: 0.72;
}

.dashboard-profile-single-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-profile-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(22px, 4vw, 34px);
}

.dashboard-profile-kicker {
  margin: 0 0 8px;
  color: rgba(218, 184, 95, 0.92);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.22em;
}

.dashboard-profile-topline h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: 0.09em;
}

.dashboard-profile-single-card .dashboard-profile-mini-button {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 12px 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 221, 138, 0.66);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(218, 184, 95, 0.22), rgba(255, 255, 255, 0.06));
  color: #ffe7a0;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-profile-single-card .dashboard-profile-mini-button:hover {
  border-color: rgba(255, 221, 138, 0.86);
  background: rgba(218, 184, 95, 0.16);
  transform: translateY(-1px);
}

.dashboard-profile-single-card .dashboard-rank-main {
  display: grid;
  gap: 8px;
  padding: 0 0 clamp(20px, 4vw, 30px);
  border-bottom: 1px solid rgba(218, 184, 95, 0.22);
}

.dashboard-profile-single-card .dashboard-rank-main span {
  color: rgba(218, 184, 95, 0.90);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.26em;
}

.dashboard-profile-single-card .dashboard-rank-main strong {
  color: #ffffff;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-shadow: 0 0 32px rgba(218, 184, 95, 0.20), 0 18px 42px rgba(0, 0, 0, 0.55);
}

.dashboard-profile-info-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
}

.dashboard-profile-info-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px 18px 0 0;
}

.dashboard-profile-info-item + .dashboard-profile-info-item {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-profile-info-item span {
  color: rgba(218, 184, 95, 0.75);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.dashboard-profile-info-item strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 850;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dashboard-profile-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-profile-single-card .dashboard-profile-mini-button {
    align-self: flex-start;
  }

  .dashboard-profile-info-row {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-info-item {
    padding: 16px 0 0;
  }

  .dashboard-profile-info-item + .dashboard-profile-info-item {
    padding-left: 0;
    border-left: 0;
  }
}


/* =========================================================
   20260521 UI fix: dashboard rules modal / attraction rank modal / profile page
   ========================================================= */

/* Dashboard rules modal: prevent global button styles from breaking the close button */
.rules-modal {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.rules-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rules-modal-panel {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  height: min(82dvh, 760px);
  margin: clamp(16px, 5dvh, 48px) auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(218, 184, 95, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(218, 184, 95, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(16, 15, 15, 0.98), rgba(4, 4, 5, 0.98));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rules-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(218, 184, 95, 0.16);
}

.rules-modal-head > div {
  min-width: 0;
}

.rules-modal-close,
.rules-modal-close:hover {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 84px;
  max-width: none;
  height: auto;
  margin: 0 !important;
  padding: 10px 16px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.2;
  transform: none;
}

.rules-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 32px;
}

/* Attraction rank list modal: center it again and keep mobile controlled */
.attraction-rank-list-button {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 38px;
  margin: 0 !important;
  padding: 9px 14px !important;
  border-radius: 999px;
  border: 1px solid rgba(218, 184, 95, 0.42);
  background: rgba(218, 184, 95, 0.10);
  color: rgba(255, 240, 200, 0.96);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.attraction-rank-list-modal {
  position: fixed;
  inset: 0;
  z-index: 2720;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.attraction-rank-list-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.attraction-rank-list-modal[hidden] {
  display: none !important;
}

.attraction-rank-list-modal .attraction-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.attraction-rank-list-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: min(82dvh, 760px);
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
}

.attraction-rank-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.attraction-rank-list-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(218, 184, 95, 0.22);
  background: rgba(255, 255, 255, 0.045);
}

.attraction-rank-list-card strong {
  display: block;
  color: rgba(255, 231, 170, 0.98);
  font-size: 15px;
  margin-bottom: 10px;
}

.attraction-rank-list-card ul {
  margin: 0;
  padding-left: 1.1em;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
  font-size: 13px;
}

/* Profile page: restore/refine layout that was broken by missing styles */
.profile-shell {
  max-width: 1180px;
}

.profile-hero {
  align-items: stretch;
}

.profile-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.profile-rank-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.65fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.profile-rank-main {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 220px;
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 226, 150, 0.22), transparent 38%),
    linear-gradient(145deg, rgba(218, 184, 95, 0.22), rgba(0, 0, 0, 0.18));
  border: 1px solid rgba(218, 184, 95, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-rank-label,
.profile-stat-kicker {
  color: rgba(255, 225, 157, 0.90);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.profile-rank-main strong {
  color: #ffffff;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow: 0 0 28px rgba(218, 184, 95, 0.20), 0 18px 42px rgba(0, 0, 0, 0.52);
}

.profile-rank-main small {
  color: rgba(255, 255, 255, 0.70);
  font-weight: 800;
}

.profile-user-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-user-facts div,
.profile-stat-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-user-facts div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 100px;
  padding: 20px;
}

.profile-user-facts span,
.profile-mini-list li {
  color: rgba(255, 255, 255, 0.68);
}

.profile-user-facts strong {
  min-width: 0;
  color: #ffffff;
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.profile-user-facts [data-profile-cast-id],
.profile-user-facts [data-profile-nickname] {
  font-size: 0.98rem;
  line-height: 1.25;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.profile-stat-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.profile-stat-card h2,
.profile-wide-panel h2 {
  margin: 0;
}

.profile-big-number {
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.profile-progress-track {
  --week-progress: 0%;
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.10);
}

.profile-progress-track span {
  position: relative;
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #4fa2ad, #dab85f);
}

.profile-progress-head-icon {
  position: absolute;
  left: var(--week-progress);
  top: 50%;
  width: 68px;
  height: 68px;
  object-fit: contain;
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.72)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

@media (max-width: 560px) {
  .profile-progress-head-icon {
    width: 56px;
    height: 56px;
  }
}

.profile-mini-list,
.profile-attraction-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.15em;
}

.profile-missing-list li {
  color: rgba(255, 236, 185, 0.88);
}

.profile-wide-panel {
  margin-bottom: 22px;
}

.profile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-small-button {
  width: auto !important;
  min-width: 190px;
  margin: 0 !important;
  text-align: center;
}

.profile-attraction-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-left: 0;
  list-style: none;
}

.profile-attraction-list li {
  padding: 14px 16px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-weight: 850;
}

.profile-rank-table-wrap {
  overflow-x: auto;
}

.profile-rank-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
}

.profile-rank-table th,
.profile-rank-table td {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: middle;
}

.profile-rank-table th {
  color: rgba(255, 231, 170, 0.95);
  background: rgba(218, 184, 95, 0.14);
}

.profile-rank-table td {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.035);
}

.profile-live-status {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.68);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .profile-rank-hero,
  .profile-card-grid {
    grid-template-columns: 1fr;
  }

  .profile-attraction-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rules-modal-panel {
    width: calc(100vw - 24px);
    height: min(86dvh, 760px);
    margin: 12px auto;
    border-radius: 24px;
  }

  .rules-modal-head {
    padding: 20px 18px 14px;
  }

  .rules-modal-close {
    min-width: 72px;
    padding: 8px 12px !important;
    font-size: 12px;
  }

  .rules-modal-body {
    padding: 18px;
  }

  .attraction-rank-list-modal {
    place-items: center;
    padding: 14px;
  }

  .attraction-rank-list-panel {
    width: 100%;
    max-height: 84dvh;
    border-radius: 24px;
  }

  .profile-header-actions,
  .profile-section-title {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-user-facts,
  .profile-attraction-list {
    grid-template-columns: 1fr;
  }

  .profile-rank-main {
    min-height: 180px;
    padding: 22px;
  }
}


/* Profile fact cards: compact CAST ID / nickname cards */
.profile-user-facts .profile-fact-card-compact {
  min-height: 62px;
  padding: 12px 14px;
  gap: 4px;
  border-radius: 16px;
}

.profile-user-facts .profile-fact-card-compact span {
  font-size: 0.64rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.profile-user-facts .profile-fact-card-compact strong,
.profile-user-facts .profile-fact-card-compact [data-profile-cast-id],
.profile-user-facts .profile-fact-card-compact [data-profile-nickname] {
  font-size: 0.82rem;
  line-height: 1.18;
  font-weight: 850;
}

@media (max-width: 640px) {
  .profile-user-facts .profile-fact-card-compact {
    min-height: 54px;
    padding: 10px 12px;
  }
}

/* =========================
   Attraction availability / rank lock overlay fixes
========================= */
.attraction-card {
  position: relative;
  overflow: hidden;
}

.attraction-empty-card-overlay,
.attraction-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: inherit;
  text-align: center;
  color: #ffffff;
  font-weight: 950;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95);
  background:
    radial-gradient(circle at 50% 30%, rgba(218, 184, 95, 0.18), transparent 38%),
    rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(218, 184, 95, 0.28);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.attraction-card.is-attraction-empty .attraction-empty-card-overlay {
  display: flex;
}

.attraction-card:not(.is-attraction-empty) .attraction-empty-card-overlay {
  display: none !important;
}

.attraction-card-locked {
  cursor: not-allowed !important;
  transform: none !important;
  filter: grayscale(0.45) brightness(0.58);
  border-color: rgba(255, 255, 255, 0.11) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34) !important;
}

.attraction-card-locked:hover {
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.attraction-card-locked .attraction-lock-overlay {
  display: flex;
  background:
    radial-gradient(circle at 50% 30%, rgba(218, 184, 95, 0.16), transparent 40%),
    rgba(0, 0, 0, 0.64);
}

.attraction-card-locked.is-attraction-empty .attraction-lock-overlay {
  display: none;
}

.attraction-operation-modal.is-attraction-empty .attraction-command-form,
.attraction-operation-modal.is-attraction-empty .attraction-command-disabled {
  opacity: 0.32;
  pointer-events: none;
  filter: grayscale(0.55);
}

.attraction-operation-modal.is-attraction-empty .attraction-modal-body::before {
  content: "サーバーにプレイヤーがいない為、利用できません。";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(218, 184, 95, 0.36);
  background: rgba(0, 0, 0, 0.38);
  color: #ffffff;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95);
}

@media (max-width: 640px) {
  .attraction-empty-card-overlay,
  .attraction-lock-overlay {
    padding: 16px;
    font-size: 0.95rem;
  }
}


/* =========================
   BlueMap embed page
========================= */
.map-page-shell {
  width: min(1380px, calc(100vw - 36px));
}

.map-page-header {
  margin-bottom: 22px;
}

.map-panel {
  padding: clamp(16px, 2.5vw, 26px);
}

.map-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.map-panel-head h2 {
  margin: 0;
  letter-spacing: 0.1em;
}

.map-panel-head p:not(.cast-page-kicker) {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.bluemap-frame-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.bluemap-frame {
  display: block;
  width: 100%;
  height: min(78dvh, 820px);
  min-height: 560px;
  border: 0;
  background: #050505;
}

@media (max-width: 760px) {
  .map-panel-head {
    display: block;
  }

  .bluemap-frame {
    height: 72dvh;
    min-height: 460px;
  }
}

/* =========================
   Land map player list
   2026-05-30: cache-backed, read-only player list
========================= */
.map-player-panel {
  margin-top: 22px;
  padding: clamp(16px, 2.5vw, 26px);
}

.map-player-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.map-player-head h2 {
  margin: 0;
  letter-spacing: 0.08em;
}

.map-player-head p:not(.cast-page-kicker) {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.map-player-teleport-link {
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
}

.map-player-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.map-player-summary span:first-child {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.map-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.map-player-card,
.map-player-empty-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(22, 20, 16, 0.96), rgba(10, 10, 12, 0.92));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.map-player-card::before,
.map-player-empty-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 35%, rgba(212, 175, 55, 0.08));
  opacity: 0.62;
}

.map-player-card > *,
.map-player-empty-card > * {
  position: relative;
  z-index: 1;
}

.map-player-card.is-land-player {
  border-color: rgba(212, 175, 55, 0.36);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), 0 0 22px rgba(212, 175, 55, 0.12);
}

.map-player-card.is-other-server-player {
  opacity: 0.78;
  border-color: rgba(255, 255, 255, 0.13);
}

.map-player-card-topline {
  margin-bottom: 12px;
}

.map-player-empty-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.74);
}

.map-player-empty-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: rgba(212, 175, 55, 0.1);
  color: rgba(255, 232, 170, 0.95);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.map-player-empty-card strong {
  color: #fff;
  font-size: 1rem;
}

@media (max-width: 760px) {
  .map-player-head {
    display: block;
  }

  .map-player-teleport-link {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 14px;
  }

  .map-player-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
   Dashboard app-icon cards
   2026-05-21: applied real dashboard icons
========================= */
.dashboard-card {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  padding: 24px 118px 24px 24px;
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 231, 161, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.070), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(226, 185, 86, 0.34);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 231, 161, 0.10), transparent 42%, rgba(255, 255, 255, 0.035));
  pointer-events: none;
}

.dashboard-card:hover {
  transform: translateY(-5px) scale(1.012);
  border-color: rgba(255, 231, 161, 0.82);
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 231, 161, 0.20), transparent 31%),
    linear-gradient(135deg, rgba(226, 185, 86, 0.16), rgba(255, 255, 255, 0.035));
  box-shadow:
    0 22px 62px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(226, 185, 86, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-card-title,
.dashboard-card-sub {
  position: relative;
  z-index: 2;
}

.dashboard-card-title {
  max-width: 11em;
  line-height: 1.45;
}

.dashboard-card-sub {
  max-width: 19em;
}

.dashboard-card-icon {
  position: absolute;
  z-index: 1;
  right: 18px;
  top: 50%;
  width: 92px;
  height: 92px;
  object-fit: contain;
  transform: translateY(-50%);
  opacity: 0.98;
  filter:
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32))
    drop-shadow(0 0 12px rgba(226, 185, 86, 0.18));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}

.dashboard-card:hover .dashboard-card-icon {
  transform: translateY(-54%) scale(1.08);
  opacity: 1;
  filter:
    drop-shadow(0 16px 24px rgba(0, 0, 0, 0.40))
    drop-shadow(0 0 20px rgba(255, 231, 161, 0.30));
}

.dashboard-card-button.dashboard-card-with-icon {
  padding-right: 118px;
}

@media (max-width: 520px) {
  .dashboard-card,
  .dashboard-card-button.dashboard-card-with-icon {
    min-height: 142px;
    padding: 22px 98px 22px 20px;
  }

  .dashboard-card-icon {
    right: 12px;
    width: 80px;
    height: 80px;
  }

  .dashboard-card-title {
    font-size: 18px;
  }

  .dashboard-card-sub {
    font-size: 13px;
  }
}


/* Page header logo icons - dashboard icon system applied to sub pages */
.cast-page-header {
  position: relative;
  overflow: hidden;
  align-items: center;
}

.cast-page-header > div {
  position: relative;
  z-index: 2;
  padding-right: clamp(86px, 12vw, 150px);
}

.cast-page-title-icon {
  position: absolute;
  right: clamp(24px, 4vw, 42px);
  top: 50%;
  width: clamp(86px, 13vw, 132px);
  height: clamp(86px, 13vw, 132px);
  transform: translateY(-50%);
  object-fit: contain;
  opacity: 0.96;
  pointer-events: none;
  z-index: 1;
  filter:
    drop-shadow(0 18px 24px rgba(0,0,0,0.42))
    drop-shadow(0 0 20px rgba(246,214,122,0.16));
}

.cast-page-header::after {
  content: "";
  position: absolute;
  right: -70px;
  top: 50%;
  width: 250px;
  height: 250px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(246,214,122,0.13), transparent 64%);
  pointer-events: none;
}

.cast-page-header .cast-back-link,
.cast-page-header .profile-header-actions {
  position: relative;
  z-index: 3;
}

.app-page-title-icon {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  margin: 10px auto 14px;
  filter:
    drop-shadow(0 14px 18px rgba(0,0,0,0.35))
    drop-shadow(0 0 18px rgba(246,214,122,0.18));
}

@media (max-width: 720px) {
  .cast-page-header > div {
    padding-right: 82px;
  }
  .cast-page-title-icon {
    right: 18px;
    width: 76px;
    height: 76px;
    opacity: 0.9;
  }
  .cast-page-header::after {
    right: -95px;
    width: 210px;
    height: 210px;
  }
  .app-page-title-icon {
    width: 88px;
    height: 88px;
  }
}

/* =========================
   Profile page action buttons
   Keep edit/back buttons side-by-side
========================= */
.profile-header-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-header-actions .cast-back-link {
  width: auto !important;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .profile-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .profile-header-actions .cast-back-link {
    flex: 1 1 0;
    padding: 10px 8px;
    font-size: clamp(12px, 3.1vw, 14px);
  }
}


/* Dashboard notice bell */
.dashboard-hero {
  position: relative;
}

.dashboard-notice-bell {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 20;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(219, 183, 90, 0.42);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(14, 12, 8, 0.86), rgba(58, 39, 13, 0.72));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 236, 174, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.dashboard-notice-bell:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(255, 222, 139, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44), 0 0 24px rgba(219, 183, 90, 0.18), inset 0 1px 0 rgba(255, 236, 174, 0.3);
}

.dashboard-notice-bell-icon svg {
  width: 27px;
  height: 27px;
  fill: #fff7dc;
  filter: drop-shadow(0 0 9px rgba(234, 194, 98, 0.32));
}

.dashboard-notice-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f4c75f;
  box-shadow: 0 0 0 3px rgba(244, 199, 95, 0.18), 0 0 14px rgba(244, 199, 95, 0.85);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dashboard-notice-badge.is-visible {
  opacity: 1;
  transform: scale(1);
}

.dashboard-notice-bell.has-unread {
  animation: noticeBellPulse 1.8s ease-in-out infinite;
}

@keyframes noticeBellPulse {
  0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), 0 0 0 rgba(244, 199, 95, 0); }
  50% { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42), 0 0 30px rgba(244, 199, 95, 0.26); }
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.notice-modal.is-open {
  display: flex;
}

.notice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 8, 0.72);
  backdrop-filter: blur(10px);
}

.notice-modal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(74vh, 720px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(219, 183, 90, 0.34);
  background: radial-gradient(circle at 18% 0%, rgba(244, 199, 95, 0.15), transparent 34%), linear-gradient(145deg, rgba(8, 9, 16, 0.96), rgba(31, 23, 10, 0.94));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 244, 198, 0.14);
  color: #fff8e2;
}

.notice-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(219, 183, 90, 0.16);
}

.notice-modal-head p {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(244, 199, 95, 0.86);
}

.notice-modal-head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
}

.notice-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  border: 1px solid rgba(219, 183, 90, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff8e2;
  padding: 7px 12px;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.notice-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 22px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  max-height: calc(min(82dvh, 720px) - 76px);
  line-height: 1.9;
}

.notice-modal-body h2,
.notice-modal-body h3 {
  color: #f4c75f;
  margin-top: 0;
}

.notice-modal-body p {
  color: rgba(255, 248, 226, 0.88);
}

@media (max-width: 640px) {
  .dashboard-notice-bell {
    top: 14px;
    left: 14px;
    width: 48px;
    height: 48px;
  }

  .notice-modal-panel {
    border-radius: 22px;
  }

  .notice-modal-head {
    padding: 20px 20px 14px;
  }

  .notice-modal-body {
    padding: 20px;
  }
}

/* Dashboard hamburger guide menu */
.dashboard-guide-menu {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 35;
}

.dashboard-hamburger {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  border: 1px solid rgba(218, 181, 86, 0.48);
  background: linear-gradient(145deg, rgba(14, 12, 8, 0.92), rgba(47, 35, 13, 0.72));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 244, 198, 0.16);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-hamburger span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff5cf, #d6aa45);
  box-shadow: 0 0 12px rgba(230, 187, 85, 0.28);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.dashboard-hamburger:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 224, 145, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5), 0 0 24px rgba(214, 170, 69, 0.18), inset 0 1px 0 rgba(255, 244, 198, 0.22);
}

.dashboard-guide-menu.is-open .dashboard-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.dashboard-guide-menu.is-open .dashboard-hamburger span:nth-child(2) {
  opacity: 0;
}

.dashboard-guide-menu.is-open .dashboard-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.dashboard-guide-dropdown {
  position: absolute;
  top: 62px;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(218, 181, 86, 0.34);
  background: linear-gradient(145deg, rgba(5, 7, 15, 0.96), rgba(27, 22, 12, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 244, 198, 0.08);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dashboard-guide-menu.is-open .dashboard-guide-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dashboard-guide-dropdown a {
  display: block;
  padding: 14px 15px;
  border-radius: 16px;
  color: rgba(255, 248, 222, 0.94);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-guide-dropdown a:hover {
  transform: translateX(-3px);
  border-color: rgba(218, 181, 86, 0.28);
  background: rgba(218, 181, 86, 0.1);
}

.guide-page-shell {
  max-width: 1080px;
}

.guide-page-header {
  align-items: center;
}

.guide-title-mark {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(218, 181, 86, 0.42);
  background: radial-gradient(circle at 30% 22%, rgba(255, 236, 170, 0.32), transparent 34%), linear-gradient(145deg, rgba(20, 16, 8, 0.96), rgba(73, 52, 16, 0.72));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4), 0 0 22px rgba(218, 181, 86, 0.14), inset 0 1px 0 rgba(255, 244, 198, 0.16);
  display: grid;
  place-items: center;
  color: #ffe7a0;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.guide-panel {
  display: grid;
  gap: 18px;
}

.guide-block {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(218, 181, 86, 0.18);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.guide-block h2 {
  margin: 0 0 12px;
  color: #ffe7a0;
  letter-spacing: 0.05em;
}

.guide-block p {
  margin: 0;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.84);
}

.guide-block ul {
  margin: 0;
  padding-left: 1.2em;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.95;
}

.guide-alert {
  border-color: rgba(255, 210, 116, 0.38);
  background: linear-gradient(145deg, rgba(218, 181, 86, 0.12), rgba(255, 255, 255, 0.035));
}

@media (max-width: 720px) {
  .dashboard-guide-menu {
    top: 18px;
    right: 18px;
  }

  .dashboard-hamburger {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .dashboard-guide-dropdown {
    top: 56px;
  }

  .guide-page-header {
    align-items: flex-start;
  }

  .guide-title-mark {
    width: 56px;
    height: 56px;
    border-radius: 20px;
  }
}

/* =========================
   Guide pages rebuild fix
   - keep left mark aligned on all four guide pages
   - add WE/Thanks Day readable blocks
========================= */
.guide-page-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
}

.guide-title-mark {
  margin: 0;
  align-self: start;
  justify-self: start;
  line-height: 1;
  transform: none;
}

.guide-page-header > div:nth-child(2) {
  min-width: 0;
}

.guide-page-header .cast-back-link {
  align-self: start;
  white-space: nowrap;
}

.guide-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 48px);
}

.guide-two-columns ul {
  margin: 0;
}

.guide-rank-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.guide-rank-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  border-radius: 16px;
}

.guide-rank-table th,
.guide-rank-table td {
  border: 1px solid rgba(218, 181, 86, 0.34);
  padding: 16px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
}

.guide-rank-table th {
  color: #ffe7a0;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.guide-copy-block {
  border-color: rgba(255, 231, 160, 0.34);
  background: linear-gradient(145deg, rgba(255, 231, 160, 0.09), rgba(255, 255, 255, 0.035));
}

.guide-copy-block p + p,
.guide-block p + p {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .guide-page-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
  }

  .guide-page-header .cast-back-link {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .guide-two-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* =========================
   Guide visual polish v1
   - premium guide mark
   - Thanks Day page rebuild
========================= */
.guide-page-shell {
  max-width: 1120px;
}

.guide-page-header {
  position: relative;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(218, 181, 86, 0.20);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 231, 160, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 244, 198, 0.08);
}

.guide-title-mark {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  color: #fff8df;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 226, 150, 0.52);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 245, 198, 0.38), transparent 27%),
    radial-gradient(circle at 50% 100%, rgba(218, 181, 86, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(12, 9, 4, 0.96), rgba(65, 46, 14, 0.88));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(218, 181, 86, 0.22),
    inset 0 1px 0 rgba(255, 247, 212, 0.22),
    inset 0 -18px 30px rgba(0, 0, 0, 0.25);
}

.guide-title-mark::before,
.guide-title-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.guide-title-mark::before {
  inset: 13px;
  border-radius: 19px;
  border: 1px solid rgba(255, 235, 170, 0.22);
  background: rgba(255, 255, 255, 0.025);
}

.guide-title-mark::after {
  right: 13px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff1b2;
  box-shadow:
    -38px 36px 0 -2px rgba(255, 241, 178, 0.9),
    -10px 45px 0 -3px rgba(255, 241, 178, 0.75),
    0 0 14px rgba(255, 223, 124, 0.8);
}

.guide-title-mark span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0;
}

.guide-title-mark[data-guide="we"] span::before {
  content: "WE";
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  color: #fff8df;
  text-shadow: 0 0 18px rgba(255, 226, 150, 0.36);
}

.guide-title-mark[data-guide="thanks"] span::before {
  content: "";
  width: 38px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff8df, #f1c96c);
  clip-path: polygon(0 16%, 82% 16%, 100% 38%, 82% 60%, 82% 84%, 0 84%);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28), 0 0 20px rgba(255, 223, 124, 0.28);
}

.guide-title-mark[data-guide="thanks"] span::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #0d0a04;
  box-shadow: 18px 0 0 #0d0a04, 9px 9px 0 -2px #0d0a04;
  transform: translate(1px, 0);
}

.guide-title-mark[data-guide="listener"] span::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff8df;
  box-shadow: -17px 7px 0 -3px #f1c96c, 17px 7px 0 -3px #f1c96c;
  transform: translateY(-8px);
}

.guide-title-mark[data-guide="listener"] span::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 26px;
  border-radius: 22px 22px 12px 12px;
  background: linear-gradient(145deg, #fff8df, #f1c96c);
  transform: translateY(15px);
  clip-path: polygon(12% 100%, 18% 36%, 34% 10%, 50% 4%, 66% 10%, 82% 36%, 88% 100%);
}

.guide-title-mark[data-guide="contact"] span::before {
  content: "";
  width: 44px;
  height: 31px;
  border-radius: 9px;
  background: linear-gradient(145deg, #fff8df, #f1c96c);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.guide-title-mark[data-guide="contact"] span::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-right: 4px solid #0d0a04;
  border-bottom: 4px solid #0d0a04;
  transform: translateY(-8px) rotate(45deg);
  border-radius: 4px;
}

.guide-panel {
  gap: 22px;
}

.thanks-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
  padding: clamp(28px, 5vw, 46px);
  border-radius: 34px;
  border: 1px solid rgba(255, 226, 150, 0.30);
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 226, 150, 0.24), transparent 25%),
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.075), transparent 34%),
    linear-gradient(145deg, rgba(13, 11, 7, 0.92), rgba(55, 39, 12, 0.62));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 244, 198, 0.13);
  overflow: hidden;
}

.thanks-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -38% 38%;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 219, 117, 0.18), transparent 68%);
  pointer-events: none;
}

.guide-eyebrow {
  margin: 0 0 10px !important;
  color: #f2c96e !important;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.thanks-hero-copy h2 {
  margin: 0 0 14px;
  color: #fff7dc;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.thanks-hero-copy p:not(.guide-eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 2;
}

.thanks-hero-badge {
  position: relative;
  width: 136px;
  height: 136px;
  justify-self: center;
  border-radius: 42px;
  border: 1px solid rgba(255, 235, 170, 0.45);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(145deg, #fff8df, #d3a73d 48%, #3b2608 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36), 0 0 30px rgba(241, 201, 108, 0.24);
}

.thanks-hero-badge::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 18px;
  background: #0c0904;
  clip-path: polygon(0 16%, 82% 16%, 100% 38%, 82% 60%, 82% 84%, 0 84%);
}

.thanks-hero-badge span::before {
  content: "";
  position: absolute;
  left: 48px;
  top: 55px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff8df;
  box-shadow: 21px 0 0 #fff8df, 10px 12px 0 -3px #fff8df;
}

.thanks-section {
  padding: clamp(24px, 4vw, 34px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.024));
}

.thanks-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.thanks-rank-card {
  min-height: 104px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 226, 150, 0.24);
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 226, 150, 0.14), transparent 32%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thanks-rank-card strong {
  color: #fff8df;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.thanks-rank-card span {
  color: #f2c96e;
  font-size: 1.18rem;
  font-weight: 900;
}

.thanks-note {
  border-color: rgba(255, 216, 132, 0.34);
}

@media (max-width: 820px) {
  .thanks-hero-card {
    grid-template-columns: 1fr;
  }
  .thanks-hero-badge {
    width: 108px;
    height: 108px;
    justify-self: start;
  }
  .thanks-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .guide-page-header {
    padding: 20px;
    border-radius: 24px;
  }
  .guide-title-mark {
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }
  .thanks-rank-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Guide mark Mickey-like polish v2
   - unified premium black/gold badge
   - Mickey-inspired silhouette without changing page structure
========================= */
.guide-title-mark {
  position: relative;
  flex: 0 0 auto;
  width: 82px;
  height: 82px;
  border-radius: 50% 50% 46% 46%;
  overflow: visible;
  isolation: isolate;
  color: #fff8df;
  border: 1px solid rgba(255, 229, 157, 0.72);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 247, 210, 0.46), transparent 22%),
    radial-gradient(circle at 50% 68%, rgba(255, 214, 108, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(12, 9, 4, 0.98), rgba(45, 30, 8, 0.94) 54%, rgba(8, 6, 3, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.52),
    0 0 30px rgba(218, 181, 86, 0.26),
    inset 0 1px 0 rgba(255, 247, 212, 0.34),
    inset 0 -18px 28px rgba(0, 0, 0, 0.32);
}

.guide-title-mark::before,
.guide-title-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34px;
  height: 34px;
  top: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 229, 157, 0.64);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 247, 210, 0.38), transparent 28%),
    linear-gradient(145deg, rgba(18, 12, 4, 0.98), rgba(61, 41, 11, 0.94));
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 247, 212, 0.24);
  pointer-events: none;
}

.guide-title-mark::before {
  left: 4px;
}

.guide-title-mark::after {
  right: 4px;
}

.guide-title-mark span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0;
}

.guide-title-mark span::before,
.guide-title-mark span::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.guide-title-mark span::before {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffaf0, #f1cf7a);
  box-shadow:
    -16px -10px 0 -7px #fffaf0,
    16px -10px 0 -7px #fffaf0,
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(255, 226, 150, 0.34);
  transform: translateY(2px);
}

.guide-title-mark span::after {
  width: 18px;
  height: 10px;
  border-radius: 0 0 18px 18px;
  border-bottom: 3px solid rgba(14, 10, 4, 0.9);
  transform: translateY(10px);
  opacity: 0.86;
}

.guide-title-mark[data-guide="we"] span::after {
  content: "WE";
  display: grid;
  place-items: center;
  width: 38px;
  height: 18px;
  border: 0;
  border-radius: 8px;
  background: rgba(13, 10, 4, 0.78);
  color: #fff4c8;
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  transform: translateY(10px);
}

.guide-title-mark[data-guide="thanks"] span::after {
  width: 20px;
  height: 20px;
  border: 0;
  background: rgba(13, 10, 4, 0.88);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
  transform: translateY(8px);
}

.guide-title-mark[data-guide="listener"] span::after {
  width: 27px;
  height: 16px;
  border: 0;
  border-radius: 18px 18px 8px 8px;
  background: rgba(13, 10, 4, 0.86);
  box-shadow: -10px -6px 0 -5px rgba(13, 10, 4, 0.86), 10px -6px 0 -5px rgba(13, 10, 4, 0.86);
  transform: translateY(11px);
}

.guide-title-mark[data-guide="contact"] span::after {
  width: 26px;
  height: 17px;
  border: 2px solid rgba(13, 10, 4, 0.9);
  border-radius: 5px;
  background: transparent;
  transform: translateY(9px);
}

.guide-title-mark[data-guide="contact"] span::after {
  box-shadow: inset 0 -8px 0 -6px rgba(13, 10, 4, 0.9);
}

@media (max-width: 720px) {
  .guide-title-mark {
    width: 68px;
    height: 68px;
  }

  .guide-title-mark::before,
  .guide-title-mark::after {
    width: 28px;
    height: 28px;
    top: -8px;
  }

  .guide-title-mark span::before {
    width: 36px;
    height: 36px;
    box-shadow:
      -13px -8px 0 -6px #fffaf0,
      13px -8px 0 -6px #fffaf0,
      0 8px 18px rgba(0, 0, 0, 0.26),
      0 0 18px rgba(255, 226, 150, 0.3);
  }
}

/* =========================
   PWA / Home Screen Gate
========================= */

.pwa-login-pending .login-form,
.pwa-login-pending #firstLoginNote,
.pwa-login-blocked .login-form,
.pwa-login-blocked #firstLoginNote {
  display: none !important;
}

.pwa-login-allowed .pwa-login-notice {
  display: none !important;
}
.pwa-login-notice {
  position: relative;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.14), transparent 36%),
    rgba(0, 0, 0, 0.30);
}

.pwa-login-kicker {
  margin: 0 0 6px;
  color: rgba(212, 175, 55, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.pwa-login-notice h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 4vw, 23px);
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.pwa-login-notice p {
  margin: 8px 0 0;
  line-height: 1.75;
}

.pwa-device-guide {
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.pwa-device-guide h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1rem;
}

.pwa-device-guide ol {
  margin: 8px 0 0;
  padding-left: 1.35em;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.85;
}

.pwa-install-button,
.pwa-support-button {
  width: 100%;
  margin-top: 14px;
}

.pwa-support-button {
  background: rgba(0, 0, 0, 0.22);
  color: #f5d06f;
  border-color: rgba(212, 175, 55, 0.54);
}

.pwa-support-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pwa-support-box p {
  margin: 0;
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .pwa-login-notice {
    padding: 16px;
  }

  .pwa-device-guide {
    padding: 14px;
  }
}

/* =========================
   Guide title mark premium minimal override
   - remove Mickey-like decorative mark
   - use simple black/gold monogram badge for guide pages
========================= */
.guide-page-header .guide-title-mark {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 72px !important;
  height: 72px !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  isolation: isolate !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(212, 175, 55, 0.58) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 72% 20%, rgba(212, 175, 55, 0.20), transparent 34%),
    linear-gradient(145deg, #17130b 0%, #0b0a08 58%, #221805 100%) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 246, 210, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
  color: #d4af37 !important;
}

.guide-page-header .guide-title-mark::before {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  left: 15px !important;
  top: 15px !important;
  right: 15px !important;
  bottom: 15px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 14px !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.guide-page-header .guide-title-mark::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  width: 38px !important;
  height: 1px !important;
  top: 18px !important;
  right: -9px !important;
  left: auto !important;
  bottom: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.78)) !important;
  box-shadow: none !important;
  transform: rotate(-35deg) !important;
  pointer-events: none !important;
}

.guide-page-header .guide-title-mark span {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  font-size: 0 !important;
  line-height: 1 !important;
  color: #d4af37 !important;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.22) !important;
}

.guide-page-header .guide-title-mark span::before {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
  transform: none !important;
  color: #d4af37 !important;
  font-family: inherit !important;
  font-size: 1.04rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
}

.guide-page-header .guide-title-mark span::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: calc(50% + 15px) !important;
  width: 20px !important;
  height: 1px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(212, 175, 55, 0.62) !important;
  box-shadow: none !important;
  clip-path: none !important;
  transform: translateX(-50%) !important;
  opacity: 1 !important;
}

.guide-page-header .guide-title-mark[data-guide="we"] span::before {
  content: "WE" !important;
}

.guide-page-header .guide-title-mark[data-guide="thanks"] span::before {
  content: "TD" !important;
}

.guide-page-header .guide-title-mark[data-guide="listener"] span::before {
  content: "LG" !important;
}

.guide-page-header .guide-title-mark[data-guide="contact"] span::before {
  content: "QA" !important;
}

@media (max-width: 720px) {
  .guide-page-header .guide-title-mark {
    width: 62px !important;
    height: 62px !important;
    border-radius: 19px !important;
  }

  .guide-page-header .guide-title-mark::before {
    inset: 12px !important;
    border-radius: 12px !important;
  }

  .guide-page-header .guide-title-mark span::before {
    font-size: 0.92rem !important;
  }

  .guide-page-header .guide-title-mark span::after {
    top: calc(50% + 13px) !important;
    width: 18px !important;
  }
}

/* PC subpage header collision fix
   - desktop: keep the page icon in the left column, never behind the return button
   - mobile/tablet narrow: preserve the existing compact layout */
@media (min-width: 721px) {
  .cast-page-header:not(.guide-page-header) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(18px, 3vw, 34px);
  }

  .cast-page-header:not(.guide-page-header) > div {
    min-width: 0;
    padding-right: 0;
    grid-column: 2;
  }

  .cast-page-header:not(.guide-page-header) .cast-page-title-icon {
    position: relative;
    inset: auto;
    grid-column: 1;
    width: clamp(78px, 8vw, 112px);
    height: clamp(78px, 8vw, 112px);
    transform: none;
    justify-self: start;
  }

  .cast-page-header:not(.guide-page-header) > .cast-back-link,
  .cast-page-header:not(.guide-page-header) > .profile-header-actions {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    white-space: nowrap;
  }

  .cast-page-header:not(.guide-page-header)::after {
    right: auto;
    left: -82px;
    width: 220px;
    height: 220px;
  }
}

/* App notification center */
.dashboard-notice-badge {
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b0b0b;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.notification-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.notification-item {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(219, 183, 90, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.notification-item.is-unread {
  border-color: rgba(244, 199, 95, 0.58);
  background: linear-gradient(135deg, rgba(244, 199, 95, 0.13), rgba(255, 255, 255, 0.035));
}

.notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.notification-item-head strong {
  color: #fff8e2;
  font-size: 1rem;
}

.notification-item-head span {
  flex: 0 0 auto;
  color: rgba(255, 248, 226, 0.52);
  font-size: 0.72rem;
  white-space: nowrap;
}

.notification-item p {
  margin: 0;
  color: rgba(255, 248, 226, 0.82);
  line-height: 1.75;
}

.notification-link {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(244, 199, 95, 0.45);
  border-radius: 999px;
  color: #f4c75f;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
}

.notification-dashboard-notice {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(219, 183, 90, 0.18);
}

.notification-dashboard-notice h3 {
  color: #f4c75f;
  margin: 0 0 12px;
}

@media (max-width: 640px) {
  .notification-item-head {
    display: block;
  }

  .notification-item-head span {
    display: block;
    margin-top: 4px;
  }
}


/* PWA push notification settings */
.push-notification-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.10), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.push-notification-panel[hidden] {
  display: none !important;
}

.push-notification-panel strong {
  display: block;
  color: #f4d77b;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.push-notification-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
  font-size: 0.92rem;
}

.push-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.push-notification-actions button {
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.push-notification-actions button:hover:not(:disabled) {
  background: #d4af37;
  color: #050505;
}

.push-notification-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .push-notification-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .push-notification-actions {
    justify-content: stretch;
  }

  .push-notification-actions button {
    flex: 1 1 100%;
  }
}


/* Profile notification settings */
.notification-settings-panel {
  margin-top: 24px;
}

.notification-settings-lead {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 16px;
  line-height: 1.8;
}

.profile-push-notification-panel {
  margin-top: 0;
}


/* =========================================================
   20260521 multi-page mobile/admin layout repair
   - Fix broken paired buttons on phones
   - Repair admin action/filter layouts
   - Stabilize admin activity cards/forms on PC and mobile
   - Notification detail opens in modal, not dashboard navigation
========================================================= */
.cast-action-row,
.profile-header-actions,
.admin-inline-actions,
.admin-filter-actions,
.cast-form-actions,
.profile-edit-actions,
.push-notification-actions {
  box-sizing: border-box;
}

.profile-header-actions,
.admin-inline-actions,
.admin-filter-actions,
.cast-form-actions,
.profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-header-actions .cast-back-link,
.admin-inline-actions a,
.admin-inline-actions button,
.admin-filter-actions a,
.admin-filter-actions button,
.cast-form-actions a,
.cast-form-actions button,
.profile-edit-actions a,
.profile-edit-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  line-height: 1.35;
}

.admin-filter-panel,
.admin-approval-card,
.admin-activity-card,
.admin-edit-panel {
  min-width: 0;
  overflow: hidden;
}

.admin-filter-form,
.admin-edit-form,
.admin-form-grid,
.cast-form-grid {
  min-width: 0;
}

.admin-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.admin-filter-actions {
  justify-content: flex-end;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 18px;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.admin-card-head > div {
  min-width: 0;
}

.admin-card-head h2,
.admin-card-head p {
  overflow-wrap: anywhere;
}

.admin-status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.12);
  color: #f4d77b;
  font-weight: 800;
  white-space: nowrap;
}

.admin-activity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.admin-activity-stat,
.admin-stat-box {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
}

.admin-activity-stat span,
.admin-stat-box span {
  display: block;
  color: rgba(212, 175, 55, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.10em;
}

.admin-activity-stat strong,
.admin-stat-box strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: clamp(1.02rem, 2.8vw, 1.35rem);
  overflow-wrap: anywhere;
}

.admin-activity-stat small,
.admin-stat-box small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.admin-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.admin-detail-list div {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-detail-list dt {
  color: rgba(212, 175, 55, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-detail-list dd {
  margin: 6px 0 0;
  color: #fff;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-inline-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.admin-table-action {
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
}

.notification-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(244, 199, 95, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: #f4c75f;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
}

.notification-detail-button:hover {
  background: rgba(244, 199, 95, 0.16);
}

.notification-detail-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(244, 199, 95, 0.34);
  background: rgba(0, 0, 0, 0.28);
}

.notification-detail-panel[hidden] {
  display: none !important;
}

.notification-detail-panel h3 {
  margin: 0 0 8px;
  color: #fff8e2;
  font-size: 1.08rem;
}

.notification-detail-panel p {
  margin: 0;
  color: rgba(255, 248, 226, 0.82);
  line-height: 1.85;
  white-space: pre-wrap;
}

.notification-detail-related-link {
  display: inline-flex;
  margin-top: 12px;
  color: #f4c75f;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 720px) {
  .cast-page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }

  .cast-page-header:not(.guide-page-header) {
    display: grid !important;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 18px;
  }

  .cast-page-header:not(.guide-page-header) > div:first-of-type,
  .cast-page-header:not(.guide-page-header) > div:not(.profile-header-actions) {
    grid-column: 2;
    min-width: 0;
    padding-right: 0 !important;
  }

  .cast-page-header:not(.guide-page-header) .cast-page-title-icon {
    position: relative !important;
    inset: auto !important;
    grid-column: 1;
    grid-row: 1;
    width: 58px !important;
    height: 58px !important;
    transform: none !important;
    justify-self: center;
  }

  .cast-page-header:not(.guide-page-header)::after {
    width: 150px !important;
    height: 150px !important;
    right: auto !important;
    left: -52px !important;
    top: 22px !important;
    transform: none !important;
  }

  .cast-page-header:not(.guide-page-header) > .cast-back-link,
  .cast-page-header:not(.guide-page-header) > .profile-header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .profile-header-actions,
  .admin-inline-actions,
  .admin-filter-actions,
  .cast-form-actions,
  .profile-edit-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
  }

  .profile-header-actions .cast-back-link,
  .admin-inline-actions a,
  .admin-inline-actions button,
  .admin-filter-actions a,
  .admin-filter-actions button,
  .cast-form-actions a,
  .cast-form-actions button,
  .profile-edit-actions a,
  .profile-edit-actions button,
  .cast-primary-button,
  .cast-danger-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    white-space: normal !important;
    padding-inline: 12px !important;
  }

  .push-notification-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .push-notification-actions button {
    width: 100% !important;
  }

  .admin-filter-form,
  .admin-card-grid,
  .admin-activity-stats,
  .admin-detail-list {
    grid-template-columns: 1fr !important;
  }

  .admin-card-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-status-pill {
    justify-self: start;
  }

  .admin-approval-card,
  .admin-activity-card,
  .admin-edit-panel,
  .cast-panel {
    border-radius: 20px;
  }

  .notification-detail-button {
    width: 100%;
  }
}

@media (min-width: 721px) {
  .admin-filter-actions,
  .admin-inline-actions {
    flex-wrap: nowrap;
  }
}


/* =========================================================
   20260521 notification/settings + mobile action refinement
   - Keep profile edit header buttons in one row on phones
   - Stop admin user buttons from overlapping on phones
   - Add first-login notification prompt
========================================================= */
.profile-edit-header-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  min-width: min(100%, 390px);
}

.profile-edit-header-actions .cast-back-link {
  width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  padding-inline: 12px !important;
  font-size: clamp(0.78rem, 2.6vw, 0.92rem);
  line-height: 1.25;
}

.notification-settings-panel {
  scroll-margin-top: 24px;
}

.admin-users-page .admin-top-actions,
.admin-users-page .admin-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-users-page .admin-top-actions .button-link,
.admin-users-page .admin-search-row .button-link,
.admin-users-page .admin-search-row button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
}

.admin-users-page .admin-search-row input {
  flex: 1 1 220px;
  min-width: 0;
}

.pwa-first-notification-modal[hidden] {
  display: none !important;
}

.pwa-first-notification-card {
  max-width: 520px;
}

.pwa-first-notification-lead,
.pwa-first-notification-status {
  color: rgba(255, 248, 226, 0.82);
  line-height: 1.85;
  margin: 0 0 14px;
}

.pwa-first-notification-status {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(255, 255, 255, 0.035);
}

.pwa-first-notification-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .cast-page-header:not(.guide-page-header) > .profile-edit-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }

  .profile-edit-header-actions .cast-back-link {
    min-height: 46px !important;
    padding: 10px 8px !important;
    font-size: clamp(0.72rem, 3.05vw, 0.84rem) !important;
    letter-spacing: 0.01em !important;
  }

  .admin-users-page .admin-top-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-users-page .admin-top-actions .button-link {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .admin-users-page .admin-search-row {
    display: grid !important;
    grid-template-columns: 1fr 0.72fr;
    gap: 9px;
    width: 100%;
  }

  .admin-users-page .admin-search-row input {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  .admin-users-page .admin-search-row button,
  .admin-users-page .admin-search-row .admin-mini-link {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 10px !important;
    font-size: 0.88rem !important;
  }

  .pwa-first-notification-card {
    width: min(100% - 22px, 520px);
    padding: 20px;
  }

  .pwa-first-notification-actions {
    grid-template-columns: 1fr;
  }

  .pwa-first-notification-actions button {
    width: 100% !important;
  }
}

@media (max-width: 390px) {
  .profile-edit-header-actions .cast-back-link {
    font-size: 0.70rem !important;
    padding-inline: 6px !important;
  }
}


/* 初回導線 通知許可モーダル */
.push-first-gate-modal[hidden] {
  display: none !important;
}

.push-first-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.push-first-gate-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.push-first-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.push-first-gate-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(18, 18, 18, 0.98), rgba(3, 3, 3, 0.98));
  color: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), 0 0 34px rgba(212, 175, 55, 0.14);
  padding: 28px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.18s ease;
}

.push-first-gate-modal.is-open .push-first-gate-card {
  transform: translateY(0) scale(1);
}

.push-first-gate-kicker {
  margin: 0 0 8px;
  color: #d4af37;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.push-first-gate-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.35rem, 4.6vw, 2rem);
  letter-spacing: 0.04em;
}

.push-first-gate-lead {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.push-first-gate-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.push-first-gate-list li {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.9);
}

.push-first-gate-status {
  min-height: 1.5em;
  margin: 0 0 16px;
  color: #d4af37;
  font-size: 0.9rem;
  line-height: 1.6;
}

.push-first-gate-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.push-first-gate-actions button {
  min-height: 48px;
  margin: 0;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.push-first-gate-enable {
  flex: 1.3;
  border: 1px solid rgba(212, 175, 55, 0.8);
  background: linear-gradient(135deg, #d4af37, #f0d77a);
  color: #070707;
}

.push-first-gate-skip {
  flex: 0.8;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
}

.push-first-gate-actions button:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 480px) {
  .push-first-gate-modal {
    padding: 14px;
  }

  .push-first-gate-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .push-first-gate-actions {
    gap: 8px;
  }

  .push-first-gate-actions button {
    min-height: 46px;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 0.88rem;
    white-space: nowrap;
  }
}


/* Admin notice scheduler */
.admin-notice-card {
  max-width: 1120px;
}
.admin-notice-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.admin-notice-form {
  display: grid;
  gap: 18px;
  margin: 20px 0 34px;
}
.admin-notice-form input[type="text"],
.admin-notice-form input[type="url"],
.admin-notice-form input[type="datetime-local"],
.admin-notice-form select,
.admin-notice-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.admin-notice-fieldset {
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: rgba(255,255,255,0.025);
}
.admin-notice-fieldset legend {
  color: #d4af37;
  padding: 0 8px;
  font-weight: 700;
}
.radio-line,
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.admin-notice-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.button.compact {
  padding: 8px 12px;
  font-size: 0.9rem;
  min-height: auto;
}
.admin-notice-list-section {
  margin-top: 28px;
}
.dashboard-admin-notices {
  display: grid;
  gap: 14px;
}
.dashboard-admin-notice-card {
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 18px;
  padding: 16px;
  background: rgba(0,0,0,0.28);
}
.dashboard-admin-notice-card h3 {
  margin: 4px 0 8px;
  color: #f7e7a6;
}
.dashboard-admin-notice-card p {
  margin: 0 0 12px;
  line-height: 1.75;
}
.dashboard-admin-notice-meta {
  color: rgba(255,255,255,0.62);
  font-size: 0.82rem;
}
.notice-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.55);
  color: #f7e7a6;
  text-decoration: none;
}
@media (max-width: 720px) {
  .admin-notice-head,
  .admin-notice-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-notice-head .button,
  .admin-notice-actions .button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .admin-notice-table-wrap table {
    min-width: 760px;
  }
}


/* =========================================================
   20260521 leave history spacing + progress report transaction fix support
   ========================================================= */
.cast-mini-card-list {
  display: grid;
  gap: 14px;
}

.cast-mini-card {
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
}

.cast-mini-card-head,
.leave-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.leave-history-type {
  min-width: 0;
}

.leave-history-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .cast-mini-card {
    padding: 14px;
  }

  .cast-mini-card-head,
  .leave-history-head {
    align-items: flex-start;
    gap: 8px;
  }

  .leave-history-status {
    font-size: 0.82rem;
    padding-inline: 10px;
  }
}


/* =========================================================
   20260521 history badge spacing + progress history + admin notice layout repair
   ========================================================= */
.leave-history-card,
.progress-history-card {
  overflow: hidden;
}

.leave-history-head,
.progress-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  margin-bottom: 10px;
}

.leave-history-type,
.progress-history-type {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.leave-history-status,
.progress-history-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 30px;
  padding: 6px 13px;
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.leave-history-status.success,
.progress-history-status.success {
  border-color: rgba(88, 214, 141, 0.45);
  color: #8ff0b4;
  background: rgba(88, 214, 141, 0.10);
}

.leave-history-status.error,
.progress-history-status.error {
  border-color: rgba(255, 111, 111, 0.45);
  color: #ffb0b0;
  background: rgba(255, 111, 111, 0.10);
}

.progress-history-status.warning {
  border-color: rgba(212, 175, 55, 0.48);
  color: #f7e7a6;
  background: rgba(212, 175, 55, 0.10);
}

.progress-history-section {
  margin-top: 22px;
}

.progress-history-target {
  margin: 0 0 6px;
  color: #f7e7a6;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-notice-page {
  min-height: 100vh;
  padding: 28px 16px;
  box-sizing: border-box;
}

.admin-notice-card {
  width: min(1120px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

.admin-notice-head {
  align-items: center;
}

.admin-notice-form label,
.admin-notice-form .radio-line,
.admin-notice-form .checkbox-line {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.admin-notice-form input[type="text"],
.admin-notice-form input[type="url"],
.admin-notice-form input[type="datetime-local"],
.admin-notice-form select,
.admin-notice-form textarea {
  margin-top: 8px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 12px 14px;
  font: inherit;
}

.admin-notice-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.admin-notice-fieldset {
  min-width: 0;
}

.admin-notice-fieldset input[type="datetime-local"],
.admin-notice-fieldset select,
.admin-notice-fieldset input[type="url"] {
  margin-top: 0;
}

.admin-notice-actions .button,
.admin-notice-head .button {
  min-height: 44px;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .leave-history-head,
  .progress-history-head {
    gap: 10px;
  }

  .leave-history-status,
  .progress-history-status {
    margin-left: 10px;
    padding: 6px 11px;
    font-size: 0.78rem;
  }

  .admin-notice-page {
    padding: 16px 10px 28px;
  }

  .admin-notice-card {
    padding: 20px 14px;
    border-radius: 24px;
  }

  .admin-notice-head {
    gap: 14px;
  }

  .admin-notice-head h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .admin-notice-fieldset {
    padding: 14px 12px;
    gap: 11px;
  }

  .radio-line,
  .checkbox-line {
    align-items: flex-start;
    line-height: 1.55;
  }

  .admin-notice-form input[type="text"],
  .admin-notice-form input[type="url"],
  .admin-notice-form input[type="datetime-local"],
  .admin-notice-form select,
  .admin-notice-form textarea {
    font-size: 16px;
  }

  .admin-notice-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .leave-history-head,
  .progress-history-head {
    align-items: flex-start;
  }

  .leave-history-type,
  .progress-history-type {
    font-size: 0.96rem;
  }

  .leave-history-status,
  .progress-history-status {
    margin-left: 6px;
    padding-inline: 9px;
  }
}


/* =========================================================
   20260521 profile edit mobile one-line buttons
   Keep the two header action buttons on one line without wrapping.
========================================================= */
.profile-edit-header-actions .cast-back-link {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .profile-edit-header-actions {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
    gap: 6px !important;
  }

  .profile-edit-header-actions .cast-back-link {
    min-height: 42px !important;
    padding: 9px 6px !important;
    font-size: clamp(0.64rem, 2.8vw, 0.78rem) !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }
}

@media (max-width: 360px) {
  .profile-edit-header-actions .cast-back-link {
    font-size: 0.61rem !important;
    padding-inline: 5px !important;
  }
}

/* =========================
   image long-press guard only
   Reverted iOS notification/status-bar background experiments.
========================= */
img,
svg,
.dashboard-card-icon,
.dashboard-center-image,
.loading-smais-image {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
}


/* Verified rollback for failed iOS notification-bar white background experiment. */
html.dashboard-root,
body.dashboard-page {
}

html.transition-white-mode,
body.transition-white-mode,
html.loader-white-mode,
body.loader-white-mode,
html.statusbar-white-mode,
body.statusbar-white-mode {
  background: #000000 !important;
}

.ios-statusbar-cover,
.loader-statusbar-cover {
  display: none !important;
}


/* =========================================================
   20260521 admin notice mobile layout hard fix
   Scope is limited to admin_notice.php to avoid breaking other pages.
========================================================= */
.admin-notice-page,
.admin-notice-page * {
  box-sizing: border-box;
}

.admin-notice-page {
  overflow-x: hidden;
}

.admin-notice-page .admin-notice-card,
.admin-notice-page .admin-notice-form,
.admin-notice-page .admin-notice-fieldset,
.admin-notice-page .admin-notice-list-section,
.admin-notice-page .admin-notice-table-wrap {
  min-width: 0;
  max-width: 100%;
}

.admin-notice-page .admin-notice-form label {
  display: block;
  min-width: 0;
}

.admin-notice-page .admin-notice-form input[type="text"],
.admin-notice-page .admin-notice-form input[type="url"],
.admin-notice-page .admin-notice-form input[type="datetime-local"],
.admin-notice-page .admin-notice-form select,
.admin-notice-page .admin-notice-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-notice-page .admin-notice-fieldset {
  overflow: hidden;
}

.admin-notice-page .radio-line,
.admin-notice-page .checkbox-line {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.admin-notice-page .admin-notice-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
  .admin-notice-page {
    width: 100%;
    padding: 14px 10px calc(28px + env(safe-area-inset-bottom));
  }

  .admin-notice-page .admin-notice-card {
    width: 100%;
    max-width: 100%;
    padding: 18px 12px;
    border-radius: 22px;
    overflow: hidden;
  }

  .admin-notice-page .admin-notice-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .admin-notice-page .admin-notice-head .button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .admin-notice-page .admin-notice-form {
    gap: 16px;
    margin-top: 18px;
  }

  .admin-notice-page .admin-notice-form input[type="text"],
  .admin-notice-page .admin-notice-form input[type="url"],
  .admin-notice-page .admin-notice-form input[type="datetime-local"],
  .admin-notice-page .admin-notice-form select,
  .admin-notice-page .admin-notice-form textarea {
    font-size: 16px;
    padding: 12px;
    border-radius: 13px;
  }

  .admin-notice-page .admin-notice-fieldset {
    padding: 14px 10px;
    border-radius: 16px;
    gap: 10px;
  }

  .admin-notice-page .admin-notice-fieldset legend {
    max-width: calc(100vw - 72px);
  }

  .admin-notice-page .radio-line,
  .admin-notice-page .checkbox-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 9px;
    row-gap: 4px;
    line-height: 1.55;
  }

  .admin-notice-page .radio-line input,
  .admin-notice-page .checkbox-line input {
    margin-top: 0.28em;
    flex: 0 0 auto;
  }

  .admin-notice-page .admin-notice-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-notice-page .admin-notice-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    white-space: normal;
    line-height: 1.35;
  }

  .admin-notice-page .admin-notice-table-wrap {
    margin-inline: 0;
    padding-bottom: 6px;
  }

  .admin-notice-page .admin-notice-table-wrap table {
    min-width: 720px;
  }
}

@media (max-width: 390px) {
  .admin-notice-page .admin-notice-card {
    padding-inline: 10px;
  }

  .admin-notice-page .admin-notice-head h1 {
    font-size: 1.48rem;
  }

  .admin-notice-page .admin-notice-head p {
    font-size: 0.88rem;
  }
}

/* Notice card/link behavior fix: direct notice links navigate normally; push-open modal shows centered related button. */
.dashboard-admin-notice-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.dashboard-notice-direct-link {
  position: relative;
  z-index: 2;
  white-space: nowrap;
}
.admin-notice-detail-actions.is-push-open {
  justify-content: center;
  text-align: center;
}
.admin-notice-detail-link-button.is-push-related-button {
  min-width: 210px;
  justify-content: center;
}
@media (max-width: 640px) {
  .dashboard-admin-notice-card-actions {
    align-items: stretch;
  }
  .dashboard-notice-direct-link {
    width: 100%;
  }
  .admin-notice-detail-actions.is-push-open {
    justify-content: center;
  }
  .admin-notice-detail-link-button.is-push-related-button {
    width: auto;
    min-width: min(240px, 100%);
  }
}

/* 20260521 dashboard scroll freeze fix: admin notice detail modal must be a real hidden modal. */
.admin-notice-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-sizing: border-box;
}

.admin-notice-detail-modal.is-open {
  display: flex;
}

.admin-notice-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.admin-notice-detail-panel {
  position: relative;
  width: min(92vw, 520px);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  background: radial-gradient(circle at 18% 0%, rgba(212, 175, 55, 0.16), transparent 34%), linear-gradient(145deg, rgba(12, 12, 12, 0.98), rgba(2, 2, 2, 0.98));
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62), 0 0 34px rgba(212, 175, 55, 0.12);
}

.admin-notice-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.admin-notice-detail-head p {
  margin: 0 0 6px;
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.admin-notice-detail-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.24rem, 4.3vw, 1.8rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-notice-detail-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.admin-notice-detail-meta {
  padding: 12px 24px 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
}

.admin-notice-detail-body {
  padding: 16px 24px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.admin-notice-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}

.admin-notice-detail-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: linear-gradient(145deg, #d4af37, #f1d47a);
  color: #111;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 640px) {
  .admin-notice-detail-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .admin-notice-detail-panel {
    width: 100%;
    max-height: 84vh;
    border-radius: 24px 24px 18px 18px;
  }

  .admin-notice-detail-head {
    padding: 20px 20px 12px;
  }

  .admin-notice-detail-meta {
    padding-inline: 20px;
  }

  .admin-notice-detail-body {
    padding: 14px 20px 18px;
  }

  .admin-notice-detail-actions {
    justify-content: center;
    padding: 0 20px 20px;
  }

  .admin-notice-detail-link-button {
    width: 100%;
  }
}


/* =========================
   iOS 26 ステータスバー黒塗り対応
   viewport-fit=cover + black-translucent に変更したことで
   ステータスバー領域がbodyの背景色を透過表示する。
   env(safe-area-inset-top) で本文コンテンツを押し下げる。
========================= */
@supports (padding: env(safe-area-inset-top)) {
  /* ダッシュボード・アプリページ全般 */
  body.dashboard-page,
  body.app-page {
    padding-top: env(safe-area-inset-top);
  }

  /* ローディング画面は loading.css 側で safe-area 下に固定する。
     ここで top/padding を切り替えるとフェードアウト末尾で下端が跳ねる。 */
  .loading-screen {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 24px;
  }
}


/* Final iPhone/PWA status area guard: white Mickey/fade layers must never cover the clock area. */
.smais-statusbar-black-guard,
html.smais-statusbar-guard-active::before,
body.smais-statusbar-guard-active::before {
  content: "" !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: env(safe-area-inset-top, 0px) !important;
  background: #000000 !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}

/* =========================
   常時ステータスバー黒固定
   アニメーションの有無に関係なく、iPhone/PWA上部の時計・通知領域を白フェードより上に固定する。
========================= */
:root {
  --smais-statusbar-height: env(safe-area-inset-top, 0px);
  background: #000000 !important;
}


.smais-statusbar-black-guard,
html.smais-statusbar-guard-active::before,
body.smais-statusbar-guard-active::before {
  content: "" !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: var(--smais-statusbar-height, env(safe-area-inset-top, 0px)) !important;
  background: #000000 !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}

@supports (padding: env(safe-area-inset-top)) {
  .smais-ios-statusbar-mode .page-mickey-transition,
  .smais-ios-statusbar-mode .subpage-entry-fade {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }
}


/* 20260522 fade stable dashboard viewport: avoid vh/dvh mismatch while the white loader fades. */
html.dashboard-root,
body.dashboard-page {
  min-height: 100%;
  background-color: #000000 !important;
}
body.dashboard-page .dashboard-main {
  min-height: 100svh;
}
@supports (min-height: 100dvh) {
  body.dashboard-page .dashboard-main {
    min-height: 100dvh;
  }
}


/* 20260522 stable Mickey fade final fix
   Keep the page geometry fixed while the white loader fades.
   The previous safe-area padding on body made the document taller than the viewport,
   which shows up on iPhone as a bottom snap when the loader is removed. */
:root {
  --smais-stable-vh: 100vh;
  --smais-statusbar-height: env(safe-area-inset-top, 0px);
}

@supports (height: 100svh) {
  :root { --smais-stable-vh: 100svh; }
}

html.dashboard-root,
body.dashboard-page {
  min-height: var(--smais-stable-vh) !important;
  background-color: #000000 !important;
  overscroll-behavior-y: none;
}

@supports (padding: env(safe-area-inset-top)) {
  body.dashboard-page {
    padding-top: 0 !important;
  }

  body.dashboard-page .dashboard-main {
    box-sizing: border-box;
    min-height: var(--smais-stable-vh) !important;
    padding-top: var(--smais-statusbar-height) !important;
  }
}

html.smais-loader-geometry-lock,
html.smais-loader-geometry-lock body.dashboard-page {
  height: var(--smais-stable-vh) !important;
  min-height: var(--smais-stable-vh) !important;
  overflow: hidden !important;
}

html.smais-loader-geometry-lock body.dashboard-page .dashboard-main {
  min-height: var(--smais-stable-vh) !important;
}

.loading-screen,
.page-mickey-transition,
.subpage-entry-fade {
  transform: translateZ(0);
  backface-visibility: hidden;
}


/* 20260523: fade-out disabled on every page. Only Mickey expansion remains. */
.subpage-entry-fade {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.smais-statusbar-black-guard {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: var(--smais-statusbar-height, env(safe-area-inset-top, 0px)) !important;
  background: #000 !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}
html.smais-statusbar-guard-active::before,
body.smais-statusbar-guard-active::before {
  content: "" !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: var(--smais-statusbar-height, env(safe-area-inset-top, 0px)) !important;
  background: #000 !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}

/* =========================
   Attraction card cinematic image panel
   Uses existing WebP files in image/attraction.
========================= */
.attraction-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.attraction-card {
  min-height: 168px;
  padding: 0;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(18, 18, 24, 0.96), rgba(7, 8, 12, 0.94));
}

.attraction-card-content {
  position: relative;
  z-index: 3;
  width: 62%;
  min-height: 168px;
  padding: 22px 18px 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.attraction-card-visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 56%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 14%,
    rgba(0, 0, 0, 0.72) 34%,
    #000 56%,
    #000 100%);
  mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 14%,
    rgba(0, 0, 0, 0.72) 34%,
    #000 56%,
    #000 100%);
}

.attraction-card-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: none;
}

.attraction-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 4;
  border-radius: 23px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.attraction-card:hover .attraction-card-visual {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.04);
}

.attraction-card-locked .attraction-card-visual,
.attraction-card.is-attraction-empty .attraction-card-visual {
  filter: grayscale(0.35) brightness(0.68);
}

.attraction-empty-card-overlay,
.attraction-lock-overlay {
  z-index: 8;
}

@media (max-width: 560px) {
  .attraction-card-grid {
    grid-template-columns: 1fr;
  }

  .attraction-card-content {
    width: 68%;
    padding: 20px 14px 18px 18px;
  }

  .attraction-card-visual {
    width: 58%;
  }

  .attraction-card strong {
    font-size: 16px;
  }
}






/* Teleport attraction image overlay - keep text order and prevent bottom clipping */
.teleport-attraction-choice-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  justify-content: flex-start;
  gap: 9px;
  padding-bottom: 28px;
}

.teleport-attraction-choice-card .teleport-choice-topline,
.teleport-attraction-choice-card .teleport-choice-body,
.teleport-attraction-choice-card .teleport-choice-arrow {
  position: relative;
  z-index: 3;
}

.teleport-attraction-choice-card .teleport-choice-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teleport-attraction-choice-card .teleport-choice-arrow {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 2px;
  margin-bottom: 0;
  line-height: 1.15;
  transform: none;
}

.teleport-attraction-card-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(58%, 340px);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 12%, rgba(0,0,0,0.32) 28%, rgba(0,0,0,0.82) 48%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 12%, rgba(0,0,0,0.32) 28%, rgba(0,0,0,0.82) 48%, #000 66%);
}

.teleport-attraction-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.teleport-attraction-card-image.is-missing {
  display: none;
}

.teleport-attraction-choice-sub {
  position: relative;
  z-index: 3;
}

@media (max-width: 640px) {
  .teleport-attraction-choice-card {
    padding-bottom: 30px;
    gap: 8px;
  }

  .teleport-attraction-choice-card .teleport-choice-arrow {
    margin-top: 1px;
  }
}




/* Teleport area image overlay - match attraction selector card layout */
.teleport-area-choice-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  justify-content: flex-start;
  gap: 9px;
  padding-bottom: 28px;
}

.teleport-area-choice-card .teleport-choice-topline,
.teleport-area-choice-card .teleport-choice-body,
.teleport-area-choice-card .teleport-choice-arrow {
  position: relative;
  z-index: 3;
}

.teleport-area-choice-card .teleport-choice-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teleport-area-choice-card .teleport-choice-arrow {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 2px;
  margin-bottom: 0;
  line-height: 1.15;
  transform: none;
}

.teleport-area-card-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(58%, 340px);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 12%, rgba(0,0,0,0.32) 28%, rgba(0,0,0,0.82) 48%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 12%, rgba(0,0,0,0.32) 28%, rgba(0,0,0,0.82) 48%, #000 66%);
}

.teleport-area-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.teleport-area-card-image.is-missing {
  display: none;
}

.teleport-area-choice-sub {
  position: relative;
  z-index: 3;
}

@media (max-width: 640px) {
  .teleport-area-choice-card {
    padding-bottom: 30px;
    gap: 8px;
  }

  .teleport-area-choice-card .teleport-choice-arrow {
    margin-top: 1px;
  }
}

/* =========================
   20260524 targeted iPhone/PWA statusbar overlay spacing
   Applies only to Teleport / Map / Attraction / Parade / Progress / Profile.
   Dashboard layout and Mickey animation geometry are intentionally untouched.
========================= */
:root {
  --smais-statusbar-height: 0px;
  --smais-statusbar-content-gap: 10px;
}

.smais-statusbar-black-guard,
html.smais-statusbar-guard-active::before,
body.smais-statusbar-guard-active::before {
  height: var(--smais-statusbar-height, 0px) !important;
  min-height: var(--smais-statusbar-height, 0px) !important;
  background: #000000 !important;
}

body.smais-offset-statusbar.cast-subpage {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.smais-offset-statusbar.cast-subpage > .cast-page-shell {
  box-sizing: border-box;
  padding-top: calc(clamp(28px, 5vw, 64px) + var(--smais-statusbar-height, 0px) + var(--smais-statusbar-content-gap, 10px)) !important;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 24px) !important;
}

body.smais-offset-statusbar.cast-subpage .teleport-modal,
body.smais-offset-statusbar.cast-subpage .attraction-operation-modal,
body.smais-offset-statusbar.cast-subpage .attraction-rank-list-modal,
body.smais-offset-statusbar.cast-subpage .history-detail-modal {
  padding-top: var(--smais-statusbar-height, 0px);
}


/* =========================
   BlueMap iOS iframe composite guard
   iOS Safari keeps the previous text-shadow layer for BlueMap player nametags
   when the iframe is composited through rounded/transparent parents.
   Keep the map embedded in the page, but remove the risky parent effects and
   force a tiny iframe repaint from map.html on iOS only.
========================= */
@supports (-webkit-touch-callout: none) {
  html.ios-bluemap-iframe .map-page .map-panel,
  html.ios-bluemap-iframe .map-page .bluemap-frame-wrap {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    isolation: auto !important;
    contain: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    perspective: none !important;
    will-change: auto !important;
  }

  html.ios-bluemap-iframe .map-page .bluemap-frame-wrap {
    overflow: visible !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
  }

  html.ios-bluemap-iframe .map-page .bluemap-frame {
    opacity: var(--bluemap-ios-opacity, 1) !important;
    background: #000 !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased;
    transform-origin: 50% 50% !important;
    will-change: transform, opacity !important;
  }
}

/* ES-Reset operation buttons: muted lime across all attraction operation modals */
.attraction-command-button.attraction-es-reset-button {
  background: #BBC963;
  border-color: rgba(212, 175, 55, 0.72);
  color: #000000;
  box-shadow: 0 10px 22px rgba(187, 201, 99, 0.22);
}

.attraction-command-button.attraction-es-reset-button:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 12px 26px rgba(187, 201, 99, 0.30);
}

.attraction-command-button.attraction-es-reset-button:disabled {
  background: rgba(187, 201, 99, 0.55);
  border-color: rgba(212, 175, 55, 0.45);
  color: rgba(0, 0, 0, 0.52);
  box-shadow: none;
}


/* =========================
   PC auth screen layout fix
   Login/setup only. Keep mobile safe-area behavior unchanged.
========================= */
@media (min-width: 769px) {
  html.auth-document {
    min-height: 100%;
    background:
      radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%),
      radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.10), transparent 34%),
      linear-gradient(135deg, #020202 0%, #070707 48%, #000000 100%);
  }

  body.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: clamp(72px, 8vh, 104px);
    padding-bottom: clamp(48px, 7vh, 88px);
    background:
      radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%),
      radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.10), transparent 34%),
      linear-gradient(135deg, #020202 0%, #070707 48%, #000000 100%);
  }

  body.auth-page > .card {
    margin-top: 0;
  }
}

/* =========================
   Guide page header redesign
   - make the top card a single readable block
   - remove the separated 3-part feeling
========================= */
.guide-page-header.guide-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(26px, 4vw, 42px);
  border-radius: 34px;
  border: 1px solid rgba(255, 226, 150, 0.34);
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 230, 153, 0.18), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(18, 13, 5, 0.96), rgba(42, 29, 9, 0.82) 52%, rgba(9, 8, 6, 0.94));
  box-shadow:
    0 26px 78px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 244, 198, 0.14);
  overflow: hidden;
}

.guide-page-header.guide-hero-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 226, 150, 0.09), transparent 38%),
    radial-gradient(circle at 55% 115%, rgba(255, 214, 108, 0.13), transparent 44%);
  pointer-events: none;
}

.guide-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 28px);
  min-width: 0;
}

.guide-hero-text {
  min-width: 0;
}

.guide-hero-text .cast-page-kicker {
  margin-bottom: 8px;
  color: #f2c96e;
}

.guide-hero-text h1 {
  margin: 0;
  color: #fff8df;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.32;
  letter-spacing: 0.035em;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.guide-hero-text p:not(.cast-page-kicker) {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.9;
}

.guide-page-header .guide-hero-back {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  border-color: rgba(242, 201, 110, 0.54);
  background: rgba(255, 255, 255, 0.075);
  color: #fff8df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.guide-page-header .guide-hero-back:hover {
  background: rgba(242, 201, 110, 0.16);
}

@media (max-width: 760px) {
  .guide-page-header.guide-hero-header {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
    padding: 24px 20px;
    border-radius: 28px;
  }

  .guide-hero-main {
    align-items: flex-start;
  }

  .guide-hero-text h1 {
    font-size: clamp(1.38rem, 7vw, 1.85rem);
  }

  .guide-page-header .guide-hero-back {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .guide-hero-main {
    gap: 14px;
  }

  .guide-hero-text p:not(.cast-page-kicker) {
    font-size: 0.92rem;
    line-height: 1.75;
  }
}


/* =========================
   Guide header spacing/readability fix
   - remove unnecessary right blank area
   - offset guide pages below iOS/PWA status black guard like other subpages
========================= */
.guide-page-header.guide-hero-header {
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
}

.guide-hero-main {
  width: 100%;
  align-items: flex-start;
}

.guide-hero-text {
  flex: 1 1 auto;
}

.guide-hero-text h1 {
  letter-spacing: 0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.guide-hero-text p:not(.cast-page-kicker) {
  max-width: none;
  font-size: clamp(0.96rem, 1.6vw, 1.05rem);
  line-height: 1.85;
}

.guide-page-header .guide-hero-back {
  align-self: flex-start;
}

body.smais-offset-statusbar.guide-page > .guide-page-shell {
  padding-top: calc(clamp(28px, 5vw, 64px) + var(--smais-statusbar-height, 0px) + var(--smais-statusbar-content-gap, 10px)) !important;
}

@media (max-width: 760px) {
  .guide-page-header.guide-hero-header {
    gap: 16px;
  }

  .guide-page-header .guide-hero-back {
    align-self: stretch;
  }
}

@media (max-width: 520px) {
  .guide-hero-main {
    flex-direction: column;
  }

  .guide-hero-text h1 {
    line-height: 1.38;
  }
}


/* =========================
   20260525 Guide pages statusbar alignment
   Match guide pages to the normal subpage PWA status-bar behavior.
   The template now uses viewport-fit=cover + black-translucent; this keeps
   the clock/notification black guard from becoming thicker than other pages.
========================= */
body.smais-offset-statusbar.guide-page {
  padding-top: 0 !important;
}

body.smais-offset-statusbar.guide-page > .guide-page-shell {
  box-sizing: border-box;
  padding-top: calc(clamp(28px, 5vw, 64px) + var(--smais-statusbar-height, 0px) + var(--smais-statusbar-content-gap, 10px)) !important;
}

@supports (padding: env(safe-area-inset-top)) {
  body.smais-offset-statusbar.guide-page {
    padding-top: 0 !important;
  }
}


/* =========================
   Global mobile zoom / 3D Touch guard
   Prevents page pinch zoom, double-tap zoom, image callout, and accidental text selection.
   Keep form fields selectable/editable.
========================= */
html,
body {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
}

img,
svg,
button,
a,
.card,
.dashboard-card,
.action-card,
.teleport-card,
.area-card,
.attraction-card {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

/* =========================
   Global text selection guard
   Text selection is disabled on every page except the inquiry response guide.
   Keep form fields editable/selectable.
========================= */
body:not(.allow-text-select),
body:not(.allow-text-select) * {
  -webkit-user-select: none;
  user-select: none;
}

body.allow-text-select,
body.allow-text-select .guide-panel,
body.allow-text-select .guide-panel * {
  -webkit-user-select: text;
  user-select: text;
}

body:not(.allow-text-select) input,
body:not(.allow-text-select) textarea,
body:not(.allow-text-select) select,
body:not(.allow-text-select) [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* Leave request month/day selector */
.cast-date-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 560px) {
  .cast-date-select-row {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-month-rank-detail-card {
  border-color: rgba(218, 184, 95, 0.28);
  background: linear-gradient(135deg, rgba(218, 184, 95, 0.10), rgba(255, 255, 255, 0.045));
}

.profile-month-report-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  letter-spacing: 0.04em;
}

.profile-month-detail-list {
  margin-bottom: 16px;
}

.profile-month-detail-list li span,
.profile-rank-detail-conclusion span {
  color: #ffffff;
  font-weight: 900;
}

.profile-rank-detail-conclusion {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 850;
  line-height: 1.75;
}


/* Profile rank detail modal + compact CAST ID only */
.profile-rank-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.profile-rank-detail-button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: 8px 14px;
  min-width: 72px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.profile-rank-detail-button:active {
  transform: translateY(1px);
}

.profile-user-facts .profile-fact-card-compact {
  min-height: 58px;
  padding: 10px 12px;
}

.profile-user-facts .profile-fact-card-compact span {
  font-size: .62rem;
}

.profile-user-facts .profile-fact-card-compact strong,
.profile-user-facts .profile-fact-card-compact [data-profile-cast-id] {
  font-size: .96rem;
  line-height: 1.05;
}

.profile-rank-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.profile-rank-detail-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-rank-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(10px);
}

.profile-rank-detail-dialog {
  position: relative;
  width: min(560px, 94vw);
  max-height: min(78vh, 720px);
  overflow: auto;
  transform: translateY(18px) scale(.98);
  transition: transform .18s ease;
  box-shadow: 0 28px 70px rgba(0,0,0,.38);
}

.profile-rank-detail-modal.is-open .profile-rank-detail-dialog {
  transform: translateY(0) scale(1);
}

.profile-rank-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.24);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.profile-rank-detail-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .profile-rank-value-row {
    gap: 10px;
  }
  .profile-rank-detail-button {
    min-width: 64px;
    padding: 7px 12px;
    font-size: .78rem;
  }
  .profile-rank-detail-dialog {
    width: min(94vw, 520px);
    max-height: 82vh;
  }
}


/* =========================
   Profile rank detail modal final correction
   - Keep the detail button on the same height as the rank value.
   - Make the button small and unobtrusive.
   - Hide any stale bottom card left by older partial patches.
========================= */
.profile-rank-main {
  position: relative;
}

.profile-rank-value-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
}

.profile-rank-value-row > strong[data-profile-current-rank] {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1 !important;
}

.profile-rank-detail-button {
  flex: 0 0 auto !important;
  align-self: center !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
  line-height: 28px !important;
  letter-spacing: 0.02em !important;
  box-shadow: none !important;
}

.profile-rank-detail-button:hover,
.profile-rank-detail-button:focus-visible {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  outline: none;
}

.profile-month-rank-detail-card {
  display: none !important;
}

.profile-rank-detail-modal {
  display: grid !important;
}

@media (max-width: 640px) {
  .profile-rank-detail-button {
    height: 26px !important;
    padding: 0 9px !important;
    font-size: 0.68rem !important;
    line-height: 26px !important;
  }
}

/* =========================
   Profile rank detail button layout hard fix
   - Rank text and detail button are separate columns.
   - Button is fixed to the right edge of the rank value row.
   - Button width is only its text width, with minimal padding.
========================= */
.profile-rank-main .profile-rank-value-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
}

.profile-rank-main .profile-rank-value-row > strong[data-profile-current-rank] {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.profile-rank-main .profile-rank-detail-button {
  justify-self: end !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 22px !important;
  padding: 0 7px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-size: 0.66rem !important;
  font-weight: 850 !important;
  line-height: 20px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .profile-rank-main .profile-rank-value-row {
    column-gap: 6px !important;
  }

  .profile-rank-main .profile-rank-detail-button {
    height: 21px !important;
    padding: 0 6px !important;
    font-size: 0.62rem !important;
    line-height: 19px !important;
  }
}


/* SMAIS profile rank detail hardfix 20260526 */
.profile-rank-main .profile-rank-value-row.smais-rank-row-fixed{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;column-gap:10px!important;width:100%!important;justify-self:stretch!important;padding:0!important;margin:0!important;}
.profile-rank-main .profile-rank-value-row.smais-rank-row-fixed>[data-profile-current-rank]{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;line-height:.96!important;margin:0!important;padding:0!important;}
.profile-rank-main .profile-rank-value-row.smais-rank-row-fixed>.profile-rank-detail-button{justify-self:end!important;align-self:center!important;width:fit-content!important;min-width:0!important;max-width:none!important;height:26px!important;padding:0 11px!important;margin:0!important;transform:translateY(2px)!important;border-radius:999px!important;font-size:12px!important;font-weight:850!important;line-height:24px!important;letter-spacing:0!important;white-space:nowrap!important;box-sizing:border-box!important;box-shadow:none!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.28)!important;color:rgba(255,255,255,.9)!important;}
.profile-month-rank-detail-card{display:none!important;}


/* Profile rank detail modal close button alignment fix */
.profile-rank-detail-dialog{
  position:relative!important;
  padding-top:42px!important;
}
.profile-rank-detail-close{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  z-index:5!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  padding:0!important;
  margin:0!important;
  border-radius:999px!important;
  line-height:1!important;
  font-size:22px!important;
  font-family:Arial, Helvetica, sans-serif!important;
  font-weight:700!important;
  text-align:center!important;
  box-sizing:border-box!important;
  transform:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

/* Dashboard PROFILE card nickname/button right-edge fixed 20260526 */
.dashboard-profile-topline-inline {
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: clamp(22px, 4vw, 34px);
}

.dashboard-profile-title-block {
  width: 100%;
  min-width: 0;
}

.dashboard-profile-nickname-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.dashboard-profile-nickname-label {
  flex: 0 0 auto;
  color: rgba(218, 184, 95, 0.92) !important;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.dashboard-profile-nickname-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #ffffff !important;
  font-size: clamp(1.5rem, 3.6vw, 2.16rem);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-profile-single-card .dashboard-profile-inline-button {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  min-height: 32px;
  padding: 7px 12px;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dashboard-profile-info-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-profile-info-row-single .dashboard-profile-info-item {
  padding-right: 0;
}

.dashboard-profile-info-row-single .dashboard-profile-info-item + .dashboard-profile-info-item {
  padding-left: 0;
  border-left: 0;
}

@media (max-width: 520px) {
  .dashboard-profile-nickname-line {
    gap: 6px;
  }
  .dashboard-profile-nickname-label {
    font-size: 1.04rem;
  }
  .dashboard-profile-nickname-value {
    font-size: 1.22rem;
  }
  .dashboard-profile-single-card .dashboard-profile-inline-button {
    margin-left: auto;
    padding: 7px 10px;
    font-size: 0.68rem;
  }
}


/* Dashboard PROFILE nickname value-only size tuning 20260526 */
.dashboard-profile-single-card .dashboard-profile-nickname-value {
  font-size: clamp(1.5rem, 3.6vw, 2.16rem) !important;
  line-height: 1.02;
}


/* =========================
   Dashboard return button visibility fix 20260526
   Only slightly emphasize dashboard-return buttons by color.
========================= */
a.cast-back-link[href$="dashboard.php"],
a.cast-back-link[href*="/dashboard.php"],
a.button.secondary[href$="dashboard.php"],
a.button.secondary[href*="/dashboard.php"] {
  color: #fff7dc !important;
  border-color: rgba(212, 175, 55, 0.72) !important;
  background: rgba(212, 175, 55, 0.18) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

a.cast-back-link[href$="dashboard.php"]:hover,
a.cast-back-link[href*="/dashboard.php"]:hover,
a.button.secondary[href$="dashboard.php"]:hover,
a.button.secondary[href*="/dashboard.php"]:hover,
a.cast-back-link[href$="dashboard.php"]:focus-visible,
a.cast-back-link[href*="/dashboard.php"]:focus-visible,
a.button.secondary[href$="dashboard.php"]:focus-visible,
a.button.secondary[href*="/dashboard.php"]:focus-visible {
  border-color: rgba(255, 218, 120, 0.92) !important;
  background: rgba(212, 175, 55, 0.26) !important;
}

/* =========================================================
   20260526 fix: dashboard rules modal true center alignment
   Keep this at the end to override older fullscreen/mobile rules.
   ========================================================= */
body.dashboard-page .rules-modal,
.rules-modal {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
  z-index: 2600 !important;
}

.rules-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
}

body.dashboard-page .rules-modal-panel,
.rules-modal-panel {
  position: relative !important;
  width: min(960px, calc(100vw - 32px)) !important;
  height: min(82dvh, 760px) !important;
  max-height: calc(100dvh - max(36px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom))) !important;
  margin: 0 !important;
  border-radius: 28px !important;
  border: 1px solid rgba(218, 184, 95, 0.34) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transform: translateY(10px) scale(0.985) !important;
}

.rules-modal.is-open .rules-modal-panel {
  transform: translateY(0) scale(1) !important;
}

body.dashboard-page .rules-modal-body,
.rules-modal-body {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: auto !important;
}

@media (max-width: 640px) {
  body.dashboard-page .rules-modal,
  .rules-modal {
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) !important;
  }

  body.dashboard-page .rules-modal-panel,
  .rules-modal-panel {
    width: calc(100vw - 24px) !important;
    height: min(84dvh, 720px) !important;
    max-height: calc(100dvh - max(28px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom))) !important;
    border-radius: 22px !important;
  }
}

.teleport-player-card.is-disabled-player {
  opacity: 0.42;
  filter: grayscale(0.75);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.12);
}

.teleport-player-card.is-disabled-player:hover,
.teleport-player-card.is-disabled-player:focus-visible {
  transform: none;
  box-shadow: none;
}

.teleport-player-badge.is-muted {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Dashboard profile flip: real card-face flip without changing original layout size. */
.dashboard-profile-flip-scene {
  perspective: 1200px;
}

.dashboard-profile-flip-card {
  cursor: pointer;
  position: relative;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform-style: preserve-3d;
  transition: transform 0.62s cubic-bezier(.2,.72,.22,1);
  transform-origin: center center;
  will-change: transform;
}

.dashboard-profile-flip-card::before {
  content: none !important;
}

.dashboard-profile-flip-card.is-flipped {
  transform: rotateY(180deg);
}

.dashboard-profile-flip-card:focus-visible {
  outline: 2px solid rgba(255, 221, 138, 0.78);
  outline-offset: 4px;
}

.dashboard-profile-flip-face {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(218, 184, 95, 0.26);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(218, 184, 95, 0.15), transparent 30%),
    radial-gradient(circle at 100% 8%, rgba(255, 255, 255, 0.055), transparent 30%),
    linear-gradient(145deg, rgba(18, 17, 15, 0.92), rgba(5, 5, 6, 0.92));
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.dashboard-profile-flip-face::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(218, 184, 95, 0.07), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 12px);
  opacity: 0.72;
}

.dashboard-profile-flip-face > * {
  position: relative;
  z-index: 1;
}

.dashboard-profile-flip-front {
  position: relative;
  transform: rotateY(0deg);
}

.dashboard-profile-flip-back {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transform: rotateY(180deg);
  pointer-events: none;
}

.dashboard-profile-flip-card.is-flipped .dashboard-profile-flip-back {
  pointer-events: auto;
}

.dashboard-profile-flip-card .dashboard-profile-mini-button {
  cursor: pointer;
}

.dashboard-profile-back-head {
  display: grid;
  gap: 6px;
}

.dashboard-profile-back-head strong {
  color: #ffffff;
  font-size: clamp(1.18rem, 3.2vw, 1.72rem);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.dashboard-profile-back-list {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(218, 184, 95, 0.22);
  border-bottom: 1px solid rgba(218, 184, 95, 0.22);
}

.dashboard-profile-back-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.dashboard-profile-back-list span {
  color: rgba(218, 184, 95, 0.78);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.10em;
}

.dashboard-profile-back-list strong {
  color: #ffffff;
  font-size: clamp(0.92rem, 2.1vw, 1.08rem);
  font-weight: 950;
  letter-spacing: 0.03em;
  text-align: right;
  white-space: nowrap;
}

.dashboard-profile-back-list small {
  display: inline-block;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 850;
}

.dashboard-profile-back-message {
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 0;
  color: #ffe7a0;
  font-size: clamp(0.94rem, 3.15vw, 1.18rem);
  line-height: 1.34;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-align: right;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-shadow: 0 0 24px rgba(218, 184, 95, 0.18);
}

.dashboard-profile-back-message br {
  display: block;
}

/* Dashboard top gap trim */
.dashboard-hero {
  padding-top: max(12px, env(safe-area-inset-top, 0px)) !important;
  padding-bottom: 8px !important;
}

.dashboard-center-image-wrap {
  min-height: 72px;
}

.dashboard-content {
  padding-top: 12px;
}

@media (max-width: 640px) {
  .dashboard-profile-back-list {
    gap: 7px;
  }

  .dashboard-profile-back-list div {
    gap: 8px;
  }

  .dashboard-profile-back-list span {
    font-size: 0.66rem;
  }

  .dashboard-profile-back-list strong {
    font-size: 0.86rem;
  }

  .dashboard-profile-back-list small {
    font-size: 0.66rem;
  }

  .dashboard-profile-back-message {
    font-size: clamp(0.88rem, 4.4vw, 1.05rem);
    line-height: 1.32;
    letter-spacing: 0.035em;
  }

  .dashboard-hero {
    padding-top: max(8px, env(safe-area-inset-top, 0px)) !important;
  }
}

/* Dashboard header mobile alignment fix
   - keep notification and hamburger controls on the same visual baseline
   - remove the extra top whitespace that appeared on mobile dashboard only */
.dashboard-notice-bell,
.dashboard-guide-menu {
  top: 22px;
}

.dashboard-hamburger {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

@media (max-width: 640px) {
  .dashboard-hero {
    padding-top: 0;
  }

  .dashboard-hero-inner {
    padding-top: 10px;
  }

  .dashboard-notice-bell,
  .dashboard-guide-menu {
    top: 14px;
  }

  .dashboard-notice-bell,
  .dashboard-hamburger {
    width: 48px;
    height: 48px;
  }

  .dashboard-hamburger {
    border-radius: 16px;
  }

  .dashboard-guide-dropdown {
    top: 58px;
  }
}

/* iPhone Safari dashboard header fix
   Android was already correct. On iPhone, safe-area padding was being applied to
   .dashboard-main and then the hero/header area added its own top offset, which
   pushed the whole dashboard down and made the bell look lower than the hamburger.
   Keep the black status-bar guard, but do not use safe-area to move dashboard content. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 640px) {
    body.dashboard-page .dashboard-main {
      padding-top: 0 !important;
    }

    body.dashboard-page .dashboard-hero {
      padding-top: 0 !important;
    }

    body.dashboard-page .dashboard-hero-inner {
      padding-top: 10px !important;
    }

    body.dashboard-page .dashboard-notice-bell,
    body.dashboard-page .dashboard-guide-menu {
      top: 14px !important;
    }

    body.dashboard-page .dashboard-notice-bell,
    body.dashboard-page .dashboard-hamburger {
      width: 48px !important;
      height: 48px !important;
    }

    body.dashboard-page .dashboard-hamburger {
      border-radius: 16px !important;
    }
  }
}

/* =========================
   20260528 dashboard iPhone header final fix
   - Do NOT pin/follow hamburger or notice bell.
   - Push dashboard body below the iPhone status-bar safe area.
   - Keep guide menu above PROFILE/card layers.
   - This block intentionally overrides the failed fixed-position attempts above.
========================= */
.dashboard-hero {
  position: relative !important;
  overflow: visible !important;
  z-index: 9000 !important;
}

.dashboard-content {
  position: relative !important;
  z-index: 1 !important;
}

.dashboard-profile-flip-card,
.dashboard-profile-section,
.dashboard-profile-single-card {
  z-index: 1 !important;
}

.dashboard-notice-bell {
  position: absolute !important;
  top: 22px !important;
  left: 22px !important;
  z-index: 9100 !important;
}

.dashboard-guide-menu {
  position: absolute !important;
  top: 28px !important;
  right: 28px !important;
  z-index: 9200 !important;
}

.dashboard-guide-dropdown {
  z-index: 9300 !important;
}

@media (max-width: 640px) {
  .dashboard-notice-bell {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    width: 48px !important;
    height: 48px !important;
  }

  .dashboard-guide-menu {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
  }

  .dashboard-hamburger {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
  }

  .dashboard-guide-dropdown {
    top: 58px !important;
    right: 0 !important;
    z-index: 9300 !important;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 640px) {
    body.dashboard-page {
      padding-top: 0 !important;
    }

    body.dashboard-page .dashboard-main {
      box-sizing: border-box !important;
      padding-top: env(safe-area-inset-top, 0px) !important;
    }

    body.dashboard-page .dashboard-hero {
      padding-top: 0 !important;
      overflow: visible !important;
      z-index: 9000 !important;
    }

    body.dashboard-page .dashboard-hero-inner {
      padding-top: 10px !important;
    }

    body.dashboard-page .dashboard-notice-bell,
    body.dashboard-page .dashboard-guide-menu {
      position: absolute !important;
    }

    body.dashboard-page .dashboard-guide-menu,
    body.dashboard-page .dashboard-guide-dropdown {
      isolation: isolate;
    }
  }
}

/* =========================
   20260528 history detail modal visibility fix
   Progress report / leave request were showing the modal close buttons as normal page content
   because the history modal had markup but no base hidden/fixed modal styling.
========================= */
.history-detail-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(0, 0, 0, 0.68) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.history-detail-modal.is-open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.history-detail-modal[aria-hidden="true"] {
  display: none !important;
}

.history-detail-modal-panel {
  position: relative !important;
  width: min(92vw, 520px) !important;
  max-height: min(78dvh, 680px) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(218, 184, 95, 0.24) !important;
  border-radius: 24px !important;
  padding: 24px 18px 18px !important;
  background: linear-gradient(160deg, rgba(28, 20, 8, 0.98), rgba(5, 4, 3, 0.98)) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58) !important;
  color: #fff8df !important;
  -webkit-overflow-scrolling: touch !important;
}

.history-detail-modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 12px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(218, 184, 95, 0.28) !important;
  border-radius: 999px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff8df !important;
  font-size: 22px !important;
  line-height: 1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.history-detail-modal-body {
  padding-top: 18px !important;
}

.history-detail-modal-button {
  width: 100% !important;
  margin-top: 18px !important;
}

body.history-modal-open {
  overflow: hidden !important;
}

/* 2026-05-28: global rubber-band guard for all cast pages */
html.smais-no-rubberband,
body.smais-no-rubberband {
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}

/* Allow popup contents to scroll while the page background stays locked. */
.notice-modal.is-open .notice-modal-body,
.admin-notice-detail-modal.is-open .admin-notice-detail-body,
.attraction-operation-modal.is-open .attraction-modal-body,
.attraction-rank-list-modal.is-open .attraction-modal-body {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.notice-modal.is-open .notice-modal-panel,
.admin-notice-detail-modal.is-open .admin-notice-detail-panel,
.attraction-operation-modal.is-open .attraction-modal-panel,
.attraction-rank-list-modal.is-open .attraction-rank-list-panel {
  min-height: 0;
}

/* =========================
   Cast list page + profile icon
   2026-05-31
========================= */
.cast-list-shell {
  width: min(1080px, calc(100vw - 28px));
}

.cast-list-page .cast-list-shell {
  position: relative;
  z-index: 1;
}

.cast-list-panel {
  overflow: hidden;
}

.cast-list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.cast-list-summary span {
  color: rgba(255, 226, 158, 0.88);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.cast-list-summary strong {
  color: #fff;
  font-size: 1.05rem;
}

.cast-list-tools {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.cast-list-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.20);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.cast-list-filter-button {
  width: 100%;
  min-height: 54px;
  margin: 0 !important;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  box-sizing: border-box;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  transform: none;
  appearance: none;
  -webkit-appearance: none;
}

.cast-list-filter-button:hover {
  transform: none;
  opacity: 1;
}

.cast-list-filter-button:last-child {
  border-right: 0;
}

.cast-list-filter-button.is-active {
  border-color: rgba(255, 226, 158, 0.42);
  background: linear-gradient(135deg, rgba(255, 226, 158, 0.24), rgba(212, 175, 55, 0.12));
  color: #fff2c6;
}

.cast-list-search-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid rgba(212, 175, 55, 0.20);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.cast-list-search-label span {
  color: rgba(255, 226, 158, 0.82);
  font-size: 0.70rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.cast-list-search {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
}

.cast-list-search::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.cast-list-search:focus {
  border-color: rgba(255, 226, 158, 0.44);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.cast-list-grid {
  display: grid;
  gap: 12px;
}

.cast-list-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(106px, auto);
  gap: 15px;
  align-items: center;
  min-height: 102px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.20);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 232, 170, 0.11), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.022));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.cast-list-card[hidden] {
  display: none !important;
}

.cast-list-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(212, 175, 55, 0.07));
  opacity: 0.75;
}

.cast-list-card.is-rank-owner {
  border-color: rgba(198, 150, 255, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(198, 150, 255, 0.18), transparent 40%),
    linear-gradient(135deg, rgba(168, 112, 255, 0.12), rgba(255, 255, 255, 0.026));
}

.cast-list-card.is-rank-admin {
  border-color: rgba(255, 142, 142, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 142, 142, 0.18), transparent 40%),
    linear-gradient(135deg, rgba(255, 102, 102, 0.12), rgba(255, 255, 255, 0.026));
}

.cast-list-card.is-rank-sub-admin {
  border-color: rgba(128, 219, 255, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(128, 219, 255, 0.18), transparent 40%),
    linear-gradient(135deg, rgba(80, 190, 255, 0.12), rgba(255, 255, 255, 0.026));
}

.cast-list-card.is-rank-owner::after {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(198, 150, 255, 0.11));
}

.cast-list-card.is-rank-admin::after {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(255, 142, 142, 0.11));
}

.cast-list-card.is-rank-sub-admin::after {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(128, 219, 255, 0.11));
}

.cast-list-card > * {
  position: relative;
  z-index: 1;
}

.cast-list-icon {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 226, 158, 0.44);
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.30), 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.cast-list-body {
  min-width: 0;
}

.cast-list-name-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cast-list-inline-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.cast-list-name-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: clamp(1rem, 4vw, 1.16rem);
  letter-spacing: 0.04em;
}

.cast-list-rank,
.cast-list-edition {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.cast-list-rank {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255, 226, 158, 0.34);
  background: rgba(212, 175, 55, 0.12);
  color: rgba(255, 235, 183, 0.96);
  font-size: 0.76rem;
}

.cast-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cast-list-gamer {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.cast-list-edition {
  min-width: 52px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.72rem;
}

.cast-list-edition-be {
  border-color: rgba(110, 203, 255, 0.32);
  background: rgba(110, 203, 255, 0.10);
}

.cast-list-edition-java {
  border-color: rgba(255, 226, 158, 0.28);
  background: rgba(212, 175, 55, 0.10);
}

.cast-list-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 5px;
  min-width: 106px;
  text-align: right;
}

.cast-list-joined-label {
  margin-top: 2px;
  color: rgba(255, 226, 158, 0.70);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.cast-list-joined {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.80rem;
  font-weight: 800;
  white-space: nowrap;
}

.cast-list-empty {
  padding: 22px;
  border: 1px dashed rgba(212, 175, 55, 0.30);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.cast-list-no-results {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .cast-list-tools {
    grid-template-columns: 1fr;
  }

  .cast-list-filter-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  .cast-list-filter-button {
    width: 100%;
    min-height: 50px;
    margin: 0 !important;
  }
}

@media (max-width: 560px) {
  .cast-list-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    align-items: center;
  }

  .cast-list-icon {
    width: 54px;
    height: 54px;
  }

  .cast-list-body {
    min-width: 0;
  }

  .cast-list-name-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .cast-list-name-line strong {
    font-size: 0.98rem;
  }

  .cast-list-inline-badges {
    gap: 5px;
  }

  .cast-list-edition {
    min-width: 42px;
    padding: 4px 7px;
    font-size: 0.66rem;
  }

  .cast-list-rank {
    padding: 4px 7px;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
  }

  .cast-list-gamer {
    max-width: 100%;
    font-size: 0.84rem;
  }

  .cast-list-side {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    text-align: left;
  }

  .cast-list-joined-label {
    margin-top: 0;
    font-size: 0.62rem;
  }

  .cast-list-joined {
    font-size: 0.73rem;
  }

  .cast-list-search-label {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.cast-icon-editor {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.cast-icon-preview {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 226, 158, 0.44);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32), 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.cast-icon-editor input[type="file"] {
  cursor: pointer;
}

@media (max-width: 640px) {
  .cast-icon-editor {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  .cast-icon-preview {
    width: 68px;
    height: 68px;
  }
}

/* =========================
   Passkey / biometric login
========================= */
.passkey-login-panel,
.passkey-profile-panel{
  margin-top:18px;
}
.passkey-login-panel{
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.18);
}
.passkey-action-button{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:999px;
  font-weight:900;
  letter-spacing:.02em;
  cursor:pointer;
}
.passkey-login-panel .passkey-action-button{
  background:linear-gradient(135deg,#f8e7ad,#d7a842,#fff2c3);
  color:#201504;
  box-shadow:0 14px 34px rgba(210,165,64,.22);
}
.passkey-action-button:disabled{
  cursor:not-allowed;
  opacity:.55;
}
.passkey-note{
  margin:10px 0 0;
  color:rgba(255,255,255,.72);
  font-size:13px;
  line-height:1.65;
}
.passkey-status{
  min-height:1.4em;
  margin:10px 0 0;
  font-size:13px;
  line-height:1.55;
  color:rgba(255,255,255,.78);
}
.passkey-status.is-error{
  color:#ffb5bd;
}
.passkey-status.is-success{
  color:#dfffcf;
}
.passkey-profile-panel .passkey-action-button{
  width:auto;
  min-width:220px;
  padding:0 24px;
}
@media (max-width:640px){
  .passkey-profile-panel .passkey-action-button{
    width:100%;
  }
}

/* =========================
   Passkey auto login fallback
========================= */
.passkey-auto-pending .login-form,
.passkey-auto-pending #firstLoginNote {
  display: none !important;
}
.passkey-auto-pending .passkey-login-panel {
  padding-top: 0;
  border-top: 0;
}
.passkey-auto-pending .passkey-login-panel .passkey-action-button,
.passkey-auto-pending .passkey-note {
  display: none !important;
}
.passkey-auto-pending .passkey-status {
  min-height: 2.4em;
  margin-top: 18px;
  text-align: center;
  font-weight: 800;
  color: rgba(255, 255, 255, .88);
}

/* 20260605 profile edit passkey relocation */
.passkey-login-panel[hidden] {
  display: none !important;
}
.profile-edit-passkey-panel {
  margin-top: 24px;
}

/* 20260605 initial setup icon + first dashboard passkey prompt */
.passkey-first-modal[hidden] {
  display: none !important;
}
.passkey-first-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
}
.passkey-first-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.passkey-first-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  border: 1px solid rgba(255, 226, 158, .34);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(31, 26, 24, .96), rgba(12, 10, 12, .96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  color: #fff;
}
.passkey-first-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 12px;
}
.passkey-first-modal-head p {
  margin: 0 0 5px;
  font-size: .72rem;
  letter-spacing: .16em;
  color: rgba(255, 226, 158, .8);
  font-weight: 900;
}
.passkey-first-modal-head h2 {
  margin: 0;
  font-size: clamp(1.28rem, 4.8vw, 1.85rem);
  line-height: 1.25;
}
.passkey-first-modal-close,
.passkey-first-skip-button {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .86);
  cursor: pointer;
}
.passkey-first-modal-close {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}
.passkey-first-modal-body {
  padding: 0 24px 24px;
}
.passkey-first-modal-body p {
  color: rgba(255, 255, 255, .78);
  line-height: 1.75;
}
.passkey-first-modal-body .passkey-action-button {
  margin-top: 14px;
}
.passkey-first-skip-button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 999px;
  font-weight: 900;
}
@media (max-width: 640px) {
  .passkey-first-modal {
    padding-left: 14px;
    padding-right: 14px;
  }
  .passkey-first-modal-head,
  .passkey-first-modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* =========================================================
   20260605 first passkey prompt: match dashboard rules modal
   ========================================================= */
body.dashboard-page .passkey-first-modal {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
  z-index: 10020 !important;
}
body.dashboard-page .passkey-first-modal[hidden] {
  display: none !important;
}
body.dashboard-page .passkey-first-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.68) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}
body.dashboard-page .passkey-first-modal-panel {
  position: relative !important;
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - max(36px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom))) !important;
  margin: 0 !important;
  border-radius: 28px !important;
  border: 1px solid rgba(218, 184, 95, 0.34) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(218, 184, 95, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(16, 15, 15, 0.98), rgba(4, 4, 5, 0.98)) !important;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transform: translateY(10px) scale(0.985) !important;
  transition: transform .18s ease !important;
}
body.dashboard-page .passkey-first-modal.is-open .passkey-first-modal-panel {
  transform: translateY(0) scale(1) !important;
}
body.dashboard-page .passkey-first-modal-head {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 24px 28px 18px !important;
  border-bottom: 1px solid rgba(218, 184, 95, 0.16) !important;
}
body.dashboard-page .passkey-first-modal-head > div {
  min-width: 0 !important;
}
body.dashboard-page .passkey-first-modal-head p {
  margin: 0 0 6px !important;
  font-size: .72rem !important;
  letter-spacing: .16em !important;
  color: rgba(218, 184, 95, .88) !important;
  font-weight: 900 !important;
}
body.dashboard-page .passkey-first-modal-head h2 {
  margin: 0 !important;
  font-size: clamp(1.28rem, 4.8vw, 1.85rem) !important;
  line-height: 1.25 !important;
}
body.dashboard-page .passkey-first-modal-close,
body.dashboard-page .passkey-first-modal-close:hover {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 84px !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(218, 184, 95, 0.34) !important;
  background: rgba(212, 175, 55, 0.16) !important;
  color: rgba(255, 255, 255, .9) !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  transform: none !important;
}
body.dashboard-page .passkey-first-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 24px 28px 32px !important;
}
body.dashboard-page .passkey-first-modal-body p {
  margin-top: 0 !important;
  color: rgba(255, 255, 255, .78) !important;
  line-height: 1.75 !important;
}
body.dashboard-page .passkey-first-modal-body .passkey-action-button {
  width: 100% !important;
  margin-top: 14px !important;
}
body.dashboard-page .passkey-first-skip-button {
  width: 100% !important;
  min-height: 46px !important;
  margin-top: 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .08) !important;
  color: rgba(255, 255, 255, .86) !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
@media (max-width: 640px) {
  body.dashboard-page .passkey-first-modal {
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) !important;
  }
  body.dashboard-page .passkey-first-modal-panel {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - max(28px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom))) !important;
    border-radius: 22px !important;
  }
  body.dashboard-page .passkey-first-modal-head {
    gap: 12px !important;
    padding: 20px 18px 16px !important;
  }
  body.dashboard-page .passkey-first-modal-body {
    padding: 20px 18px 24px !important;
  }
  body.dashboard-page .passkey-first-modal-close,
  body.dashboard-page .passkey-first-modal-close:hover {
    min-width: 72px !important;
    padding: 9px 14px !important;
  }
}
/*
 * Non-admin gold magic button/card effect.
 * Lightweight CSS animation; no network assets.
 */
body:not(.admin-page) button,
body:not(.admin-page) .dashboard-card,
body:not(.admin-page) .cast-primary-button,
body:not(.admin-page) .cast-back-link,
body:not(.admin-page) .dashboard-card-button,
body:not(.admin-page) .dashboard-profile-mini-button,
body:not(.admin-page) .dashboard-logout,
body:not(.admin-page) a[class*="button"] {
  position: relative;
  overflow: hidden;
}

body:not(.admin-page) .smais-gold-magic-burst {
  position: absolute;
  inset: -35%;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,.95) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 18%, rgba(255,244,180,.95) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 72%, rgba(255,210,70,.95) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 78%, rgba(255,255,255,.9) 0 1.5px, transparent 2.5px),
    linear-gradient(115deg, transparent 20%, rgba(255,236,120,.92) 42%, rgba(255,255,255,.96) 50%, rgba(255,193,7,.9) 58%, transparent 78%);
  filter: drop-shadow(0 0 8px rgba(255, 210, 64, .85));
  transform: translateX(-70%) rotate(8deg) scale(.9);
  opacity: 0;
  animation: smaisGoldMagicSweep .72s ease-out forwards;
}

body:not(.admin-page) .smais-gold-magic-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  pointer-events: none;
  border: 2px solid rgba(255, 218, 80, .9);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 218, 80, .85), inset 0 0 8px rgba(255, 255, 255, .8);
  transform: translate(-50%, -50%) scale(.4);
  opacity: .9;
  animation: smaisGoldMagicRing .62s ease-out forwards;
}

body:not(.admin-page) .smais-gold-magic-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  pointer-events: none;
  border-radius: 50%;
  background: #fff4a8;
  box-shadow: 0 0 8px #ffd84a, 0 0 14px rgba(255,255,255,.8);
  transform: translate(-50%, -50%) scale(.7);
  animation: smaisGoldMagicSpark .7s ease-out forwards;
}

@keyframes smaisGoldMagicSweep {
  0% { opacity: 0; transform: translateX(-80%) rotate(8deg) scale(.9); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(80%) rotate(8deg) scale(1.05); }
}

@keyframes smaisGoldMagicRing {
  0% { opacity: .95; transform: translate(-50%, -50%) scale(.25); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(5.2); }
}

@keyframes smaisGoldMagicSpark {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.7); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, -18px))) scale(.05); }
}

/* Non-admin subtle rising stars while scrolling */
body:not(.admin-page) .smais-scroll-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity .45s ease;
}

body:not(.admin-page) .smais-scroll-stars.is-active {
  opacity: .7;
}

body:not(.admin-page) .smais-scroll-star {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 72vh);
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 999px;
  background: rgba(255, 235, 150, .9);
  box-shadow: 0 0 8px rgba(255, 219, 86, .55), 0 0 14px rgba(255,255,255,.28);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(.7);
  animation: smaisScrollStarRise var(--duration, 4.8s) linear forwards;
  will-change: transform, opacity;
}

body:not(.admin-page) .smais-scroll-star.is-fading {
  animation: none !important;
  transition: opacity .3s ease-out, transform .3s ease-out;
  opacity: 0 !important;
  transform: translate3d(var(--fade-x, 0px), var(--fade-y, 0px), 0) scale(.45) !important;
}

.dashboard-main,
.dashboard-hero,
.dashboard-content {
  position: relative;
  z-index: 1;
}

@keyframes smaisScrollStarRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(.55);
  }
  12% {
    opacity: var(--peak-opacity, .72);
  }
  78% {
    opacity: calc(var(--peak-opacity, .72) * .65);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), var(--rise, -48vh), 0) scale(var(--end-scale, 1));
  }
}

@keyframes smaisScrollStarFade {
  0% {
    opacity: .62;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), calc(var(--rise, -48vh) * .18), 0) scale(.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.admin-page) .smais-gold-magic-burst,
  body:not(.admin-page) .smais-gold-magic-ring,
  body:not(.admin-page) .smais-gold-magic-spark,
  body:not(.admin-page) .smais-scroll-stars,
  body:not(.admin-page) .smais-scroll-star {
    animation: none;
    display: none;
  }
}
