/* 创建班级 / 选择座位 弹窗：竖向布局，适配电脑与手机 */
.dialog-create-class,
.dialog-choose-seat {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(92vw, 560px);
  width: min(92vw, 560px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}

.dialog-create-class::backdrop,
.dialog-choose-seat::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-create-class .dialog-title,
.dialog-choose-seat .dialog-title {
  margin: 0;
  padding: 20px 20px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.form-create-class {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
}

.form-create-class .form-label {
  margin-top: 14px;
  margin-bottom: 6px;
}

.form-create-class .form-label:first-of-type {
  margin-top: 0;
}

.form-label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-label:first-of-type {
  margin-top: 0;
}

.form-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  margin-top: 2px;
}

.form-label-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 4px;
  cursor: pointer;
  font-weight: 500;
}

.form-label-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.teacher-label-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 6px;
}

.teacher-label-prefix {
  flex-shrink: 0;
  padding: 12px 0 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: #f9fafb;
}

.teacher-label-row .form-input {
  border-radius: 0 8px 8px 0;
  flex: 1;
  min-width: 0;
}

.form-select,
.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.form-select:disabled,
.form-input:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

@media (max-width: 480px) {
  .dialog-create-class,
  .dialog-choose-seat {
    width: min(92vw, 100%);
    max-height: 90vh;
  }
  .form-create-class {
    padding: 0 16px 16px;
  }
  .form-select,
  .form-input {
    padding: 10px 12px;
    font-size: 16px;
  }
}

