.cancel-lock-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px dashed rgba(185, 28, 28, 0.45);
  background: #fff5f5;
  padding: 14px 18px;
  border-radius: 14px;
  color: #7f1d1d;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(185, 28, 28, 0.1);
}
.cancel-lock-warning__icon {
  font-size: 1.4rem;
  line-height: 1;
}
.cancel-lock-warning strong {
  font-size: 0.95rem;
}
.cancel-lock-warning p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: inherit;
  line-height: 1.5;
}
.user-navbar-profile {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
}

.user-navbar-actions .user-navbar-profile {
  position: static;
  transform: none;
}

.user-icon-button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-icon-button:focus-visible {
  outline: 3px solid rgba(22, 74, 154, 0.35);
  outline-offset: 3px;
}

.user-icon-button:hover {
  transform: translateY(-1px);
}

.user-icon {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  color: #1f3f75;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nickname-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.nickname-modal.active {
  display: flex;
}

.nickname-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
}

.nickname-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px 32px;
  max-width: 360px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 48px rgba(13, 54, 106, 0.22);
  z-index: 1;
}

.nickname-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #5a6c88;
  cursor: pointer;
}

.nickname-modal__title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #164a9a;
  margin-bottom: 12px;
  text-align: center;
}

.nickname-modal__subtitle {
  font-size: 0.95rem;
  color: #4a4a4a;
  text-align: center;
  margin-bottom: 20px;
  white-space: pre-line;
}

.nickname-modal__form label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: #164a9a;
}

.nickname-modal__form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(22, 74, 154, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nickname-modal__form input:focus {
  border-color: #164a9a;
  box-shadow: 0 0 0 3px rgba(22, 74, 154, 0.15);
  outline: none;
}

.nickname-modal__hint {
  font-size: 0.8rem;
  color: #7a7a7a;
  margin-top: 6px;
}

.nickname-modal__error {
  color: #d43c3c;
  font-size: 0.85rem;
  min-height: 20px;
  margin-top: 8px;
}

.nickname-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.nickname-modal__actions button {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
}

.nickname-modal__cancel {
  border: 1px solid rgba(22, 74, 154, 0.3);
  background: #fff;
  color: #164a9a;
}

.user-navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  justify-content: flex-end;
}

.user-navbar-actions .hamburger-menu {
  position: static;
}

.user-container .hamburger-menu {
  width: 36px;
  height: 36px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 101;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-container .hamburger-menu:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.user-container .hamburger-menu span {
  width: 18px;
  height: 2px;
  background: #1f3f75;
  border-radius: 999px;
  transition: 0.3s;
}

.user-container .dropdown-menu {
  position: absolute;
  right: 0;
  top: 56px;
  z-index: 102;
  width: min(300px, calc(100vw - 24px));
  display: none;
}

.user-container .dropdown-menu.is-open {
  display: block;
}

.user-container .dropdown-menu__card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 16px;
}

.dropdown-menu .menu-section + .menu-section {
  margin-top: 16px;
}

.dropdown-menu .menu-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.dropdown-menu .menu-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-menu .menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.dropdown-menu .menu-item:hover {
  background: #f8fafc;
}

.dropdown-menu .menu-item__accent {
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: transparent;
  transition: background 0.15s ease;
}

.dropdown-menu .menu-item.active-menu-item {
  background: #eff6ff;
  font-weight: 500;
}

.dropdown-menu .menu-item.active-menu-item .menu-item__accent {
  background: #3b82f6;
}

.dropdown-menu .menu-item.active-menu-item:hover {
  background: #eff6ff;
}

.dropdown-menu .menu-item.locked-menu-item {
  color: #9ca3af;
  background: #f8fafc;
  cursor: not-allowed;
  pointer-events: none;
}

.dropdown-menu .menu-item__lock {
  font-size: 0.9rem;
  margin-right: 4px;
}

.dropdown-menu .menu-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 12px 0;
}

@media (max-width: 600px) {
  .user-container .dropdown-menu {
    width: min(320px, calc(100vw - 20px));
    right: 10px;
  }
}

.notification-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f6fb;
  color: #1f3f75;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(31, 64, 117, 0.12);
  transition: transform 0.1s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.notification-indicator .count-badge {
  background: #facc15;
  color: #1f2937;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.notification-indicator .count-badge.is-muted {
  background: #e5e7eb;
  color: #94a3b8;
  font-weight: 600;
}

.notification-indicator.is-empty {
  background: #f8fafc;
  color: #64748b;
  box-shadow: none;
}

.notification-indicator.is-empty .count-badge {
  background: #e5e7eb;
  color: #94a3b8;
}

.notification-indicator:active {
  transform: scale(0.97);
}

.notification-icon {
  font-size: 1rem;
  color: #1d3a66;
}

.nickname-modal__save {
  border: none;
  background: #2366b8;
  color: #fff;
}

@media (max-width: 768px) {
  .user-navbar-profile {
    right: 56px;
    transform: translateY(-45%);
  }
}

@media (max-width: 480px) {
  .user-navbar-profile {
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: 60px;
  }

  .user-navbar-actions .user-navbar-profile {
    margin-right: 0;
  }
}

/* 共通カードスタイル（設定画面用） */
.settings-page {
  background: #F5F7FA;
  min-height: 100vh;
  padding: 32px 16px 72px;
}

