* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background: #000;
  overflow: hidden;
}

.screen {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: flex;
}

/* ===== 登录界面 ===== */

#login-screen {
  align-items: center;
  justify-content: center;
  background: #0b2a52;
}

.view {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  align-items: center;
  justify-content: center;
}

.view.active {
  display: flex;
}

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 160px;
  height: 160px;
  margin-bottom: 28px;
}

.avatar svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.login-title {
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  margin-bottom: 34px;
  white-space: nowrap;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-btn {
  width: 220px;
  padding: 12px 0;
  font-size: 15px;
  letter-spacing: 1px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.login-btn:hover,
.login-btn:focus-visible {
  background: rgba(255, 255, 255, 0.32);
  outline: none;
}

.login-btn:active {
  transform: scale(0.97);
}

.version {
  margin-top: 44px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 1px;
}

/* ===== 返回按钮 ===== */

.back-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 14px;
  font-size: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== 注册视图 ===== */

.register-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.field-title {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.text-input {
  width: 320px;
  padding: 12px 14px;
  font-size: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0;
  outline: none;
  caret-color: #ffffff;
}

.text-input::placeholder {
  color: #b9c4d3;
  font-style: italic;
}

.text-input:focus {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.field-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.register-box .login-btn {
  margin-top: 28px;
}

.error-text {
  margin-top: 12px;
  color: #ff5252;
  font-size: 14px;
  min-height: 20px;
  text-align: center;
}

.shake-target {
  animation: none;
}

.shake-target.shaking {
  animation: shake 0.4s;
}

@keyframes shake {
  0%   { transform: translate(0, 0); }
  15%  { transform: translate(-8px, 2px); }
  30%  { transform: translate(8px, -2px); }
  45%  { transform: translate(-6px, 1px); }
  60%  { transform: translate(6px, -1px); }
  75%  { transform: translate(-3px, 1px); }
  100% { transform: translate(0, 0); }
}

/* ===== 存档视图 ===== */

.load-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 420px;
  max-height: 70vh;
}

.load-title {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.save-list {
  width: 100%;
  overflow-y: auto;
}

.save-list::-webkit-scrollbar {
  width: 8px;
}

.save-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

.save-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.save-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

.save-item {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.save-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.save-username {
  color: #ffffff;
  font-size: 16px;
}

.save-time {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== 弹窗 ===== */

.modal-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10;
}

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

.modal-box {
  min-width: 320px;
  padding: 30px 36px;
  background: #0b2a52;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-text {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 26px;
  white-space: nowrap;
}

.modal-warn {
  display: none;
  margin: -14px 0 20px;
  font-size: 12px;
  color: #ff5252;
}

.modal-buttons {
  display: flex;
  gap: 16px;
}

.modal-btn {
  width: 110px;
  padding: 9px 0;
  font-size: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-confirm {
  background: rgba(255, 255, 255, 0.24);
}

/* ===== 登出屏 ===== */

#logout-screen {
  align-items: center;
  justify-content: center;
  background: #000;
}

.logout-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  letter-spacing: 2px;
}

/* ===== 游戏界面 ===== */

#game-screen {
  flex-direction: column;
  background: #faf8f3;
}

#game-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

#game-sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 20%;
  height: 100%;
  background: #102a43;
}

.game-tabs {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.game-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  letter-spacing: 1px;
  text-align: left;
  color: #ffffff;
  background: #102a43;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.game-tab:hover {
  background: #14304a;
}

.game-tab.active {
  background: #1a3a58;
}

#folder-tab {
  display: none;
}

#folder-tab.show {
  display: flex;
}

.game-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #c49a5a;
}

.tab-icon {
  display: flex;
  align-items: center;
  color: #c49a5a;
}

.tab-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.game-clock {
  margin-top: auto;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  line-height: 1.8;
}

.clock-icon {
  display: flex;
  align-items: center;
  color: #c49a5a;
  margin-top: 3px;
}

.clock-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

#game-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

#top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 8px 24px;
  background: #102a43;
  color: #ffffff;
}

