.love-app-shell {
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 12px 10px 92px;
}

.love-shell-header {
  position: sticky;
  top: 0;
  z-index: 850;
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid rgba(236, 214, 224, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(203, 153, 177, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.love-shell-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.love-shell-title {
  color: #3f4350;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.love-shell-nav {
  max-width: 1100px;
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.love-shell-nav a,
.love-shell-nav .love-shell-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #bd5b84;
  background: rgba(255, 241, 247, 0.78);
  border: 1px solid rgba(244, 127, 179, 0.14);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.love-shell-nav a.is-active {
  color: #fff;
  background: linear-gradient(135deg, #f47fb3, #f9abc7);
  box-shadow: 0 10px 22px rgba(244, 127, 179, 0.2);
}

.love-app-view {
  max-width: 1100px;
  margin: 0 auto;
}

body.love-shell-mode #loveAppView .legacy-site-header {
  display: none !important;
}

.love-shell-loading,
.love-shell-error {
  margin: 24px auto;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(236, 214, 224, 0.9);
  color: #7a5268;
  text-align: center;
  line-height: 1.7;
  box-shadow: 0 14px 30px rgba(203, 153, 177, 0.1);
}

.love-shell-error button {
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f47fb3, #f9abc7);
  color: #fff;
  font-weight: 800;
}

.love-shell-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 12000;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(45, 37, 43, 0.88);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.love-shell-mode #bgmToggle {
  z-index: 12550;
}

body.love-shell-locked #bgmToggle {
  display: none;
}

body.love-shell-mode .home-page {
  padding-top: 0;
}

.love-shell-lock {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 210, 228, 0.45), transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(255, 220, 235, 0.38), transparent 25%),
    linear-gradient(180deg, rgba(255,249,251,0.98), rgba(253,243,247,0.98));
}

.love-shell-lock-card {
  width: 100%;
  max-width: 460px;
  padding: 32px 28px;
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(236,214,224,0.9);
  box-shadow: 0 18px 40px rgba(203,153,177,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.love-shell-lock-title {
  color: #3f4350;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.love-shell-lock-subtitle {
  margin-top: 10px;
  color: #7a7f8f;
  font-size: 15px;
  text-align: center;
}

.love-shell-lock-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,242,246,0.95);
  border: 1px solid rgba(196,93,135,0.18);
  color: #c45d87;
  font-size: 14px;
}

.love-shell-lock-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.love-shell-lock-form input {
  width: 100%;
  border: 1px solid rgba(228,215,221,0.95);
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: #3f4350;
  font-size: 15px;
}

.love-shell-lock-form input:focus {
  border-color: rgba(244, 127, 179, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 127, 179, 0.13);
}

.love-shell-lock-form button {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f47fb3, #f9abc7);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.love-shell-dialog {
  position: fixed;
  inset: 0;
  z-index: 12880;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.love-shell-dialog.is-open {
  display: flex;
}

.love-shell-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 30, 0.48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.love-shell-dialog-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 390px);
  border-radius: 24px;
  padding: 20px 18px 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(236, 214, 224, 0.92);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.20);
  color: #3f4350;
}

.love-shell-dialog-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.love-shell-dialog-message {
  margin-top: 10px;
  color: #666d7c;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.love-shell-dialog-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  border: 1px solid rgba(228, 215, 221, 0.96);
  border-radius: 16px;
  padding: 12px 13px;
  color: #3f4350;
  background: rgba(255, 255, 255, 0.96);
  outline: none;
  font-size: 15px;
}

.love-shell-dialog-input:focus {
  border-color: rgba(244, 127, 179, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 127, 179, 0.13);
}

.love-shell-dialog-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.love-shell-dialog-button {
  flex: 1 1 0;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.love-shell-dialog-cancel {
  color: #7a5268;
  background: rgba(255, 241, 247, 0.95);
  border: 1px solid rgba(244, 127, 179, 0.12);
}

.love-shell-dialog-confirm {
  color: #fff;
  background: linear-gradient(135deg, #f47fb3, #f9abc7);
  box-shadow: 0 10px 22px rgba(244, 127, 179, 0.18);
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .love-app-shell {
    padding: 8px 6px calc(118px + env(safe-area-inset-bottom));
  }

  .love-shell-header {
    top: 6px;
    margin: 0 0 10px;
    padding: 10px 10px 9px;
    border-radius: 18px;
  }

  .love-shell-title {
    font-size: 20px;
    line-height: 1.12;
  }

  .love-app-shell > .love-shell-nav {
    position: fixed;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 12600;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 7px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(236, 214, 224, 0.94);
    box-shadow: 0 16px 38px rgba(203, 153, 177, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .love-app-shell > .love-shell-nav a,
  .love-app-shell > .love-shell-nav .love-shell-exit {
    min-width: 0;
    min-height: 42px;
    padding: 7px 2px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  body.love-shell-mode #bgmToggle {
    right: 14px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 12550;
  }

  .love-shell-toast {
    bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .love-shell-dialog-card {
    width: 100%;
    border-radius: 22px;
  }

  .love-shell-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