.form-input-num {
  width: 80px;
  display: inline-block;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-inline span {
  font-size: 14px;
  color: #374151;
}

.btn-inline {
  flex-shrink: 0;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.join-search-results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-search-item {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
}

.join-search-item:hover {
  background: #f3f4f6;
  border-color: #bbf7d0;
}

.join-search-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.join-search-item-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.join-selected-class {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
  display: none;
}

@media (max-width: 480px) {
  .btn-inline {
    padding: 10px 12px;
    font-size: 14px;
  }
}

.messages-list {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.dialog-messages {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}

.dialog-messages .dialog-title {
  padding-right: 52px;
  font-size: 20px;
}
.dialog-messages .btn-dialog-x {
  min-width: 96px;
  height: 48px;
  font-size: 17px;
  padding: 0 22px;
  line-height: 46px;
  top: 8px;
  right: 12px;
}

.dialog-messages .dialog-desc {
  font-size: 14px;
  line-height: 1.35;
  margin-top: -6px;
}

.dialog-messages:not([open]) {
  display: none !important;
}

.dialog-desc-cleanup {
  color: #c00;
  font-weight: 600;
}

.btn-dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: auto;
  min-width: 56px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(234, 88, 12, 0.55);
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 34px;
  padding: 0 12px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-dialog-x:hover {
  filter: brightness(1.02);
}

.dialog-how-to-play {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
  position: relative;
}

.dialog-how-to-play:not([open]) {
  display: none !important;
}

.dialog-how-to-play .dialog-title {
  padding-right: 52px;
  font-size: 20px;
}

.dialog-how-to-play::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 账号与切换弹窗 */
.dialog-account .account-current { font-weight: 600; margin: 0 0 12px 0; color: #1f2937; }
.dialog-account .account-hint { margin: 0 0 8px 0; font-size: 14px; color: #6b7280; }
.dialog-account .account-switch-list { list-style: none; padding: 0; margin: 0 0 16px 0; max-height: 200px; overflow-y: auto; }
.dialog-account .account-switch-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 6px; background: #f3f4f6; border-radius: 10px; gap: 10px; }
.dialog-account .account-switch-list li .account-label { flex: 1; font-size: 14px; color: #374151; }
.dialog-account .account-switch-list li button { flex-shrink: 0; padding: 6px 14px; border-radius: 8px; border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 13px; cursor: pointer; }
.dialog-account .account-switch-list li button:hover { background: #f9fafb; }
.dialog-account .account-actions { margin-top: 12px; }
.dialog-account .account-actions .btn-primary { padding: 10px 20px; border-radius: 10px; border: 1px solid rgba(234, 88, 12, 0.55); background: linear-gradient(180deg, #fb923c 0%, #f97316 100%); color: #fff; font-weight: 600; cursor: pointer; }
.dialog-account .account-actions .btn-primary:hover { filter: brightness(1.05); }
.dialog-account::backdrop { background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.dialog-how-to-play .btn-dialog-x {
  min-width: 88px;
  height: 44px;
  font-size: 16px;
  padding: 0 20px;
  line-height: 42px;
  top: 8px;
  right: 12px;
}

.dialog-how-to-play[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}

.how-to-play-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.how-to-play-section {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.how-to-play-section:last-child {
  margin-bottom: 0;
}

.dialog-my-bag {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}

.dialog-my-bag:not([open]) {
  display: none !important;
}

.dialog-my-bag .dialog-title {
  padding-right: 52px;
  padding-top: 8px;
  padding-bottom: 4px;
  font-size: 18px;
  text-align: center;
  flex-shrink: 0;
}

.dialog-my-bag .btn-dialog-x {
  min-width: 88px;
  height: 44px;
  font-size: 16px;
  padding: 0 20px;
  line-height: 42px;
  top: 8px;
  right: 12px;
}

.my-bag-content {
  padding: 0 16px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.my-bag-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
}

.my-bag-section-title:first-child {
  margin-top: 0;
}

.my-bag-section-icon {
  font-size: 18px;
  line-height: 1;
}

.my-bag-section-checkin {
  margin-top: 2px;
  margin-bottom: 6px;
}

.my-bag-section-honor {
  margin-bottom: 6px;
}

.my-bag-section-rules {
  margin-top: 2px;
  margin-bottom: 6px;
}

.my-bag-separator {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.my-bag-checkin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.my-bag-checkin-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.my-bag-checkin-rule {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
}

.btn-checkin {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.btn-checkin:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-checkin:disabled,
.btn-checkin.checkin-disabled {
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: not-allowed;
}

.my-bag-today-count {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  line-height: 1.25;
}

.my-bag-rules {
  margin: 0;
  padding: 10px 12px 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.my-bag-rules li {
  margin-bottom: 4px;
}

.my-bag-rules li:last-child {
  margin-bottom: 0;
}

.my-bag-honor-row {
  margin: 0 0 6px;
  font-size: 13px;
  color: #374151;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 6px 10px;
  background: #fefce8;
  border-radius: 10px;
  border: 1px solid #fef08a;
}

.my-bag-honor-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.my-bag-note-master-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.my-bag-note-master-logo {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
}

.my-bag-honor-counts {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  align-self: center;
}
.my-bag-note-master-count-wrap {
  font-weight: 700;
  font-size: 18px;
  color: #1f2937;
}
.my-bag-honor-progress {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

.my-bag-note-master-text {
  color: #dc2626;
  font-weight: 600;
  font-size: 14px;
}
.my-bag-attack-master-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.message-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.message-item.is-read {
  opacity: 0.55;
  filter: grayscale(0.15);
}

.message-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.message-meta {
  margin-top: 4px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.3;
}

.message-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.message-actions .btn-msg-delete {
  margin-left: auto;
}

.btn-msg-read {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
}

.btn-msg-read:disabled {
  cursor: default;
  opacity: 0.7;
}

.btn-msg-delete {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fef2f2;
  color: #b91c1c;
}

.btn-msg-delete:hover {
  background: #fee2e2;
  color: #991b1b;
}

.dialog-actions {
  margin-top: 20px;
}

.dialog-actions-two {
  display: flex;
  gap: 12px;
}

.dialog-actions-two .btn-dialog-cancel,
.dialog-actions-two .btn-dialog-confirm {
  flex: 1;
  min-width: 0;
}

.dialog-actions-gossip-continue {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dialog-actions-gossip-continue .btn-dialog-cancel,
.dialog-actions-gossip-continue .btn-dialog-confirm,
.dialog-actions-gossip-continue .btn-join-reject {
  flex: 1;
  min-width: 0;
}

.btn-dialog-cancel {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  cursor: pointer;
}

.btn-dialog-cancel:hover {
  background: #e5e7eb;
}

.btn-dialog-confirm {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: auto;
}

.dialog-actions:not(.dialog-actions-two) .btn-dialog-confirm {
  width: 100%;
}

.btn-dialog-confirm:hover:not(:disabled) {
  opacity: 0.95;
}

.btn-dialog-confirm:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.dialog-desc {
  margin: 0 20px 12px;
  font-size: 13px;
  color: #6b7280;
}

.seat-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 0 20px;
  margin-bottom: 16px;
}

.seat-picker-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.seat-picker-cell {
  width: 36px;
  height: 28px;
  padding: 0;
  font-size: 11px;
  color: #374151;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.seat-picker-cell:hover {
  background: #e5e7eb;
  border-color: #2e7d32;
}

.seat-picker-cell.selected {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.seat-picker-cell.taken {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  cursor: not-allowed;
}

/* 待确认加入申请 */
.join-requests-section {
  padding: 12px 16px;
  background: #f0fdf4;
  border-top: 1px solid #bbf7d0;
}

.join-requests-section.is-hidden {
  display: none;
}

.join-requests-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #166534;
}

.join-requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-request-item {
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.join-request-name {
  display: block;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.join-request-submit-to {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.join-request-reason {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.join-request-actions {
  display: flex;
  gap: 8px;
}

.btn-join-approve {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  background: #22c55e;
  border: none;
}

.btn-join-approve:hover {
  background: #16a34a;
}

.btn-join-reject {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}

.btn-join-reject:hover {
  background: #e5e7eb;
}

.seat-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 2px;
  min-height: 0;
  overflow: visible;
}

.seat-name {
  font-size: 12px;
  line-height: 1.25;
  color: #374151;
  text-align: center;
  word-break: break-all;
  white-space: normal;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 座位头像（有外号时略小，与下方名字同显） */
.seat-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}

/* 头像选择弹窗 */
.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px 16px;
  max-height: 260px;
  overflow-y: auto;
}

.avatar-option {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.avatar-option img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #f0f0f0;
}

.avatar-option.selected {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
  background: #ecfdf5;
}

.avatar-option-upload .avatar-upload-placeholder {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

.dialog-desc-inline {
  margin-top: 0;
  margin-bottom: 8px;
}

/* 递纸条弹窗：橙色标题居中，取消左下/确认右下，自定义背景模糊（时钟不模糊由 JS 实现），尺寸加大且不超手机一屏，上边距保证时钟露出 */
.dialog-pass-note {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}

.dialog-pass-note:not([open]) {
  display: none !important;
}

.dialog-pass-note::backdrop {
  background: transparent;
}

.dialog-pass-note[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}

.dialog-title-pass-note {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  flex-shrink: 0;
}

.pass-note-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pass-note-content::-webkit-scrollbar {
  display: none;
}

.pass-note-rules-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
}

.pass-note-rules {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.pass-note-rules li {
  margin-bottom: 6px;
}

.pass-note-rules li:last-child {
  margin-bottom: 0;
}

.pass-note-separator {
  margin: 14px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.pass-note-content .form-label {
  margin-top: 0;
  margin-bottom: 6px;
  color: #2563eb;
  font-weight: 600;
}

.pass-note-content .form-textarea {
  margin-bottom: 16px;
}

.pass-note-reference-label {
  margin-top: 0;
  margin-bottom: 6px;
  color: #2563eb;
  font-weight: 600;
}

.pass-note-reference-select {
  font-size: 17px;
  padding: 14px 16px;
  min-height: 52px;
  margin-bottom: 12px;
}

@media (min-width: 481px) {
  .pass-note-reference-select {
    font-size: 16px;
  }
}

.pass-note-receiver-label {
  margin-top: 12px;
  margin-bottom: 6px;
  color: #2563eb;
  font-weight: 600;
}

.pass-note-receiver-select {
  font-size: 16px;
  padding: 12px 14px;
  min-height: 48px;
}

@media (min-width: 481px) {
  .pass-note-receiver-select {
    font-size: 15px;
  }
}

.pass-note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.pass-note-actions .btn-dialog-cancel {
  margin-right: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}

.pass-note-actions .btn-dialog-confirm {
  margin-left: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}

/* 自定义模糊遮罩（不覆盖时钟）：由 JS 插入 4 块拼接 */
.pass-note-blur-overlay {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 9998;
}

.pass-note-blur-overlay .pass-note-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 邻桌物理攻击弹窗：尺寸与递纸条弹窗一致 */
.dialog-neighbor-attack {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}

.dialog-neighbor-attack:not([open]) {
  display: none !important;
}

.dialog-neighbor-attack::backdrop {
  background: transparent;
}

.dialog-neighbor-attack[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}

.dialog-title-neighbor-attack {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  flex-shrink: 0;
}

.neighbor-attack-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.neighbor-attack-rules-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #2563eb; }
.neighbor-attack-rules { margin: 0 0 12px; padding-left: 22px; font-size: 13px; line-height: 1.6; color: #374151; }
.neighbor-attack-rules li { margin-bottom: 6px; }
.neighbor-attack-separator { margin: 14px 0; border: none; border-top: 1px solid #e5e7eb; }
.neighbor-attack-type-label { margin-top: 0; margin-bottom: 8px; color: #2563eb; font-weight: 600; }
.neighbor-attack-types { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.neighbor-attack-type-option { display: inline-flex; cursor: pointer; }
.neighbor-attack-type-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.neighbor-attack-type-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.neighbor-attack-type-option:hover .neighbor-attack-type-box { border-color: #f97316; background: #fff7ed; }
.neighbor-attack-type-radio:checked + .neighbor-attack-type-box {
  border-color: #f97316; background: #ffedd5; box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}
.neighbor-attack-type-icon { flex-shrink: 0; width: 64px; height: 64px; }
.neighbor-attack-target-label { margin-top: 0; margin-bottom: 6px; color: #2563eb; font-weight: 600; }
.neighbor-attack-target-select { font-size: 16px; padding: 12px 14px; min-height: 48px; margin-bottom: 12px; }
.neighbor-attack-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.neighbor-attack-actions .btn-dialog-cancel { margin-right: auto; min-width: 120px; padding-left: 28px; padding-right: 28px; }
.neighbor-attack-actions .btn-dialog-confirm { margin-left: auto; min-width: 120px; padding-left: 28px; padding-right: 28px; }
.neighbor-attack-blur-overlay {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 9998;
}
.neighbor-attack-blur-overlay .neighbor-attack-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 送礼物弹窗：尺寸与格式参考心里话与心中歌 */
.dialog-gift {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-gift:not([open]) { display: none !important; }
.dialog-gift::backdrop { background: transparent; }
.dialog-gift[open] { z-index: 9999; margin-top: max(8vh, 90px); }
.dialog-title-gift {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  flex-shrink: 0;
}
.gift-content {
  padding: 12px 18px 16px;
}
.gift-target-label {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.gift-target-select { font-size: 15px; padding: 10px 12px; min-height: 44px; margin-bottom: 10px; }
.gift-type-label {
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.gift-types { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.gift-type-option { display: inline-flex; cursor: pointer; }
.gift-type-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.gift-type-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #374151;
  min-width: 96px;
}
.gift-type-box .gift-type-icon { font-size: 32px; }
.gift-type-box .gift-type-name { font-weight: 700; font-size: 15px; }
.gift-type-box .gift-type-slogan { font-size: 13px; color: #2563eb; }
.gift-type-box .gift-type-price { font-size: 13px; font-weight: 700; color: #f97316; }
.gift-type-option:hover .gift-type-box { border-color: #f97316; background: #fff7ed; }
.gift-type-radio:checked + .gift-type-box {
  border-color: #f97316; background: #ffedd5; box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}
.gift-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.gift-actions .btn-dialog-cancel,
.gift-actions .btn-dialog-confirm {
  min-width: 140px;
  padding-left: 32px;
  padding-right: 32px;
}
.gift-blur-overlay { position: fixed; inset: 0; pointer-events: auto; z-index: 9998; }
.gift-blur-overlay .gift-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 时光币交易所弹窗：尺寸与格式参考写情书 */
.dialog-coins-exchange {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  position: relative;
}
.dialog-coins-exchange:not([open]) { display: none !important; }
.dialog-coins-exchange::backdrop { background: transparent; }
.dialog-coins-exchange[open] { z-index: 9999; }
.dialog-coins-exchange .btn-dialog-x {
  min-width: 88px;
  height: 44px;
  font-size: 16px;
  padding: 0 20px;
  line-height: 42px;
  top: 8px;
  right: 12px;
}
.dialog-title-coins-exchange {
  margin: 0;
  padding: 14px 106px 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
  flex-shrink: 0;
}
.coins-exchange-content {
  padding: 10px 16px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.coins-exchange-content::-webkit-scrollbar { display: none; }
.coins-exchange-rules { margin-bottom: 12px; padding: 10px 12px; background: #eff6ff; border: 1px solid #93c5fd; border-radius: 10px; }
.coins-exchange-rules-title { font-size: 14px; font-weight: 700; color: #2563eb; margin: 0 0 6px 0; }
.coins-exchange-rules-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: #1e40af; line-height: 1.55; }
.coins-exchange-rules-list li { margin-bottom: 4px; }
.coins-exchange-rules-list li:last-child { margin-bottom: 0; }
.coins-exchange-section { margin-bottom: 14px; }
.coins-exchange-section:last-child { margin-bottom: 0; }
.coins-exchange-section-title { font-size: 15px; font-weight: 700; color: #2563eb; margin: 0 0 6px 0; text-align: center; }
.coins-exchange-hint { font-size: 14px; line-height: 1.55; color: #6b7280; margin: 0 0 8px 0; }
.coins-exchange-section .form-label { margin-top: 0; margin-bottom: 4px; display: block; color: #2563eb; font-weight: 600; }
.coins-exchange-section .form-select { font-size: 16px; padding: 10px 12px; margin-bottom: 12px; width: 100%; max-width: 100%; }
.coins-exchange-section .form-input { font-size: 16px; padding: 10px 12px; margin-bottom: 12px; width: 100%; box-sizing: border-box; }
.coins-exchange-section .btn-dialog-confirm { margin-top: 4px; }
.coins-transaction-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0;
  background: #f9fafb;
}
.coins-transaction-empty { padding: 12px; font-size: 13px; }
.coins-transaction-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.coins-transaction-table th,
.coins-transaction-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.coins-transaction-table th { background: #f3f4f6; font-weight: 600; color: #374151; }
.coins-transaction-table tbody tr:last-child td { border-bottom: none; }
.coins-transaction-table .coins-delta-positive { color: #059669; font-weight: 600; }
.coins-transaction-table .coins-delta-negative { color: #dc2626; font-weight: 600; }
.coins-transaction-table .coins-delta-neutral { color: #6b7280; }
.coins-transaction-table td:nth-child(1) { white-space: nowrap; }
.coins-transaction-table td:nth-child(3),
.coins-transaction-table td:nth-child(4) { text-align: right; }
.coins-transaction-table th:nth-child(3),
.coins-transaction-table th:nth-child(4) { text-align: right; }
.coins-exchange-blur-overlay { position: fixed; inset: 0; pointer-events: auto; z-index: 9998; }
.coins-exchange-blur-overlay .coins-exchange-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 微信支付弹窗 */
.dialog-wechat-pay {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(94vw, 360px);
  width: min(94vw, 360px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-wechat-pay:not([open]) { display: none !important; }
.dialog-wechat-pay[open] { z-index: 10000; margin-top: 15vh; }
.dialog-title-wechat-pay {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #07c160 0%, #06ad56 100%);
  flex-shrink: 0;
}
.wechat-pay-content { padding: 20px; }
.wechat-pay-amount { font-size: 16px; margin: 0 0 8px; color: #1f2937; }
.wechat-pay-amount strong { color: #dc2626; }
.wechat-pay-desc { font-size: 14px; color: #6b7280; margin: 0 0 16px; }
.wechat-pay-qr-wrap { margin-bottom: 16px; }
.wechat-pay-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
}
.wechat-pay-qr-text { font-size: 14px; color: #6b7280; }
.wechat-pay-qr-box {
  width: 160px;
  height: 160px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  position: relative;
}
.wechat-pay-qr-box::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: linear-gradient(90deg, #e5e7eb 25%, transparent 25%), linear-gradient(180deg, #e5e7eb 25%, transparent 25%);
  background-size: 8px 8px;
  border-radius: 4px;
  opacity: 0.6;
}
.wechat-pay-tip { font-size: 13px; color: #6b7280; margin: 0 0 16px; line-height: 1.5; }
.wechat-pay-actions { display: flex; justify-content: space-between; gap: 12px; }
.wechat-pay-actions .btn-dialog-cancel { margin-right: auto; }
.wechat-pay-actions .btn-dialog-confirm { margin-left: auto; }

/* 传八卦弹窗：尺寸与格式参考换座位 */
.dialog-gossip {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}
.dialog-gossip:not([open]) { display: none !important; }
.dialog-gossip::backdrop { background: transparent; }
.dialog-gossip[open] { z-index: 9999; }
.dialog-gossip .dialog-title-gossip {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  flex-shrink: 0;
}
.dialog-gossip .gossip-content {
  padding: 12px 18px 16px;
}
.dialog-gossip .gossip-content .heart-speech-rules-title { margin-top: 0; }
.dialog-gossip .gossip-content .heart-speech-rules { margin-bottom: 12px; }
.dialog-gossip .gossip-textarea { min-height: 70px; resize: vertical; margin-bottom: 8px; }
.dialog-gossip .gossip-target-select { margin-bottom: 0; }
.dialog-gossip .change-seat-actions { margin-top: 12px; }
.gossip-blur-overlay { position: fixed; inset: 0; pointer-events: auto; z-index: 9998; }
.gossip-blur-overlay .gossip-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-gossip-continue { border: none; border-radius: 16px; padding: 16px 20px; max-width: min(94vw, 400px); box-shadow: 0 24px 48px rgba(0,0,0,0.2); }
.dialog-gossip-continue:not([open]) { display: none !important; }
.dialog-gossip-continue[open] { z-index: 10001; margin-top: 15vh; }
.dialog-title-gossip-continue { margin: 0 0 8px 0; font-size: 16px; font-weight: 700; color: #92400e; }
.gossip-continue-hint { font-size: 13px; color: #78350f; margin: 0 0 12px 0; }

/* 关系管理局弹窗（与邻桌物理攻击宽度一致，背景模糊，无滚动条） */
.dialog-relationship {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}
.dialog-relationship:not([open]) { display: none !important; }
.dialog-relationship::backdrop { background: transparent; }
.dialog-relationship[open] { z-index: 9999; }
.dialog-title-relationship {
  margin: 0;
  padding: 10px 16px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.relationship-title-logo { display: inline-flex; align-items: center; justify-content: center; }
.relationship-title-logo svg { display: block; }
.relationship-content {
  padding: 10px 16px 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.relationship-rules { margin-bottom: 6px; padding: 6px 10px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; }
.relationship-rules-title { font-size: 15px; font-weight: 700; color: #3730a3; margin: 0 0 4px 0; }
.relationship-rules-list { margin: 0; padding-left: 22px; font-size: 14px; color: #4338ca; line-height: 1.55; }
.relationship-rules-list li { margin-bottom: 1px; }
.relationship-section { margin-bottom: 5px; }
.relationship-section-title { font-size: 15px; font-weight: 800; color: #2563eb; margin: 0 0 4px 0; text-align: center; }
.dialog-relationship .relationship-section .form-label { color: #2563eb; font-weight: 600; }
.relationship-type-label, .relationship-members-label { font-size: 14px; color: #374151; margin: 0 0 4px 0; }
.relationship-type-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 6px;
  margin-bottom: 4px;
}
.relationship-type-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 3px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.relationship-type-item:hover { border-color: #c7d2fe; background: #eef2ff; }
.relationship-type-item.selected { border-color: #4f46e5; background: #e0e7ff; }
.relationship-type-item .relationship-type-logo { font-size: 30px; line-height: 1; }
.relationship-type-item .relationship-type-name { font-size: 13px; font-weight: 700; color: #374151; text-align: center; }
.relationship-oath { min-height: 36px; margin-bottom: 4px; padding: 6px 8px; font-size: 15px; resize: none; }
.relationship-members-row { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.relationship-member-select { flex: 1; min-width: 0; padding: 8px 10px; font-size: 15px; }
.btn-relationship-add { padding: 8px 12px; font-size: 14px; font-weight: 700; color: #4f46e5; background: #e0e7ff; border: 1px solid #a5b4fc; border-radius: 8px; cursor: pointer; }
.btn-relationship-add:hover { background: #c7d2fe; }
.relationship-selected-list { min-height: 26px; margin-bottom: 4px; padding: 5px 8px; background: #f9fafb; border-radius: 8px; font-size: 14px; color: #374151; }
.relationship-selected-list .relationship-selected-tag { display: inline-block; margin: 2px 4px 2px 0; padding: 4px 8px; background: #e0e7ff; color: #4338ca; border-radius: 6px; font-size: 13px; }
.relationship-confirm-establish { margin-bottom: 4px; width: 100%; padding: 9px; font-size: 15px; }
.relationship-separator { margin: 5px 0; border: none; border-top: 1px solid #e5e7eb; }
.relationship-dissolve-select { margin-bottom: 4px; width: 100%; padding: 7px 10px; font-size: 15px; box-sizing: border-box; }
.relationship-dissolve-reason { margin-bottom: 4px; width: 100%; padding: 7px 10px; font-size: 15px; box-sizing: border-box; }
.relationship-dissolve-btn {
  width: 100%;
  padding: 9px;
  font-size: 15px;
  background: #fed7aa;
  border-color: #fdba74;
  color: #9a3412;
}
.relationship-dissolve-btn:hover {
  background: #fdba74;
  border-color: #f97316;
  color: #7c2d12;
}
.relationship-actions { margin-top: 6px; margin-bottom: 0; }
.relationship-actions .btn-dialog-cancel {
  min-width: 160px;
  padding-left: 34px;
  padding-right: 34px;
}
.relationship-blur-overlay { position: fixed; inset: 0; z-index: 9998; pointer-events: auto; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(0, 0, 0, 0.25); }

/* 我的书包 - 关系档案室 */
.my-bag-section-archive { }
.my-bag-archive-desc { font-size: 11px; color: #6b7280; margin: 0 0 6px 0; line-height: 1.35; }
.my-bag-relationship-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; padding-bottom: 4px; align-content: flex-start; }
.my-bag-relationship-item {
  flex: 1 1 calc(50% - 3px);
  min-width: 220px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f5f3ff;
  font-size: 12px;
  color: #374151;
  cursor: default;
}
.my-bag-relationship-item .rel-head { display: inline-flex; align-items: center; gap: 6px; }
.my-bag-relationship-item .rel-logo { font-size: 16px; line-height: 1; }
.my-bag-relationship-item .rel-type { font-weight: 700; color: #4f46e5; }
.my-bag-relationship-item .rel-members { color: #6b7280; }
.my-bag-relationship-item .rel-oath { font-size: 11px; color: #2563eb; display: block; margin-top: 4px; }

/* 写情书弹窗：尺寸与格式参考传八卦 */
.dialog-love-letter {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}
.dialog-love-letter:not([open]) { display: none !important; }
.dialog-love-letter::backdrop { background: transparent; }
.dialog-love-letter[open] { z-index: 9999; }
.dialog-title-love-letter {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #ec4899 0%, #be185d 100%);
  flex-shrink: 0;
}
.love-letter-content { padding: 12px 18px 16px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: none; -ms-overflow-style: none; }
.love-letter-content::-webkit-scrollbar { display: none; }
.love-letter-rules { margin-bottom: 14px; padding: 12px 14px; background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 10px; }
.love-letter-rules-title { font-size: 15px; font-weight: 700; color: #9d174d; margin: 0 0 8px 0; }
.love-letter-rules-list { margin: 0; padding-left: 22px; font-size: 14px; color: #831843; line-height: 1.65; }
.love-letter-rules-list li { margin-bottom: 6px; }
.love-letter-hint { font-size: 13px; color: #6b7280; margin: 0 0 10px 0; }
.love-letter-target { font-size: 16px; padding: 12px 14px; min-height: 48px; margin-bottom: 14px; width: 100%; }
.love-letter-paper-label { margin-top: 0; margin-bottom: 8px; }
.love-letter-stationery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 12px;
  margin-bottom: 16px;
}
.love-letter-paper-option {
  aspect-ratio: 1;
  min-height: 48px;
  max-height: 64px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  padding: 6px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.love-letter-paper-option:hover { border-color: #ec4899; background: #fdf2f8; }
.love-letter-paper-option.selected,
.love-letter-paper-option:has(.love-letter-paper-radio:checked) { border-color: #be185d; box-shadow: 0 0 0 2px rgba(190, 24, 93, 0.35); }
/* 30 种信纸模板（浅色底纹与设计元素，小预览与书写区共用） */
.love-letter-paper-1 {
  background: radial-gradient(circle at 10% 20%, rgba(253,230,138,0.4) 0%, transparent 18%), linear-gradient(180deg, #fef3c7 0%, #fde68a 25%, #fef9c3 100%);
  background-size: 32px 32px, 100% 100%;
  border: 2px solid #d97706;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  font-family: "KaiTi", "楷体", serif;
}
.love-letter-paper-2 {
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(251,207,232,0.5) 0%, transparent 50%), linear-gradient(135deg, #fce7f3 0%, #fbcfe8 50%, #f9a8d4 100%);
  background-size: 100% 100%, 100% 100%;
  border: 2px solid #be185d;
  box-shadow: inset 0 0 60px rgba(244,114,182,0.15);
}
.love-letter-paper-3 {
  background: repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(234,88,12,0.06) 24px, rgba(234,88,12,0.06) 25px), #fff7ed;
  border: 1px dashed #ea580c;
  color: #9a3412;
}
.love-letter-paper-4 {
  background: linear-gradient(0deg, rgba(16,185,129,0.04) 0%, transparent 8px), linear-gradient(to bottom, #ecfdf5 0%, #d1fae5 100%);
  background-size: 100% 28px, 100% 100%;
  border: 1px solid #059669;
  box-shadow: inset 2px 0 0 rgba(5,150,105,0.2);
}
.love-letter-paper-5 {
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%), #faf5ff;
  border: 2px solid #7c3aed;
  font-family: "STKaiti", "楷体", serif;
}
.love-letter-paper-6 {
  background: repeating-linear-gradient(transparent, transparent 27px, rgba(99,102,241,0.12) 27px, rgba(99,102,241,0.12) 28px), repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(224,231,255,0.5) 20px, rgba(224,231,255,0.5) 21px), #e0e7ff;
  border-color: #4f46e5;
}
.love-letter-paper-7 {
  background: linear-gradient(135deg, rgba(180,83,9,0.06) 0%, transparent 30%), #fffbeb;
  border: 3px double #b45309;
  box-shadow: inset 0 0 0 1px rgba(180,83,9,0.1);
}
.love-letter-paper-8 {
  background: radial-gradient(ellipse 100% 80% at 80% 20%, rgba(254,202,202,0.4) 0%, transparent 45%), linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #dc2626;
}
.love-letter-paper-9 {
  background: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(34,197,94,0.04) 6px, rgba(34,197,94,0.04) 7px), #f0fdf4;
  border: 1px solid #22c55e;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.15);
}
.love-letter-paper-10 {
  background: radial-gradient(circle at 80% 80%, rgba(99,102,241,0.12) 0%, transparent 35%), linear-gradient(145deg, #e0e7ff 0%, #c7d2fe 100%);
  border-color: #6366f1;
}
.love-letter-paper-11 {
  background: linear-gradient(0deg, rgba(202,138,4,0.05) 0%, transparent 2px), repeating-linear-gradient(0deg, transparent, transparent 26px, rgba(202,138,4,0.06) 26px, rgba(202,138,4,0.06) 27px), #fefce8;
  background-size: 100% 100%, 100% 28px, 100% 100%;
  border: 2px solid #ca8a04;
}
.love-letter-paper-12 {
  background: linear-gradient(120deg, rgba(162,28,175,0.06) 0%, transparent 40%), linear-gradient(to right, #fdf4ff 0%, #fae8ff 100%);
  border-color: #a21caf;
}
.love-letter-paper-13 {
  background: repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(100,116,139,0.05) 24px, rgba(100,116,139,0.05) 25px), #f8fafc;
  border: 1px solid #64748b;
  color: #334155;
}
.love-letter-paper-14 {
  background: radial-gradient(circle at 20% 80%, rgba(225,29,72,0.12) 0%, transparent 40%), linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #e11d48;
}
.love-letter-paper-15 {
  background: repeating-linear-gradient(90deg, transparent, transparent 16px, rgba(16,185,129,0.06) 16px, rgba(16,185,129,0.06) 17px), #ecfdf5;
  border: 2px dotted #10b981;
}
.love-letter-paper-16 {
  background: linear-gradient(180deg, rgba(234,179,8,0.08) 0%, transparent 20%), linear-gradient(180deg, #fefce8 0%, #fef9c3 100%);
  border-color: #eab308;
  box-shadow: inset 0 2px 0 rgba(234,179,8,0.15);
}
.love-letter-paper-17 {
  background: radial-gradient(circle at 50% 50%, rgba(139,92,246,0.08) 0%, transparent 60%), #f5f3ff;
  border: 2px solid #8b5cf6;
}
.love-letter-paper-18 {
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(249,115,22,0.04) 8px, rgba(249,115,22,0.04) 9px), #fff7ed;
  border: 1px solid #f97316;
}
.love-letter-paper-19 {
  background: linear-gradient(135deg, rgba(219,39,119,0.1) 0%, transparent 50%), linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  border: 2px solid #db2777;
}
.love-letter-paper-20 {
  background: repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(20,184,166,0.05) 22px, rgba(20,184,166,0.05) 23px), #f0fdfa;
  border-color: #14b8a6;
}
.love-letter-paper-21 {
  background: radial-gradient(circle at 15% 15%, rgba(217,119,6,0.1) 0%, transparent 25%), #fef3c7;
  border: 2px solid #d97706;
  font-family: "FangSong", "仿宋", serif;
}
.love-letter-paper-22 {
  background: linear-gradient(to bottom, rgba(190,24,93,0.06) 0%, transparent 15%), linear-gradient(to bottom, #fdf2f8 0%, #fce7f3 100%);
  border-color: #be185d;
}
.love-letter-paper-23 {
  background: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(161,98,7,0.08) 28px, rgba(161,98,7,0.08) 29px), #fef9c3;
  border: 1px dashed #a16207;
}
.love-letter-paper-24 {
  background: radial-gradient(ellipse 60% 100% at 100% 0%, rgba(2,132,199,0.1) 0%, transparent 50%), #e0f2fe;
  border-color: #0284c7;
}
.love-letter-paper-25 {
  background: linear-gradient(180deg, rgba(109,40,217,0.06) 0%, transparent 25%), linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #6d28d9;
}
.love-letter-paper-26 {
  background: repeating-linear-gradient(-30deg, transparent, transparent 10px, rgba(239,68,68,0.05) 10px, rgba(239,68,68,0.05) 11px), #fef2f2;
  border: 2px solid #ef4444;
}
.love-letter-paper-27 {
  background: linear-gradient(90deg, rgba(16,185,129,0.05) 0%, transparent 20%), #ecfdf5;
  border: 1px solid #10b981;
  box-shadow: inset -2px 0 0 rgba(16,185,129,0.15);
}
.love-letter-paper-28 {
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 50%, #fef9c3 100%), repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(180,83,9,0.04) 18px, rgba(180,83,9,0.04) 19px);
  background-size: 100% 100%, 24px 100%;
  border-color: #b45309;
}
.love-letter-paper-29 {
  background: radial-gradient(circle at 30% 70%, rgba(192,38,211,0.1) 0%, transparent 45%), #fdf4ff;
  border: 2px solid #c026d3;
}
.love-letter-paper-30 {
  background: repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(71,85,105,0.04) 20px, rgba(71,85,105,0.04) 21px), repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(71,85,105,0.03) 20px, rgba(71,85,105,0.03) 21px), #f1f5f9;
  border: 1px solid #475569;
}

.love-letter-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.love-letter-actions .btn-dialog-cancel { margin-right: auto; min-width: 140px; padding-left: 28px; padding-right: 28px; }
.love-letter-actions .btn-dialog-confirm { margin-left: auto; }
.love-letter-blur-overlay { position: fixed; inset: 0; pointer-events: auto; z-index: 9998; }
.love-letter-blur-overlay .love-letter-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 写情书 step2：信纸书写区 */
.love-letter-step2 .love-letter-paper-preview {
  margin-bottom: 12px;
  min-height: 200px;
}
.love-letter-paper-inner {
  padding: 20px 24px;
  border-radius: 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.love-letter-field-label { font-size: 13px; font-weight: 600; color: #374151; margin: 0; }
.love-letter-input, .love-letter-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255,255,255,0.7);
}
.love-letter-textarea { resize: vertical; min-height: 100px; }

/* 我的书包 - 礼品柜 */
.my-bag-section-cabinet { }
.my-bag-cabinet-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  padding: 8px 10px 10px;
  margin: 0 0 6px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}
.my-bag-cabinet-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 8px;
  min-width: 64px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.my-bag-cabinet-icon { font-size: 22px; line-height: 1; }
.my-bag-cabinet-name { font-size: 12px; font-weight: 700; color: #1f2937; }
.my-bag-cabinet-slogan { font-size: 10px; color: #2563eb; }
.my-bag-cabinet-count { font-size: 16px; font-weight: 700; color: #059669; }

/* 我的书包 - 情书收藏夹 */
.my-bag-section-love-letters { }
.my-bag-love-letters-desc { font-size: 11px; color: #6b7280; margin: 0 0 6px 0; line-height: 1.35; }
.my-bag-love-letter-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-bottom: 4px;
}
.my-bag-love-letter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 5px 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fdf2f8;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  min-width: 0;
}
.my-bag-love-letter-item:hover { border-color: #ec4899; background: #fce7f3; }
.my-bag-love-letter-item-icon { font-size: 18px; flex-shrink: 0; }
.my-bag-love-letter-item-text { font-size: 11px; color: #374151; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.my-bag-love-letter-item-text strong { color: #be185d; }
.my-bag-love-letter-item-time { font-size: 10px; color: #9ca3af; flex-shrink: 0; }

/* 查看情书弹窗（带信纸样式） */
.dialog-view-love-letter {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(94vw, 520px);
  width: min(94vw, 520px);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-view-love-letter:not([open]) { display: none !important; }
.dialog-view-love-letter[open] { z-index: 10000; margin-top: 6vh; }
.dialog-title-view-love-letter {
  margin: 0;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #ec4899 0%, #be185d 100%);
  flex-shrink: 0;
}
.view-love-letter-paper-wrap {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.view-love-letter-paper-inner {
  padding: 20px 24px;
  border-radius: 12px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.view-love-letter-meta { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.view-love-letter-salutation { font-size: 15px; font-weight: 600; }
.view-love-letter-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.view-love-letter-signature { font-size: 14px; font-weight: 600; text-align: right; margin-top: 8px; }

/* 远程物理攻击弹窗：格式与大小与邻桌物理攻击一致 */
.dialog-remote-attack {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-remote-attack:not([open]) { display: none !important; }
.dialog-remote-attack::backdrop { background: transparent; }
.dialog-remote-attack[open] { z-index: 9999; margin-top: max(8vh, 90px); }
.dialog-title-remote-attack {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  flex-shrink: 0;
}
.remote-attack-content { padding: 16px 20px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.remote-attack-rules-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #2563eb; }
.remote-attack-rules { margin: 0 0 12px; padding-left: 22px; font-size: 13px; line-height: 1.6; color: #374151; }
.remote-attack-rules li { margin-bottom: 6px; }
.remote-attack-separator { margin: 14px 0; border: none; border-top: 1px solid #e5e7eb; }
.remote-attack-type-label { margin-top: 0; margin-bottom: 8px; color: #2563eb; font-weight: 600; }
.remote-attack-types { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.remote-attack-type-option { display: inline-flex; cursor: pointer; }
.remote-attack-type-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.remote-attack-type-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.remote-attack-type-option:hover .remote-attack-type-box { border-color: #f97316; background: #fff7ed; }
.remote-attack-type-radio:checked + .remote-attack-type-box {
  border-color: #f97316; background: #ffedd5; box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}
.remote-attack-type-icon { flex-shrink: 0; width: 64px; height: 64px; }
.remote-attack-target-label { margin-top: 0; margin-bottom: 6px; color: #2563eb; font-weight: 600; }
.remote-attack-target-select { font-size: 16px; padding: 12px 14px; min-height: 48px; margin-bottom: 12px; }
.remote-attack-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.remote-attack-actions .btn-dialog-cancel { margin-right: auto; min-width: 120px; padding-left: 28px; padding-right: 28px; }
.remote-attack-actions .btn-dialog-confirm { margin-left: auto; min-width: 120px; padding-left: 28px; padding-right: 28px; }
.remote-attack-blur-overlay { position: fixed; inset: 0; pointer-events: auto; z-index: 9998; }
.remote-attack-blur-overlay .remote-attack-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* 换座位弹窗与模糊层 */
.change-seat-blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: auto;
}
.change-seat-blur-overlay .change-seat-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-change-seat {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}
.dialog-change-seat:not([open]) { display: none !important; }
.dialog-change-seat::backdrop { background: transparent; }
.dialog-change-seat .dialog-title-change-seat {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  flex-shrink: 0;
}
.dialog-change-seat .change-seat-content {
  padding: 12px 18px 16px;
}
.change-seat-mode-row {
  display: flex;
  gap: 12px;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}
.change-seat-mode-option {
  flex: 1;
  min-width: 140px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.change-seat-mode-option:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.change-seat-mode-option:has(.change-seat-mode-radio:checked) {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
  box-shadow: 0 0 0 1px #22c55e;
}
.change-seat-mode-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.change-seat-mode-option-text {
  pointer-events: none;
}
.change-seat-grid {
  margin: 1rem 0;
  min-height: 200px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
  padding: 0 8px;
}
.change-seat-grid.seat-picker-grid {
  gap: 6px;
}
.change-seat-grid .seat-picker-row {
  gap: 6px;
  justify-content: center;
}
.change-seat-grid .seat-picker-cell {
  width: 46px;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border-width: 2px;
}
.change-seat-grid .seat-picker-cell.taken {
  font-size: 13px;
}
.change-seat-grid .seat-picker-cell.empty-seat {
  cursor: pointer;
}
.change-seat-grid .seat-picker-cell.empty-seat:hover {
  background: #e5e7eb;
  border-color: #0078c8;
}
.change-seat-grid .seat-picker-cell.empty-seat.selected {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}
@media (max-width: 480px) {
  .dialog-change-seat {
    width: 94vw;
    max-width: 94vw;
    margin-top: 12vh;
    max-height: 85vh;
  }
  .dialog-change-seat .dialog-title-change-seat {
    font-size: 17px;
    padding: 12px 16px;
  }
  .dialog-change-seat .change-seat-content {
    padding: 10px 16px 16px;
  }
  .change-seat-grid {
    max-height: min(52vh, 280px);
    margin: 0.75rem 0;
    padding: 0 4px;
  }
  .change-seat-grid .seat-picker-cell {
    width: 40px;
    height: 36px;
    font-size: 13px;
  }
  .change-seat-grid .seat-picker-cell.taken {
    font-size: 12px;
  }
  .change-seat-grid.seat-picker-grid {
    gap: 5px;
  }
  .change-seat-grid .seat-picker-row {
    gap: 5px;
  }
}
.change-seat-swap-wrap {
  margin: 0.75rem 0;
}
.change-seat-swap-wrap .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.change-seat-swap-wrap .form-select {
  width: 100%;
  max-width: 280px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.change-seat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.change-seat-actions .btn-dialog-cancel,
.change-seat-actions .btn-dialog-confirm {
  min-width: 140px;
  padding-left: 32px;
  padding-right: 32px;
}
.change-seat-actions .btn-dialog-cancel {
  margin-right: auto;
}
.change-seat-actions .btn-dialog-confirm {
  margin-left: auto;
}

/* 心里话与心中歌弹窗：尺寸与格式同递纸条，背景模糊由 JS 实现 */
.heart-speech-blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: auto;
}
.heart-speech-blur-overlay .heart-speech-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-heart-speech {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-heart-speech:not([open]) {
  display: none !important;
}
.dialog-heart-speech::backdrop {
  background: transparent;
}
.dialog-heart-speech[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}
.dialog-title-heart-speech {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  flex-shrink: 0;
}
.heart-speech-content {
  padding: 12px 18px 16px;
}
.heart-speech-rules-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
}
.heart-speech-rules {
  margin: 0 0 8px;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
}
.heart-speech-rules li {
  margin-bottom: 6px;
}
.heart-speech-rules li:last-child {
  margin-bottom: 0;
}
.heart-speech-separator {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.heart-speech-separator-block {
  margin: 14px 0;
  border-top-width: 2px;
  border-top-color: #c7d2fe;
}
.heart-speech-block {
  margin-bottom: 4px;
  text-align: center;
}
.heart-speech-block-title {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: #ea580c;
  padding: 8px 14px;
  border-radius: 8px;
}
.heart-speech-block .heart-speech-label,
.heart-speech-block .form-input,
.heart-speech-block .heart-speech-select,
.heart-speech-block .heart-speech-actions {
  text-align: left;
}
.heart-speech-block-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}
.heart-speech-now-playing {
  margin: 4px 0 10px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 6px;
  line-height: 1.4;
}
.heart-speech-label {
  display: block;
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.heart-speech-ref-label {
  margin-top: 10px;
  margin-bottom: 6px;
}
.heart-speech-content .heart-speech-textarea {
  margin-bottom: 8px;
}
.heart-speech-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.heart-speech-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.heart-speech-actions .btn-dialog-cancel {
  margin-right: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}
.heart-speech-actions .btn-dialog-confirm {
  margin-left: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}
.heart-speech-actions-words {
  margin-top: 4px;
  margin-bottom: 0;
}
.heart-speech-actions-song {
  margin-top: 4px;
  margin-bottom: 0;
}
.heart-speech-block-song .heart-speech-select {
  margin-bottom: 12px;
}

/* 吃零食弹窗：尺寸与格式同递纸条，背景模糊由 JS 实现 */
.snack-blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: auto;
}
.snack-blur-overlay .snack-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-snack {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-snack:not([open]) {
  display: none !important;
}
.dialog-snack::backdrop {
  background: transparent;
}
.dialog-snack[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}
.dialog-title-snack {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  flex-shrink: 0;
}
.snack-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.snack-content::-webkit-scrollbar {
  display: none;
}
.snack-rules-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
}
.snack-rules {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}
.snack-rules li {
  margin-bottom: 6px;
}
.snack-rules li:last-child {
  margin-bottom: 0;
}
.snack-separator {
  margin: 14px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.snack-choose-hint {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.snack-options-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 4px;
  justify-content: space-between;
}
.snack-options-row .snack-option {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.snack-option {
  margin-bottom: 10px;
}
.snack-option label {
  display: block;
  cursor: pointer;
  position: relative;
  height: 100%;
}
.snack-option label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.snack-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-align: center;
}
.snack-option-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.snack-option-poem {
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
}
.snack-option-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  min-height: 100%;
  box-sizing: border-box;
}
.snack-options-row .snack-option-main {
  padding: 12px 8px 10px;
}
.snack-option-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.snack-options-row .snack-option-icon {
  width: 32px;
  height: 32px;
}
.snack-options-row .snack-option-poem {
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  text-align: center;
}
.snack-option:hover .snack-option-main {
  border-color: #f97316;
  background: #fff7ed;
}
.snack-option label input[type="radio"]:checked + .snack-option-main {
  border-color: #f97316;
  background: #ffedd5;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}
@media (max-width: 380px) {
  .snack-options-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .snack-options-row .snack-option {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .snack-options-row .snack-option:last-child {
    flex: 1 1 100%;
  }
}
.snack-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.snack-actions .btn-dialog-cancel {
  margin-right: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}
.snack-actions .btn-dialog-confirm {
  margin-left: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}

/* 我心里话区块内 ref 标签与心中歌区块样式已由 .heart-speech-block 统一 */

/* 我记得弹窗：与邻桌物理攻击同尺寸，背景模糊，美化样式 */
.i-remember-blur-overlay {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 9998;
}
.i-remember-blur-overlay .i-remember-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-i-remember {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
}
.dialog-i-remember:not([open]) {
  display: none !important;
}
.dialog-i-remember::backdrop {
  background: transparent;
}
.dialog-i-remember[open] {
  z-index: 9999;
}
.dialog-title-i-remember {
  margin: 0;
  padding: 10px 16px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fdba74 0%, #f97316 50%, #ea580c 100%);
  flex-shrink: 0;
}
.i-remember-content {
  padding: 10px 16px 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.i-remember-rules {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
}
.i-remember-rules-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
}
.i-remember-rules-list {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #1e40af;
}
.i-remember-rules-list li { margin-bottom: 4px; }
.i-remember-rules-list li:last-child { margin-bottom: 0; }
.i-remember-label {
  display: block;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}
.i-remember-textarea {
  margin-bottom: 14px;
  min-height: 52px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.55;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.i-remember-textarea:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.i-remember-textarea::placeholder {
  color: #9ca3af;
}
.i-remember-verifier-select {
  font-size: 15px;
  padding: 12px 14px;
  min-height: 48px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s;
}
.i-remember-verifier-select:focus {
  outline: none;
  border-color: #f97316;
}
.i-remember-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 8px;
}
.i-remember-actions .btn-dialog-cancel {
  margin-right: auto;
  min-width: 160px;
  padding-left: 34px;
  padding-right: 34px;
}
.i-remember-actions .btn-dialog-confirm {
  min-width: 160px;
  padding-left: 34px;
  padding-right: 34px;
}
.i-remember-separator {
  margin: 20px 0 14px;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.i-remember-list-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.01em;
}
.memory-list-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #fff;
}
.memory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #111827;
}
.memory-table thead {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-bottom: 2px solid #fdba74;
}
.memory-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: #9a3412;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.memory-table th:nth-child(1) { width: 11em; }
.memory-table th:nth-child(2) { width: 6em; }
.memory-table th:nth-child(3) { min-width: 12em; }
.memory-table th:nth-child(4) { width: 6em; }
.memory-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}
.memory-table tbody tr:hover {
  background-color: #fffbeb;
}
.memory-table tbody tr:last-child {
  border-bottom: none;
}
.memory-table td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.5;
}
.memory-table td:nth-child(1) {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}
.memory-table td:nth-child(2) {
  font-weight: 600;
  color: #374151;
}
.memory-table td:nth-child(3) {
  white-space: pre-wrap;
  word-break: break-word;
  color: #1f2937;
}
.memory-table td:nth-child(4) {
  font-weight: 500;
  color: #6b7280;
}
.memory-table .memory-table-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 24px 14px;
}
@media (max-width: 480px) {
  .memory-table th:nth-child(1),
  .memory-table td:nth-child(1) { font-size: 12px; padding-left: 10px; padding-right: 10px; }
  .memory-table th:nth-child(2),
  .memory-table td:nth-child(2) { width: 5em; }
  .memory-table th,
  .memory-table td { padding: 10px 12px; }
}

.dialog-class-log {
  border: none;
  border-radius: 16px;
  padding: 0;
  z-index: 9999;
  margin-top: max(8vh, 90px);
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(96vh, calc(100vh - 60px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  position: relative;
}
.dialog-class-log:not([open]) {
  display: none !important;
}
.dialog-class-log::backdrop {
  background: transparent;
}
.dialog-class-log .dialog-title {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.dialog-class-log .btn-dialog-x {
  min-width: 88px;
  height: 44px;
  font-size: 16px;
  padding: 0 20px;
  line-height: 42px;
  top: 8px;
  right: 12px;
}
.class-log-content {
  padding: 10px 16px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.class-log-blur-overlay {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 9998;
}
.class-log-blur-overlay .class-log-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.class-log-desc {
  margin: 0 0 10px;
  font-size: 14px;
  color: #4b5563;
}
.class-log-list {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  font-size: 14px;
  color: #111827;
}
.class-log-item {
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.class-log-item-time {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}
.class-log-item-text {
  line-height: 1.5;
}

/* 取外号弹窗：尺寸与格式同递纸条，背景模糊 */
.nickname-blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: auto;
}
.nickname-blur-overlay .nickname-blur-piece {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}
.dialog-nickname {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 720px);
  width: min(96vw, 720px);
  max-height: min(92vh, calc(100vh - 100px));
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  background: #fff;
  margin: auto;
}
.dialog-nickname:not([open]) {
  display: none !important;
}
.dialog-nickname::backdrop {
  background: transparent;
}
.dialog-nickname[open] {
  z-index: 9999;
  margin-top: max(8vh, 90px);
}
.dialog-title-nickname {
  margin: 0;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  flex-shrink: 0;
}
.nickname-content {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.nickname-rules-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
}
.nickname-rules {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}
.nickname-rules li {
  margin-bottom: 6px;
}
.nickname-rules li:last-child {
  margin-bottom: 0;
}
.nickname-separator {
  margin: 14px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.nickname-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.nickname-label:first-of-type {
  margin-top: 0;
}
.nickname-hint {
  margin: 0 0 6px;
  font-size: 13px;
  color: #6b7280;
}
.nickname-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
}
.nickname-select,
.nickname-verifier {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 4px;
  background: #fff;
}
.form-inline .nickname-verifier {
  flex: 1;
  min-width: 0;
}
.nickname-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.nickname-actions .btn-dialog-cancel {
  margin-right: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}
.nickname-actions .btn-dialog-confirm {
  margin-left: auto;
  min-width: 120px;
  padding-left: 28px;
  padding-right: 28px;
}

/* 座位头像上方外号：红色，字号略小 */
.seat-nickname {
  font-size: 11px;
  font-weight: 600;
  color: #c62828;
  margin-bottom: 1px;
  line-height: 1.2;
}