.hotel-name {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.hotel-line-1 {
  color: #c49a5a;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
}

.hotel-line-2 {
  color: #8a8f98;
  font-size: 12px;
  letter-spacing: 1px;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.user-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.user-arrow {
  font-size: 11px;
  color: #c49a5a;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #102a43;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.user-dropdown.open {
  display: block;
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  text-align: left;
  color: #ffffff;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

#game-content {
  flex: 1;
  overflow-y: auto;
  background: #faf8f3;
}

/* ===== 浮条提示 ===== */

.toast {
  position: fixed;
  top: 64px;
  right: 24px;
  padding: 12px 20px;
  color: #000000;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s, visibility 1s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

.game-page {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.game-page.active {
  display: flex;
}

.page-placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-size: 16px;
  letter-spacing: 1px;
}

/* ===== 酒店通讯页 ===== */

.comms-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#page-comms {
  align-items: stretch;
  justify-content: stretch;
}

.chat-area {
  display: flex;
  flex-direction: column;
  flex: 3;
  min-width: 0;
  min-height: 0;
}

.chat-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-top: 2px solid #000000;
  background: #faf8f3;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
}

.chat-contact-name {
  pointer-events: none;
}

.chat-contact-info {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.chat-back {
  display: none;
  z-index: 1;
  margin-left: 10px;
  padding: 4px 10px;
  font-size: 13px;
  color: #000000;
  background: #faf8f3;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-back:hover {
  background: #eae3d0;
}

.chat-back.visible {
  display: block;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 12px;
  min-height: 0;
  background: #faf8f3;
}

.chat-hint {
  margin: auto;
  color: rgba(0, 0, 0, 0.35);
  font-size: 14px;
}

.chat-time {
  text-align: center;
  color: #7a7a7a;
  font-size: 12px;
  margin: 8px 0 12px;
}

.rating-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.rating-line::before,
.rating-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #b5b5b5;
}

.rating-text {
  color: #7a7a7a;
  font-size: 12px;
  white-space: nowrap;
}

.msg-row {
  display: flex;
  margin: 4px 0;
}

.msg-row.in {
  justify-content: flex-start;
}

.msg-row.out {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 62%;
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-bubble.in {
  background: #ffffff;
  color: #000000;
  border-radius: 12px 12px 12px 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.msg-bubble.out {
  background: #3b82f6;
  color: #ffffff;
  border-radius: 12px 12px 2px 12px;
}

.msg-bubble.image {
  padding: 6px;
  max-width: 70%;
}

.msg-bubble.image img {
  display: block;
  max-width: 260px;
  max-height: 260px;
  object-fit: contain;
  cursor: pointer;
}

.msg-bubble.image img:hover {
  opacity: 0.85;
}

.msg-bubble-image-name {
  display: block;
  font-size: 11px;
  color: #666666;
  margin-top: 4px;
  text-align: center;
}

.chat-replies {
  position: relative;
  flex: 0 0 25%;
  overflow-y: auto;
  border-top: 2px solid #000000;
  background: #faf8f3;
  padding: 10px 12px;
  display: flex;
  align-items: center;
}

.replies-inner {
  margin: auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 30px;
}

.reply-add {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 1;
  color: #000000;
  background: #ffffff;
  border: 1px solid #000000;
  cursor: pointer;
  z-index: 2;
  display: none;
}

.reply-add.show {
  display: block;
}

.reply-add:hover {
  background: #eae3d0;
}

.food-picked {
  position: absolute;
  left: 42px;
  top: 8px;
  right: 8px;
  font-size: 12px;
  color: #1e63c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
  pointer-events: none;
}

.reply-file-list {
  position: fixed;
  background: #ffffff;
  border: 1px solid #000000;
  border-bottom: none;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  z-index: 3;
}

.reply-file-list.open {
  display: block;
}

.reply-file-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #888888;
  text-align: center;
}

.reply-file-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  text-align: left;
  color: #000000;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #eeeeee;
  cursor: pointer;
}

.reply-file-item:hover {
  background: #eae3d0;
}

.reply-btn {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  text-align: left;
  color: #000000;
  background: #faf8f3;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 0.15s;
}

.reply-btn:hover {
  background: #eae3d0;
}

.contact-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  border-left: 2px solid #000000;
  background: #faf8f3;
}