.settings-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.settings-page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 24px;
  margin-bottom: 24px;
}

.settings-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.05);
  margin-bottom: 24px;
}

.settings-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 12px;
}

.settings-card__subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 18px;
  line-height: 1.5;
}

.settings-form-group {
  margin-bottom: 20px;
}

.settings-form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 8px;
}

.settings-form-group input[type="text"],
.settings-form-group input[type="number"],
.settings-form-group select {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-form-group input:focus,
.settings-form-group select:focus {
  outline: none;
  border-color: #2366b8;
  box-shadow: 0 0 0 3px rgba(35, 102, 184, 0.1);
}

.settings-form-group .form-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 6px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.settings-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-checkbox-item:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.2);
}

.settings-checkbox-item.disabled {
  background: #f1f5f9;
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-checkbox-item input[type="checkbox"],
.settings-checkbox-item input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.settings-checkbox-item label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  margin: 0;
}

.settings-checkbox-item.disabled label {
  cursor: not-allowed;
  color: #94a3b8;
}

/* ユーザー通知フォーム共通レイアウト */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-section__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

.form-section__subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

.form-grid,
.form-columns {
  display: grid;
  gap: 24px 32px;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-columns {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.form-row__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.form-row__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.labeled-input,
.range-input input,
.range-input select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 44px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.labeled-input:focus,
.range-input input:focus,
.range-input select:focus {
  border-color: #2366b8;
  box-shadow: 0 0 0 3px rgba(35, 102, 184, 0.12);
  outline: none;
}

.labeled-input:disabled,
.range-input input:disabled,
.range-input select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.6);
  cursor: not-allowed;
}

.input-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.range-input {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.range-input__divider {
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.unit-label {
  min-width: 48px;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.checkbox-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row--checkboxes .checkbox-stack {
  margin-top: 2px;
}

.checkbox-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #f8fafc;
  min-height: 44px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  flex: 1 1 160px;
}

.checkbox-control input {
  width: 18px;
  height: 18px;
  accent-color: #2366b8;
}

.checkbox-control span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
}

.checkbox-control input:checked + span {
  color: #1d4ed8;
  font-weight: 600;
}

.form-helper-text {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
}

.settings-button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 32px;
  margin-bottom: 40px;
}

.settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  min-width: 180px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.settings-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.settings-button--primary {
  background: #2366b8;
  color: #fff;
  border-color: #2366b8;
  box-shadow: 0 4px 12px rgba(35, 102, 184, 0.25);
}

.settings-button--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(35, 102, 184, 0.3);
}

.settings-button--secondary {
  background: #fff;
  color: #2366b8;
  border-color: #2366b8;
}

.settings-button--secondary:hover:not(:disabled) {
  background: #eff6ff;
  color: #1f4b99;
}

.settings-button--danger {
  background: #fff5f5;
  color: #b91c1c;
  border-color: #f87171;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.15);
}

.settings-button--danger:hover:not(:disabled) {
  background: #fee2e2;
  color: #991b1b;
}

.settings-button--line {
  background: #06C755;
  color: #fff;
  border-color: #06C755;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
}

.settings-button--line:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.3);
  background: #05b348;
}

@media (max-width: 768px) {
  .settings-page {
    padding: 16px 8px 48px;
  }
  
  .settings-container {
    max-width: 100%;
  }
  
  .settings-card {
    padding: 20px 16px;
    margin-bottom: 20px;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-form-group input[type="text"],
  .settings-form-group input[type="number"],
  .settings-form-group select {
    max-width: 100%;
  }
  
  .settings-button-group {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .settings-button-group form {
    width: 100%;
    max-width: 400px;
  }

  .settings-button {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    box-sizing: border-box;
  }

  .form-grid,
  .form-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-column {
    gap: 20px;
  }

  .form-section {
    gap: 20px;
  }

  .form-row {
    gap: 6px;
  }

  .labeled-input,
  .range-input input,
  .range-input select {
    padding: 10px 12px;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .range-input {
    grid-template-columns: 1fr 24px 1fr auto;
    gap: 8px;
    width: 100%;
  }

  .range-input__divider {
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 24px;
    flex-shrink: 0;
  }

  .unit-label {
    min-width: auto;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 4px;
  }

  .input-with-unit {
    gap: 8px;
  }

  .input-with-unit .unit-label {
    min-width: 36px;
  }

  .checkbox-control {
    flex: 1 1 100%;
    padding: 10px 12px;
    min-height: 44px;
  }

  .form-helper-text {
    font-size: 0.8rem;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .settings-card {
    padding: 16px 12px;
  }

  .form-section {
    gap: 18px;
  }

  .form-row {
    gap: 6px;
  }

  .labeled-input,
  .range-input input,
  .range-input select {
    padding: 10px;
    font-size: 0.875rem;
    min-height: 44px;
  }

  .range-input {
    grid-template-columns: 1fr 20px 1fr auto;
    gap: 6px;
  }

  .range-input__divider {
    font-size: 0.8rem;
    min-width: 20px;
  }

  .unit-label {
    font-size: 0.8rem;
    padding-left: 2px;
  }

  .input-with-unit .unit-label {
    min-width: 32px;
  }

  .form-row__label {
    font-size: 0.85rem;
  }

  .form-section__title {
    font-size: 1rem;
  }

  .form-section__subtitle {
    font-size: 0.85rem;
  }
}

