/* 锦鲤小镇 · 全局公共样式 */
:root {
  /* 页面底色与面板 */
  --paper: #efebe0;
  --cream: #faf5ea;
  --surface: #f7efd9;
  --surface-2: #fffaf0;
  --surface-3: #f3ecd9;
  --surface-input: #fffdf5;
  --line: #d8cbb0;
  --line-2: #e2d5b8;
  --topbar: rgba(239, 235, 224, 0.94);
  --overlay: rgba(250, 245, 234, 0.9);
  --scrim: rgba(80, 64, 46, 0.4);

  /* 文字 */
  --ink: #4b4136;
  --brown: #5c4a3a;
  --muted: #9b8766;
  --muted-2: #8a6a4f;
  --accent-ink: #7a5c42;
  --accent-red: #b5543c;
  --danger: #b4453a;
  --danger-bg: #fde8e4;
  --danger-line: #f0b9ae;
  --link: #4e86c6;

  /* 点缀色 */
  --wood: #c9a678;
  --wood-dark: #9c7a52;
  --red: #d96c4e;
  --pink: #e89a8e;
  --sky: #e3dccd;
  --grass: #a9c48a;
  --gold: #e8b45c;
}

/* 18:00 - 06:00 的夜晚主题（由 js/theme.js 按本地时间切换） */
:root[data-theme="dark"] {
  --paper: #1e1b17;
  --cream: #2a2621;
  --surface: #26221d;
  --surface-2: #2e2923;
  --surface-3: #332d27;
  --surface-input: #211d19;
  --line: #443c33;
  --line-2: #51483d;
  --topbar: rgba(30, 27, 23, 0.94);
  --overlay: rgba(38, 34, 28, 0.94);
  --scrim: rgba(0, 0, 0, 0.58);

  --ink: #ece3d2;
  --brown: #e6d8c0;
  --muted: #a2937d;
  --muted-2: #c6b39a;
  --accent-ink: #cdbba0;
  --accent-red: #e08a70;
  --danger: #ef8a74;
  --danger-bg: #3a2620;
  --danger-line: #6b3a30;
  --link: #8ab4f8;

  --wood: #a98a63;
  --wood-dark: #8a6f4c;
  --red: #e0785b;
  --pink: #e89a8e;
  --sky: #2a2620;
  --grass: #7f9a63;
  --gold: #e8b45c;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  transition: background 0.5s ease, color 0.5s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

.btn {
  border: 3px solid var(--brown);
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  letter-spacing: 2px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--brown);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.08);
}

/* 提示气泡 */
#toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 页脚 · ICP 备案信息（备案通过后把“待备案”替换成备案号） */
.icp {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  border-bottom: 1px dotted var(--muted);
  transition: color 0.2s ease;
}

.icp:hover {
  color: var(--brown);
}

.auth-icp {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  z-index: 3;
}
/* —— 背景音乐：被浏览器拦截时的小浮标 —— */
.bgm-pill {
  position: fixed;
  left: 16px;
  top: 78px;
  z-index: 70;
  padding: 9px 14px;
  border: 2px solid var(--line-2, var(--line));
  border-radius: 999px;
  background: var(--paper, #fff);
  color: var(--ink, #4a3b2a);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.bgm-pill:hover {
  border-color: var(--wood, #c08a58);
}