/* 统一滚动条（游戏内叠加式） */

.chat-messages,
.chat-replies,
.contact-panel,
.news-list,
.review-list,
.notepad-editor {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.chat-messages::-webkit-scrollbar,
.chat-replies::-webkit-scrollbar,
.contact-panel::-webkit-scrollbar,
.news-list::-webkit-scrollbar,
.review-list::-webkit-scrollbar,
.notepad-editor::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-replies::-webkit-scrollbar-track,
.contact-panel::-webkit-scrollbar-track,
.news-list::-webkit-scrollbar-track,
.review-list::-webkit-scrollbar-track,
.notepad-editor::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-replies::-webkit-scrollbar-thumb,
.contact-panel::-webkit-scrollbar-thumb,
.news-list::-webkit-scrollbar-thumb,
.review-list::-webkit-scrollbar-thumb,
.notepad-editor::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.contact-group {
  border-bottom: 1px solid #000000;
}

.contact-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #102a43;
  border: none;
  cursor: pointer;
}

.contact-option:hover {
  background: #14304a;
}

.option-arrow {
  font-size: 13px;
  transition: transform 0.3s;
}

.contact-option.open .option-arrow {
  transform: rotate(180deg);
}

.contact-list {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.contact-list.open {
  grid-template-rows: 1fr;
}

.contact-list-inner {
  overflow: hidden;
  min-height: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  text-align: left;
  color: #000000;
  background: #faf8f3;
  border: none;
  border-top: 1px solid #000000;
  cursor: pointer;
}

.contact-item:hover {
  background: #eae3d0;
}

.contact-item.active {
  background: #c49a5a;
  color: #ffffff;
}

.contact-empty {
  padding: 14px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.35);
  text-align: center;
  border-top: 1px solid #000000;
}

.list-empty {
  padding: 40px 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.contact-item .contact-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 头像 ===== */

.contact-avatar,
.chat-avatar,
.notify-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #000000;
  color: #ffffff;
  font-weight: 600;
  overflow: hidden;
}

.contact-avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.chat-avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.chat-avatar:empty {
  display: none;
}

.notify-avatar {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.contact-avatar img,
.chat-avatar img,
.notify-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 近期资讯页 ===== */

#page-news {
  align-items: stretch;
}

.news-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px 18px;
}

.news-card,
.review-card {
  width: 100%;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 10px;
  overflow: hidden;
}

.news-head,
.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.news-title {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  line-height: 1.4;
}

.news-text-wrap,
.review-text-wrap {
  font-size: 14px;
  max-height: 1.3em;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.news-text-wrap {
  position: relative;
  margin-top: 14px;
}

.news-card:not(.open) .news-text-wrap::after {
  content: '…';
  position: absolute;
  right: 0;
  bottom: 0;
  padding-left: 8px;
  background: #ffffff;
  color: #7a7a7a;
}

.news-card.open .news-text-wrap::after {
  content: none;
}

.news-text,
.review-text {
  font-size: 14px;
  color: #7a7a7a;
  line-height: 1.2;
  word-break: break-word;
  white-space: pre-wrap;
}

.news-text.clamped,
.review-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.news-line-body {
  text-align: justify;
  text-indent: 2em;
}

.news-line-subtitle,
.news-line-bullet,
.news-line-salutation {
  text-align: justify;
}

.news-line-sign {
  text-align: right;
}

.news-line-blank {
  height: 1.2em;
}

.news-line-attachment {
  cursor: pointer;
  color: inherit;
}

.news-line-attachment:hover {
  color: #1e63c7;
}

.news-arrow,
.review-arrow {
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 15px;
  color: #000000;
  transition: transform 0.3s;
}

.news-card.open .news-arrow,
.review-card.open .review-arrow {
  transform: rotate(180deg);
}

/* ===== 网络点评页 ===== */

#page-reviews {
  align-items: stretch;
}

.review-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px 18px;
}

.review-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
}

.review-stars svg {
  width: 18px;
  height: 18px;
  display: block;
}

.review-meta {
  font-size: 14px;
  color: #7a7a7a;
  line-height: 1.2;
}

.review-blank {
  height: 1.2em;
  font-size: 14px;
}

/* ===== 记事本页 ===== */

#page-notepad {
  align-items: stretch;
}

.notepad-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 16px 18px;
}

.notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #000000;
  margin-bottom: 12px;
}

.fmt-btn {
  width: 34px;
  height: 30px;
  font-size: 15px;
  color: #000000;
  background: #faf8f3;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 0.15s;
}

.fmt-btn:hover {
  background: #eae3d0;
}

.fmt-btn.active {
  background: #c49a5a;
  color: #ffffff;
}

.fmt-btn-italic {
  font-style: italic;
}

.fmt-btn-underline {
  text-decoration: underline;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid #000000;
}

.swatch {
  width: 20px;
  height: 20px;
  border: 1px solid #000000;
  cursor: pointer;
  transition: transform 0.1s;
}

.swatch:hover {
  transform: scale(1.15);
}

.notepad-editor {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #000000;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  outline: none;
  word-break: break-word;
}

.notepad-editor:focus {
  border-color: #c49a5a;
}

/* 滚动条覆盖式：出现滚动条时不压缩内容宽度（不支持的浏览器自动回落到 auto） */

.chat-messages,
.chat-replies,
.contact-panel,
.news-list,
.review-list,
.notepad-editor {
  overflow-y: overlay;
}

/* ===== 新消息提醒弹窗 ===== */

.notify-popup {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 20%;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 50;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.3s ease;
  cursor: pointer;
}

.notify-popup.show {
  transform: translateX(0);
}

.notify-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: #ffffff;
  color: #000000;
  border-bottom: 1px solid #eeeeee;
}

.notify-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e63c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  color: #000000;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.notify-close:hover {
  background: #f0f0f0;
}

.notify-body {
  padding: 6px 14px 16px;
}

.notify-text {
  font-size: 13px;
  color: #000000;
  line-height: 1.4;
  margin-top: 12px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notify-popup.locked .notify-close {
  display: none;
}

/* ===== 强制弹窗遮罩与引导箭头 ===== */

.notify-dim {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 49;
}

.notify-dim.show {
  display: block;
}

.notify-guide {
  display: none;
  position: fixed;
  z-index: 50;
  right: calc(20% + 30px);
  bottom: 90px;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.85);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.7));
  animation: guide-pulse 1.1s ease-in-out infinite;
}

.notify-guide svg {
  display: block;
}

.notify-guide.show {
  display: block;
}

.notify-guide.tab {
  right: calc(20% + 24px);
  top: 70px;
  bottom: auto;
  color: #000000;
  text-shadow: none;
  filter: none;
}

.notify-guide.staff {
  right: calc(20% + 24px);
  top: 118px;
  bottom: auto;
  color: #000000;
  text-shadow: none;
  filter: none;
}

/* ===== 内心 OS 浮层 ===== */

.os-overlay {
  position: fixed;
  left: 10%;
  right: 10%;
  top: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  color: #ffffff;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.os-overlay.show {
  opacity: 1;
  visibility: visible;
}

.os-text {
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1.5;
}

/* ===== 文件夹页 ===== */

.folder-grid {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  align-content: start;
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #000000;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
}

.folder-item:hover {
  background: #eae3d0;
}

.folder-item-icon {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #cccccc;
}

.folder-item-name {
  font-size: 13px;
  color: #000000;
  word-break: break-all;
}

/* ===== 图片查看器 ===== */

.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.image-viewer.show {
  opacity: 1;
  visibility: visible;
}

.image-viewer img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  background: #ffffff;
}

.image-viewer-close {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  cursor: pointer;
}

.image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== 下载提示 ===== */

.download-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000000;
  color: #ffffff;
  padding: 14px 24px;
  font-size: 16px;
  z-index: 75;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.download-toast.show {
  opacity: 1;
  visibility: visible;
}

/* ===== 每日结局黑屏 ===== */

.day-end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s, visibility 1.5s;
  pointer-events: none;
}

.day-end-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.day-end-lines {
  max-width: 80%;
  text-align: center;
}

.day-end-line {
  color: #ffffff;
  font-size: 26px;
  letter-spacing: 1px;
  line-height: 2;
  opacity: 0;
  transition: opacity 1.5s;
}

.day-end-line.show {
  opacity: 1;
}

.day-end-line.italic {
  font-style: italic;
}

/* ===== Day3 结束效果层（红边 + 雪花） ===== */

.day3-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #000000;
}

.day3-effect.show {
  opacity: 1;
  visibility: visible;
}

/* 画面闪烁层：全屏白色闪烁（黑底周期性变亮 = 画面闪烁） */
.day3-effect-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  animation: flash-pulse 0.6s steps(2) infinite;
}

@keyframes flash-pulse {
  0% { opacity: 0; }
  50% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* 静态红边（位于 flash 之上，不受闪烁影响） */
.day3-effect-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 220px 80px rgba(220, 0, 0, 0.85);
  background: radial-gradient(ellipse at center, rgba(160,0,0,0.35) 0%, rgba(0,0,0,0) 55%);
}

.day3-effect-vignette.hide {
  opacity: 0;
  visibility: hidden;
}

/* 雪花屏：Canvas 绘制（全屏、默认隐藏，snow-on 显示） */
.day3-effect-snow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.day3-effect-snow.snow-on {
  opacity: 1;
}

/* ===== Day3 eyes 图片（铺满） ===== */

.day3-eyes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 75;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.day3-eyes.show {
  opacity: 1;
  visibility: visible;
}

.day3-eyes img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 终局黑屏（登录后） ===== */

.terminal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s, visibility 1.5s;
  pointer-events: none;
}

.terminal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.terminal-back {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.terminal-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.terminal-lines {
  max-width: 80%;
  text-align: center;
}

.terminal-line {
  color: #ffffff;
  font-size: 26px;
  letter-spacing: 1px;
  line-height: 2;
  opacity: 0;
  transition: opacity 1.5s;
}

.terminal-line.show {
  opacity: 1;
}

@keyframes guide-pulse {
  0%, 100% { transform: translateX(0); opacity: 0.95; }
  50% { transform: translateX(12px); opacity: 0.45; }
}
/* ===== Day6 决战前夜：前往面板 ===== */
.day6-goto-box {
  width: 100%;
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.day6-goto-actions {
  display: none;
  gap: 18px;
  justify-content: center;
}

.day6-goto-btn {
  min-width: 140px;
  height: 44px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 4px;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.day6-goto-btn:hover {
  background: #ffffff;
  color: #000000;
}

.day6-goto-btn.day6-goto-back {
  color: #bbbbbb;
  border-color: #777777;
}

.day6-goto-btn.day6-goto-back:hover {
  background: #333333;
  color: #ffffff;
  border-color: #333333;
}

.day6-goto-note {
  display: none;
  color: #888888;
  font-size: 13px;
  letter-spacing: 1px;
}

/* ===== Day7 胜利结语 ===== */
#day7end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s, visibility 1.5s;
  pointer-events: none;
}
#day7end-overlay.show {
  opacity: 1;
  visibility: visible;
}
#day7end-lines {
  max-width: 80%;
  text-align: center;
}
.day7end-line {
  color: #ffffff;
  font-size: 26px;
  letter-spacing: 1px;
  line-height: 2;
  opacity: 0;
  transition: opacity 1.5s;
}
.day7end-line.show { opacity: 1; }
.day7end-line.italic { font-style: italic; }

#day7end-final {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.day7end-title {
  color: #ffffff;
  font-size: 30px;
  letter-spacing: 8px;
  opacity: 0;
  transition: opacity 1.5s;
}
.day7end-title.show { opacity: 1; }
.day7end-credits {
  margin-top: 28px;
  text-align: center;
  opacity: 0;
  transition: opacity 1.5s;
}
.day7end-credits.show { opacity: 1; }
.day7end-credits .final-or {
  display: block;
  color: #ff3333;
  font-style: italic;
  font-size: 28px;
  letter-spacing: 6px;
  animation: final-glitch 0.9s infinite steps(1);
}
.day7end-credits .final-to-be {
  display: block;
  color: #ff3333;
  font-style: italic;
  font-size: 20px;
  letter-spacing: 4px;
  margin-top: 10px;
  animation: final-glitch 0.9s infinite steps(1);
}
@keyframes final-glitch {
  0%, 88%, 94%, 100% { transform: translate(0, 0); text-shadow: none; }
  90% { transform: translate(-3px, 1px); text-shadow: 3px 0 0 rgba(255,60,60,.6); }
  92% { transform: translate(3px, -1px); text-shadow: -3px 0 0 rgba(80,160,255,.6); }
}

/* ===== 成就系统 ===== */
.achievement-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #4b2e83, #6a3fb5);
  border: 1px solid #8a5fd0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.3s ease;
  pointer-events: none;
}
.achievement-toast.show {
  transform: translateX(0);
}
.achievement-star {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: #ffd700;
}
.achievement-toast-name {
  font-size: 15px;
  letter-spacing: 1px;
}

.achievements-box {
  width: 640px;
  max-width: 90vw;
  margin: 24px auto;
  padding: 24px 28px;
  background: #faf8f3;
  border: 1px solid #d8d2c8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.achievements-title {
  text-align: center;
  font-size: 20px;
  letter-spacing: 4px;
  margin-bottom: 20px;
}
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.achievement-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #d8d2c8;
  background: #ffffff;
}
.achievement-banner .achievement-star {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: #c9c2b4;
}
.achievement-banner.unlocked .achievement-star {
  fill: #ffd700;
}
.achievement-banner .ach-name {
  flex: 0 0 160px;
  font-weight: bold;
  font-size: 15px;
}
.achievement-banner .ach-how {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #555555;
}
.achievement-banner.locked .ach-how {
  color: #999999;
}

/* ===== 首次启动 Intro ===== */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#intro-overlay.show { display: flex; }
#intro-post {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#intro-enter {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  min-width: 180px;
  height: 46px;
  padding: 0 30px;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 6px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #ffffff;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s;
}
#intro-enter:hover { background: rgba(255, 255, 255, 0.25); }
.intro-lines {
  max-width: 80%;
  text-align: center;
}
#intro-overlay.post-hidden #intro-post { display: none; }
#intro-overlay.post-hidden #intro-enter { display: none; }

/* 成就展示：去白底，条幅两行 + 右滚动条 */
.achievements-box {
  width: 640px;
  max-width: 90vw;
  margin: 24px auto;
  padding: 24px 28px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.achievements-title {
  text-align: center;
  font-size: 20px;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: #ffffff;
}
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.achievement-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.25);
}
.achievement-banner .ach-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.achievement-banner .achievement-star {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: #c9c2b4;
}
.achievement-banner.unlocked .achievement-star { fill: #ffd700; }
.achievement-banner .ach-name {
  font-weight: bold;
  font-size: 15px;
  color: #ffffff;
}
.achievement-banner .ach-how {
  font-size: 13px;
  color: #c9c9c9;
}
.achievement-banner.locked .ach-how { color: #777777; }

/* 成就列表滚动条：半透明黑色、无框 */
.achievements-list::-webkit-scrollbar {
  width: 8px;
}
.achievements-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.achievements-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.5);
  border: none;
}
.achievements-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ===== Day7 滚动报幕（胜利结语之后） ===== */
#day7end-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: none;
  pointer-events: none;
}
#day7end-scroll.active { display: block; }
#day7end-scroll-inner {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  text-align: center;
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 2.2;
  will-change: transform;
}

/* ===== 移动端拦截页 ===== */
#mobile-blocker {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0b2a52;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#mobile-blocker .mb-title {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  letter-spacing: 6px;
  margin-bottom: 26px;
}
#mobile-blocker .mb-main {
  color: #ffffff;
  font-size: 24px;
  letter-spacing: 4px;
  margin-bottom: 14px;
}
#mobile-blocker .mb-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  letter-spacing: 2px;
}
