@property --gv-bg-top {
  syntax: '<color>';
  inherits: true;
  initial-value: #fff8f1;
}

@property --gv-bg-bottom {
  syntax: '<color>';
  inherits: true;
  initial-value: #f2decb;
}

:root {
  --bg: #f3efe7;
  --bg-accent: radial-gradient(circle at top left, rgba(196, 151, 86, 0.28), transparent 34%), radial-gradient(circle at right 20%, rgba(66, 112, 132, 0.18), transparent 28%), linear-gradient(180deg, #fbf7ef 0%, #efe7d8 100%);
  --card: rgba(255, 251, 245, 0.94);
  --card-strong: #fffdf9;
  --line: rgba(117, 91, 58, 0.18);
  --text: #2d241b;
  --brand-strong: #6f4218;
  --shadow: 0 18px 48px rgba(70, 49, 26, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --scroll-track: #efe8de;
  --scroll-thumb: #8f8f8f;
  --scroll-thumb-hover: #757575;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html {
  background: var(--bg-accent) fixed no-repeat;
  background-size: 100vw 100vh;
}
body.new-body {
  margin: 0;
  color: var(--text);
  background: var(--bg-accent) fixed no-repeat;
  background-size: 100vw 100vh;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}
body.new-body.gv-theme-beforegame,
body.new-body.gv-theme-day,
body.new-body.gv-theme-night,
body.new-body.gv-theme-aftergame {
  transition: --gv-bg-top 2s ease, --gv-bg-bottom 2s ease, background-color 2s ease;
  background: linear-gradient(180deg, var(--gv-bg-top) 0%, var(--gv-bg-bottom) 100%) fixed no-repeat !important;
  background-size: 100vw 100vh;
}
body.new-body.gv-theme-beforegame {
  --gv-bg-top: #fff8f1;
  --gv-bg-bottom: #f2decb;
  --gv-surface: #f8f1e5;
  --gv-surface-soft: #fffaf2;
  --gv-surface-strong: #fffefb;
  --gv-border: #d7cab8;
  --gv-row-border: #e9ddc8;
  --gv-system-bg: #efefef;
  --gv-text-main: #2d241b;
  --gv-text-sub: #5d4a34;
  --gv-highlight: #fff3b8;
}
body.new-body.gv-theme-day {
  --gv-bg-top: #fffdf7;
  --gv-bg-bottom: #f3e7d6;
  --gv-surface: #f8f1e5;
  --gv-surface-soft: #fffaf2;
  --gv-surface-strong: #fffefb;
  --gv-border: #d7cab8;
  --gv-row-border: #e9ddc8;
  --gv-system-bg: #efefef;
  --gv-text-main: #2d241b;
  --gv-text-sub: #5d4a34;
  --gv-highlight: #fff3b8;
}
body.new-body.gv-theme-night {
  --gv-bg-top: #111943;
  --gv-bg-bottom: #000030;
  --gv-surface: #12193a;
  --gv-surface-soft: #1a2452;
  --gv-surface-strong: #1f2b63;
  --gv-border: #4a568f;
  --gv-row-border: #3e4a7e;
  --gv-system-bg: #2a335f;
  --gv-text-main: #f7f7ff;
  --gv-text-sub: #d8dcff;
  --gv-highlight: #384175;
  --gv-link-night: #6fd3ff;
  --gv-link-night-strong: #a9e8ff;
}
body.new-body.gv-theme-night .status-text {
  color: #FFFFFF;
}
body.new-body.gv-theme-aftergame {
  --gv-bg-top: #f4f8ff;
  --gv-bg-bottom: #dce9fb;
  --gv-surface: #e9f2ff;
  --gv-surface-soft: #f3f8ff;
  --gv-surface-strong: #ffffff;
  --gv-border: #c6d6ed;
  --gv-row-border: #d7e4f5;
  --gv-system-bg: #dde7f6;
  --gv-text-main: #1f2a3a;
  --gv-text-sub: #43536b;
  --gv-highlight: #fff3b8;
}
body.new-body.gv-theme-night .game-view-page .gv-talk-log,
body.new-body.gv-theme-night .game-view-page .gv-talk-log .gv-talk-row:not(.is-system),
body.new-body.gv-theme-night .game-view-page .gv-talk-log .gv-talk-meta,
body.new-body.gv-theme-night .game-view-page .gv-talk-log .gv-talk-body {
  color: snow;
}
body.new-body.gv-theme-night .game-view-page .gv-talk-row a,
body.new-body.gv-theme-night .game-view-page .gv-talk-row a:hover,
body.new-body.gv-theme-night .game-view-page .gv-talk-row a:focus,
body.new-body.gv-theme-night .game-view-page .gv-talk-row a:active,
body.new-body.gv-theme-night .game-view-page .gv-talk-row a:visited {
  color: var(--gv-link-night) !important;
}
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system .gv-talk-meta,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system .gv-talk-body,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system a,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system a:hover,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system a:focus,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system a:active,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.is-system a:visited {
  color: #000000 !important;
}
body.new-body.gv-theme-night .game-view-page .gv-talk-row.gv-talk-gm-bc .gv-talk-meta,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.gv-talk-gm-bc .gv-talk-body.gv-talk-gm-bc-body {
  color: #c30000 !important;
}
body.new-body.gv-theme-night .game-view-page .gv-talk-row.gv-talk-gm-bc-heaven,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.gv-talk-gm-bc-heaven .gv-talk-meta,
body.new-body.gv-theme-night .game-view-page .gv-talk-row.gv-talk-gm-bc-heaven .gv-talk-body {
  background: #cccccc !important;
  color: #000000 !important;
}
body.new-body.gv-theme-night .game-view-page .gv-player-trip-line .trip-link,
body.new-body.gv-theme-night .game-view-page .gv-player-trip-line .trip-link:hover,
body.new-body.gv-theme-night .game-view-page .gv-player-trip-line .trip-link:focus,
body.new-body.gv-theme-night .game-view-page .gv-player-trip-line .trip-link:active,
body.new-body.gv-theme-night .game-view-page .gv-player-trip-line .trip-link:visited {
  color: var(--gv-link-night-strong) !important;
}
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn,
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn:hover,
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn:focus,
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn:active,
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn:visited {
  color: #d8dcff;
}
body.new-body.gv-theme-night .game-view-page .gv-player-mode-btn.is-active {
  color: #ffffff;
}
* {
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}
*::-webkit-scrollbar-button {
  background: var(--scroll-track);
}
body.new-body a:not(.new-nav-link):not(.gv-pill-link):not(.um-back-pill):not(.log-option-link),
body.new-body a:not(.new-nav-link):not(.gv-pill-link):not(.um-back-pill):not(.log-option-link):hover,
body.new-body a:not(.new-nav-link):not(.gv-pill-link):not(.um-back-pill):not(.log-option-link):focus,
body.new-body a:not(.new-nav-link):not(.gv-pill-link):not(.um-back-pill):not(.log-option-link):active,
body.new-body a:not(.new-nav-link):not(.gv-pill-link):not(.um-back-pill):not(.log-option-link):visited {
  background: none !important;
  text-decoration: none;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8753b;
  border-radius: 999px;
  padding: 0 12px;
  min-width: 40px;
  min-height: 34px;
  height: auto;
  background: linear-gradient(180deg, #cc8a48 0%, #bf7837 100%);
  color: #fffdf7;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.26), inset 0 1px 0 rgba(255, 237, 214, 0.2);
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  filter: brightness(1.05);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.28), inset 0 1px 0 rgba(255, 237, 214, 0.18);
}
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.22);
}

.new-shell {
  width: min(1220px, calc(100% - 24px));
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.new-main {
  flex: 1 1 auto;
  overflow: auto;
}
.new-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.82);
  box-shadow: var(--shadow);
}
.new-brand-link { text-decoration: none; display: inline-flex; }
.new-brand-image { display: block; max-width: min(100%, 300px); width: 100%; height: auto; }
.new-status { text-align: right; }
.new-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 16px 0 18px;
  min-height: 38px;
  padding: 2px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}
.new-nav-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 12px;
  min-height: 34px;
  height: auto;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none !important;
  border: 1px solid #b8753b;
  border-radius: 999px;
  background: linear-gradient(180deg, #cc8a48 0%, #bf7837 100%) !important;
  color: #fffdf7 !important;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.26), inset 0 1px 0 rgba(255, 237, 214, 0.2);
}
.new-nav-link:hover,
.new-nav-link:focus,
.new-nav-link:active,
.new-nav-link:visited {
  background: linear-gradient(180deg, #cc8a48 0%, #bf7837 100%) !important;
  color: #fffdf7 !important;
  text-decoration: none !important;
}
.new-nav-link:hover {
  filter: brightness(1.05);
}
.new-nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.28), inset 0 1px 0 rgba(255, 237, 214, 0.18);
}
.new-nav-link.is-active {
  outline: 2px solid rgba(111, 66, 24, 0.2);
  outline-offset: 0;
}
.new-content-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.section-card { padding: 10px; }
.iframe-wrap {
  border: 1px solid #d7cab8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.section-frame {
  display: block;
  width: 100%;
  min-height: 76vh;
  border: 0;
}
#indexhi { display: grid; gap: 18px; }
fieldset {
  margin: 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
}
legend { padding: 0 10px; color: var(--brand-strong); font-weight: 800; }

.script-warning { color: #cb1212; font-size: 18px; font-weight: 700; }
.error-text { color: #cb1212; font-weight: 700; }

.room-table { border: 1px solid #a99984; }
.new-tag-tr {
  display: grid;
  grid-template-columns: 80px 80px 1.2fr 2fr 60px;
  border-bottom: 1px solid #d7cab8;
}
.new-tag-tr:last-child { border-bottom: 0; }
.new-tag-th, .new-tag-td { padding: 8px 6px; border-right: 1px solid #d7cab8; word-break: break-word; }
.new-tag-th:last-child, .new-tag-td:last-child { border-right: 0; }
.room-head { background: #f4ebdf; font-weight: 700; }
.option-icon-row { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; align-items: center; }
.option-icon { width: 16px; height: 16px; image-rendering: auto; }

.create-room-form {
  display: grid;
  gap: 14px;
}
.create-room-form .create-form-table {
  display: grid;
  gap: 0;
  border: 1px solid #d9c6ab;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdfa 0%, #f8efe0 100%);
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.create-room-form .create-form-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px 6px;
  border-bottom: 1px dashed #e7d7c2;
}
.create-room-form .create-form-row:last-child { border-bottom: 0; }
.create-room-form .create-form-label {
  font-weight: 700;
  color: #6a411a;
  letter-spacing: 0.2px;
}
.create-room-form .create-form-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.create-room-form .create-form-row > div:last-child > br {
  display: none;
}
.create-room-form .create-form-row > div.dummy-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.create-room-form .create-form-row input[type="text"],
.create-room-form .create-form-row select,
.create-room-form .create-form-row textarea {
  border: 1px solid #c7af8e;
  border-radius: 10px;
  background: #fffdf9;
  min-height: 32px;
  padding: 6px 10px;
  box-shadow: inset 0 1px 2px rgba(102, 61, 26, 0.08);
}
.create-room-form .create-form-row textarea {
  min-height: 92px;
  width: min(100%, 400px);
}
.create-room-form .create-form-row input[name="room_name"],
.create-room-form .create-form-row input[name="room_comment"] {
  width: min(100%, 400px);
}
.create-room-form .create-form-row input[name="dummy_name"] {
  width: 180px;
}
.create-room-form .create-form-row > div:last-child.room-name-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}


.create-room-form .create-form-row .room-name-inline input[name="room_name"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 400px;
}
.create-room-form .create-form-row .room-name-inline .room-name-suffix {
  white-space: nowrap;
}
.create-room-form .create-form-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
  accent-color: #b9753b;
}
.create-room-form .create-form-row small {
  color: #6b5743;
  line-height: 1.45;
}
.create-form-section-title {
  margin: 4px 2px 0;
  padding: 4px 2px;
  color: #73451d;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.create-form-submit-row {
  justify-content: flex-end;
  padding-top: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  border: 1px solid #c7af8e;
  border-radius: 10px;
  background: #fffdf9;
  min-height: 32px;
  padding: 6px 10px;
  box-shadow: inset 0 1px 2px rgba(102, 61, 26, 0.08);
  color: #1f1f1f;
  max-width: 100%;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
  accent-color: #b9753b;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #b8814d;
  box-shadow: 0 0 0 2px rgba(191, 120, 55, 0.18), inset 0 1px 2px rgba(102, 61, 26, 0.08);
  outline: 0;
}
textarea { width: min(100%, 420px); }
.dummy-box { padding-top: 6px; }

h3 { margin: 16px 0 8px; color: #4f3a20; }
.submit-row { display: flex; justify-content: center; padding-top: 16px; }


.union-server-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.union-server-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.union-server-item a {
  color: #2b4f78;
}

body.new-body[data-wrapper-page="system_features"] #indexhi a,
body.new-body[data-wrapper-page="system_features"] #indexhi a:hover,
body.new-body[data-wrapper-page="system_features"] #indexhi a:focus,
body.new-body[data-wrapper-page="system_features"] #indexhi a:active,
body.new-body[data-wrapper-page="system_features"] #indexhi a:visited,
body.new-body[data-wrapper-page="log_viewer"] #indexhi a,
body.new-body[data-wrapper-page="log_viewer"] #indexhi a:hover,
body.new-body[data-wrapper-page="log_viewer"] #indexhi a:focus,
body.new-body[data-wrapper-page="log_viewer"] #indexhi a:active,
body.new-body[data-wrapper-page="log_viewer"] #indexhi a:visited,
body.new-body[data-wrapper-page="werewolf_bbs"] #indexhi a,
body.new-body[data-wrapper-page="werewolf_bbs"] #indexhi a:hover,
body.new-body[data-wrapper-page="werewolf_bbs"] #indexhi a:focus,
body.new-body[data-wrapper-page="werewolf_bbs"] #indexhi a:active,
body.new-body[data-wrapper-page="werewolf_bbs"] #indexhi a:visited,
body.new-body[data-wrapper-page="identity_login"] #indexhi a,
body.new-body[data-wrapper-page="identity_login"] #indexhi a:hover,
body.new-body[data-wrapper-page="identity_login"] #indexhi a:focus,
body.new-body[data-wrapper-page="identity_login"] #indexhi a:active,
body.new-body[data-wrapper-page="identity_login"] #indexhi a:visited,
body.new-body[data-wrapper-page="freeze_system"] #indexhi a,
body.new-body[data-wrapper-page="freeze_system"] #indexhi a:hover,
body.new-body[data-wrapper-page="freeze_system"] #indexhi a:focus,
body.new-body[data-wrapper-page="freeze_system"] #indexhi a:active,
body.new-body[data-wrapper-page="freeze_system"] #indexhi a:visited {
  display: inline !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  color: revert !important;
  text-decoration: none !important;
  font-weight: 400 !important;
  transform: none !important;
  filter: none !important;
}
body.new-body[data-wrapper-page="werewolf_bbs"] .legacy-action-links a,
body.new-body[data-wrapper-page="identity_login"] .legacy-action-links a,
body.new-body[data-wrapper-page="freeze_system"] .legacy-action-links a {
  margin-right: 8px;
}

@media (max-width: 920px) {
  .new-shell { width: min(1220px, calc(100% - 14px)); }
  .new-topbar { flex-direction: column; align-items: flex-start; }
  .new-status { text-align: left; }
  .new-nav {
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch;
    overflow: visible;
    white-space: normal;
    min-height: 0;
    row-gap: 6px;
  }
  .new-nav-link {
    flex: 0 1 auto;
  }
  .new-content-card,
  #indexhi,
  fieldset {
    min-width: 0;
    max-width: 100%;
  }
  .new-tag-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
  .new-tag-tr {
    min-width: 640px;
    grid-template-columns: 70px 62px 1fr 1fr 50px;
    font-size: 14px;
  }
  .legacy-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
  .legacy-row {
    min-width: 420px;
  }
  body.new-body[data-wrapper-page="log_viewer"] .log-room-table .legacy-row {
    min-width: 690px;
  }
  body.new-body[data-wrapper-page="werewolf_bbs"] .legacy-table .legacy-row {
    min-width: 620px;
  }
  body.new-body[data-wrapper-page="identity_login"] .legacy-table .legacy-row,
  body.new-body[data-wrapper-page="freeze_system"] .legacy-table .legacy-row {
    min-width: 0;
  }
  .legacy-form-list {
    max-width: 100%;
  }
  .create-room-form .create-form-table {
    padding: 8px;
  }
  .create-room-form .create-form-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 4px;
  }
  .create-room-form .create-form-row input[name="room_name"],
  .create-room-form .create-form-row input[name="room_comment"],
  .create-room-form .create-form-row textarea {
    width: 100%;
  }
  .create-form-section-title {
    font-size: 16px;
  }
  .create-form-submit-row {
    justify-content: center;
  }
  .section-frame { min-height: 72vh; }
}

.emot-table-wrap {
  padding: 0 100px;
}
.emot-table {
  list-style: none;
  margin: 0;
  padding: 0;
}
.emot-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e7dece;
  min-height: 44px;
}
.emot-row:last-child {
  border-bottom: 0;
}
.emot-row .title,
.emot-row .dlist {
  display: inline-block;
  padding: 6px 4px;
}
.emot-col-no {
  width: 50px;
}
.emot-col-icon {
  width: 420px;
  overflow-x: auto;
  white-space: nowrap;
}
.emot-col-code {
  width: 70px;
}
.emot-col-empty {
  width: 100%;
}

@media (max-width: 920px) {
  .emot-table-wrap {
    padding: 0;
    max-width: 100%;
    overflow-x: auto;
  }
  .emot-row {
    align-items: flex-start;
  }
  .emot-col-no {
    width: 44px;
  }
  .emot-col-icon {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .emot-col-code {
    width: 56px;
  }
}
.stats-filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.stats-filter-links .is-active {
  font-weight: 700;
  color: #6f4218;
}
.stats-room-block {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed #d7cab8;
}
.stats-room-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.stats-victory-title {
  margin-top: 10px;
}
.stats-pattern-list {
  padding-left: 10px;
}
.stats-update-time {
  margin-top: 4px;
  color: #6d5b49;
  font-size: 13px;
}

.legacy-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.legacy-form-list {
  display: grid;
  gap: 10px;
  max-width: 700px;
}

.legacy-form-list label {
  display: grid;
  gap: 4px;
}

.legacy-form-list input,
.legacy-form-list textarea,
.legacy-form-list select {
  width: 100%;
  min-width: 0;
}

.pager {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 16px 0;
  text-align: center;
}

.legacy-table {
  display: grid;
  border: 1px solid #d7cab8;
  margin-top: 10px;
}

.legacy-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  border-bottom: 1px solid #e6dccd;
}
.legacy-row:has(> div:nth-child(1):last-child) {
  grid-template-columns: minmax(0, 1fr);
}
.legacy-row:has(> div:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(70px, 1fr));
}
.legacy-row:has(> div:nth-child(3):last-child) {
  grid-template-columns: 80px 130px minmax(0, 1fr);
}
.legacy-row:has(> div:nth-child(4):last-child) {
  grid-template-columns: 80px 130px 60px minmax(0, 1fr);
}
.legacy-row:has(> div:nth-child(4):last-child) > div:nth-child(-n+3) {
  text-align: center;
}
.legacy-row:has(> div:nth-child(5):last-child) {
  grid-template-columns: repeat(5, minmax(70px, 1fr));
}
.legacy-row:has(> div:nth-child(6):last-child) {
  grid-template-columns: repeat(6, minmax(70px, 1fr));
}

.legacy-row > div {
  padding: 6px;
  border-right: 1px solid #e6dccd;
  word-break: break-word;
}

.legacy-row > div:last-child {
  border-right: 0;
}

.legacy-row.head {
  font-weight: 700;
  background: #f4ebdf;
}

.pager {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pager-current {
  font-weight: 700;
}

.bbs-topic,
.bbs-reply {
  border: 1px solid #decfb9;
  background: #fffefb;
  padding: 10px;
  margin-top: 10px;
}

.bbs-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.bbs-meta {
  color: #634c2e;
  font-size: 13px;
}

.bbs-content {
  margin-top: 8px;
  white-space: pre-wrap;
}

.bbs-time {
  margin-top: 8px;
  color: #6d5b49;
  font-size: 13px;
}

.version-history-content {
  overflow-x: auto;
}

.script-info-card {
  background: rgba(255, 255, 255, 0.9);
}

.script-info-page {
  color: #222;
  font-size: 14px;
  line-height: 1.45;
}

.script-info-table {
  width: 100%;
  border-collapse: collapse;
}

.script-info-table td {
  padding: 2px 0;
  vertical-align: top;
}

.script-info-page input[name="difftime_output"] {
  margin-top: 8px;
  width: min(100%, 320px);
}

@media (max-width: 920px) {
  .script-info-page {
    font-size: 13px;
  }
}

/* ===== rule page ===== */

.rule-page-card {
  background: var(--card);
}

.rule-page-body {
  gap: 10px;
}

.rule-page-body table {
  max-width: 100%;
}

.rule-page-body img {
  max-width: 100%;
  height: auto;
}

.rule-page-body td,
.rule-page-body th {
  word-break: break-word;
}

.village-room-meta,
.village-tip-list,
.village-login-form,
.gv-room-info,
.gv-player-list,
.gv-talk-log {
  display: grid;
  gap: 6px;
}
.village-form-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #eadfce;
}
.village-form-row:last-child { border-bottom: 0; }
.village-form-label { font-weight: 700; }
.village-form-row small { display: block; color: #5d4a34; margin-top: 3px; font-size: 12px; }
.um-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.um-role-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-text { color: #000000; font-weight: 700; }

.user-manager-page .um-back-link {
  margin-bottom: 8px;
}
.user-manager-page .um-back-pill,
.user-manager-page .um-back-pill:hover,
.user-manager-page .um-back-pill:focus,
.user-manager-page .um-back-pill:active,
.user-manager-page .um-back-pill:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8753b;
  border-radius: 999px;
  padding: 0 12px;
  min-height: 34px;
  background: linear-gradient(180deg, #cc8a48 0%, #bf7837 100%) !important;
  color: #fffdf7 !important;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.26), inset 0 1px 0 rgba(255, 237, 214, 0.2);
}
.user-manager-page .um-back-pill:hover {
  filter: brightness(1.05);
}
.user-manager-page .um-back-pill:active {
  transform: translateY(1px);
}
.user-manager-page .um-main-frame {
  border: 1px solid #d7cab8;
  border-radius: 12px;
  background: #f8f1e5;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.user-manager-page .um-title-block {
  text-align: left;
  font-weight: 700;
  font-size: 22px;
  color: #4b2e14;
}
.user-manager-page .um-room-fieldset,
.user-manager-page .um-login-fieldset {
  margin: 0;
  border-color: #d7cab8;
  background: #fffefb;
}
.user-manager-page .um-room-fieldset > legend,
.user-manager-page .um-login-fieldset > legend {
  color: #6f4218;
}
.user-manager-page .um-room-name {
  font-weight: 700;
  font-size: 18px;
}
.user-manager-page .um-room-meta {
  margin-top: 2px;
  font-size: 13px;
  color: #6d5b49;
}
.user-manager-page .um-room-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
}
.user-manager-page .um-alert-stack {
  display: grid;
  gap: 6px;
}
.user-manager-page .um-pagination-wrap {
  margin-top: 8px;
}
.user-manager-page .um-footer-links {
  font-size: 13px;
}
.user-manager-page .um-icon-paging {
  margin-bottom: 8px;
}
.user-manager-page .um-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.user-manager-page .um-icon-item {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: start;
  border: 1px dashed #cfbda5;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.35);
}
.user-manager-page .um-icon-item img {
  border: 2px solid #ddd;
  max-width: 100%;
  height: auto;
}
.user-manager-page .um-icon-item span {
  font-size: 12px;
  text-align: center;
}
.user-manager-page .village-login-form input[type="text"],
.user-manager-page .village-login-form input[type="password"],
.user-manager-page .village-login-form select {
  width: 100%;
}
.user-manager-page .village-login-form .submit-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.user-manager-page .village-login-form .submit-row button {
  min-height: 36px;
  padding-inline: 14px;
}
.user-manager-page .um-role-options small {
  flex: 1 0 100%;
}

.gv-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 0;
}
.gv-entry-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.gv-entry-status-wrap {
  min-width: 0;
}
.gv-entry-status-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gv-inline-action-form {
  margin: 0;
}
.gv-entry-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gv-login-inline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gv-login-inline-wrap label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gv-main-grid {
  display: grid;
  grid-template-columns: minmax(240px, 32%) minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
  flex: 1 1 auto;
  min-height: 0;
}
.gv-left-panel,
.gv-right-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}
.gv-left-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.gv-left-panel > fieldset:first-child {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.gv-left-panel > fieldset:last-child {
  flex: 0 0 auto;
}
.gv-right-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.gv-right-panel > fieldset:first-child {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.gv-main-grid fieldset {
  min-width: 0;
}
.gv-left-panel .log-player-table {
  display: block;
  overflow-x: auto;
}
.gv-left-panel .log-player-table .legacy-row {
  min-width: 18em;
}
.game-view-page #playerList > .legacy-table {
  margin-top: 0;
}
.game-view-page #playerList {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}
body.new-body .game-view-page {
  background: var(--gv-surface);
  color: var(--gv-text-main);
}
body.new-body .game-view-page fieldset {
  background: var(--gv-surface-soft);
  border-color: var(--gv-border);
}
body.new-body .game-view-page fieldset > legend {
  background: var(--gv-surface-strong);
  color: var(--gv-text-main);
  display: inline-block;
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--gv-surface);
}
body.new-body .game-view-page .gv-room-info,
body.new-body .game-view-page .gv-player-list,
body.new-body .game-view-page .gv-talk-log,
body.new-body .game-view-page .gv-talk-form,
body.new-body .game-view-page .gv-talk-form-mobile-detached {
  background: var(--gv-surface-strong);
  color: var(--gv-text-main);
  border-color: var(--gv-border);
}
body.new-body .game-view-page .gv-talk-row {
  border-bottom-color: var(--gv-row-border);
}
body.new-body .game-view-page .gv-talk-row.is-system {
  background: var(--gv-system-bg);
}
body.new-body .game-view-page .gv-talk-meta,
body.new-body .game-view-page .gv-talk-shortcut-hint,
body.new-body .game-view-page .gv-talk-send-status,
body.new-body .game-view-page .gv-player-role-line,
body.new-body .game-view-page .gv-player-special-line {
  color: var(--gv-text-sub);
}
body.new-body .game-view-page .gv-player-list-simple,
body.new-body .game-view-page .gv-player-item,
body.new-body .game-view-page .gv-player-avatar-fallback {
  background: var(--gv-surface-strong);
  border-color: var(--gv-border);
  color: var(--gv-text-main);
}
body.new-body .game-view-page .gv-player-item-selectable:hover {
  background: #d4f0d4;
  border-color: #5cb85c;
}
body.new-body .game-view-page .gv-player-item.is-selected {
  background: #b2e2b2;
  border-color: #3a9a3a;
  outline: 2px solid #3a9a3a;
}
body.new-body .game-view-page input[type="text"],
body.new-body .game-view-page input[type="password"],
body.new-body .game-view-page select,
body.new-body .game-view-page textarea {
  background: var(--gv-surface-strong);
  color: var(--gv-text-main);
  border-color: var(--gv-border);
}
.gv-player-list-simple {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 58px;
  gap: 2px;
  border: 1px solid #d7cab8;
  border-width: 1px;
  background: #fff;
  padding: 6px;
}
.gv-player-list-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 62px;
}
.gv-player-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid #e6dccd;
  border-width: 1px;
  background: #fffefb;
  min-height: 58px;
  height: 100%;
  overflow: hidden;
}
.gv-player-item-selectable {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.gv-player-item-unselectable {
  opacity: 0.55;
  filter: grayscale(80%);
  cursor: not-allowed;
  pointer-events: none;
  background: #f3f1ee;
  border-color: #cec4b7;
}
.gv-player-item-unselectable .gv-player-name-text,
.gv-player-item-unselectable .gv-player-name-line,
.gv-player-item-unselectable .gv-player-trip-line,
.gv-player-item-unselectable .gv-player-role-line {
  color: var(--gv-text-sub);
}
.gv-player-item-compact {
  justify-content: center;
  padding: 4px;
}
.gv-player-item-compact .log-player-avatar {
  margin: 0 auto;
}
.gv-player-avatar-fallback {
  width: 45px;
  height: 45px;
  border: 1px solid #d7cab8;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2e7d8;
  color: #5f4a33;
  font-weight: 700;
  font-size: 16px;
}
.gv-player-item .log-player-name-text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
}
.gv-player-name-line,
.gv-player-trip-line,
.gv-player-role-line,
.gv-player-special-line {
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.gv-player-name-line {
  font-weight: 700;
  font-size: 13px;
}
.gv-player-trip-line {
  font-size: 13px;
}
.gv-player-role-line,
.gv-player-special-line {
  font-size: 12px;
  color: #5f4a33;
}
body.new-body .game-view-page .gv-player-role-line.gv-player-role-human { color: #5f4a33; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-wolf { color: #ff0000; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-mage { color: #9933ff; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-necromancer { color: #009900; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-mad { color: #ff0000; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-common { color: #cc9966; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-guard { color: #3399ff; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-fox { color: #cc0099; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-fosi { color: #cc0099; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-betr { color: #cc0099; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-poison { color: #006633; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-cat { color: #006633; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-mytho { color: #ff8000; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-owlman {
  color: #000080;
  background-color: #ffffff;
  border-radius: 2px;
  padding: 0 2px;
}
body.new-body .game-view-page .gv-player-role-line.gv-player-role-pengu { color: #ff9933; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-spy { color: #ff0000; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-gm { color: #ff8000; }
body.new-body .game-view-page .gv-player-role-line.gv-player-role-unknown { color: #5f4a33; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfbig { color: #ff0000; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfwtr {
  color: #ccffff;
  background-color: #000000;
  border-radius: 2px;
  padding: 0 2px;
}
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfasm { color: #ff3000; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfbsk { color: #d00000; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfwnd { color: #83b0e8; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfwnd-final { color: #c0e0ff; font-weight: bold; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-wfxwnd { color: #83b0e8; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-lovers { color: #ff80ff; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-authority { color: #999999; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-decide { color: #999999; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-mytho-tr { color: #ff8000; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-noble { color: #5f4a33; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-slave { color: #5f4a33; }
body.new-body .game-view-page .gv-player-special-line .gv-player-special-unknown { color: #5f4a33; }
.gv-player-trip-line .trip-link,
.gv-player-trip-line .trip-link:hover,
.gv-player-trip-line .trip-link:focus,
.gv-player-trip-line .trip-link:active,
.gv-player-trip-line .trip-link:visited {
  color: revert;
  text-decoration: none;
}
.gv-player-mark {
  margin-right: 2px;
}
.gv-player-status-line {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.game-view-page #talkLog {
  margin-top: 0;
}
.gv-player-row {
  display: grid;
  grid-template-columns: 40px 1fr 70px;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed #eadfce;
}
.gv-player-row.is-dead { color: #8a8a8a; }
.gv-talk-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-auto-rows: max-content;
  border: 1px solid #d7cab8;
  padding: 8px;
  background: #fff;
}
.gv-talk-row { border-bottom: 1px dashed #e9ddc8; padding: 6px 0; }
.gv-talk-row.is-system {
  background: #efefef;
}
.gv-talk-row.gv-talk-gm-bc .gv-talk-meta {
  color: #c30000;
}
.gv-talk-row .gv-talk-body.gv-talk-gm-bc-body {
  color: #c30000;
  text-decoration: underline;
}
.gv-talk-row.gv-talk-heaven {
  background: #cccccc;
  color: #555555;
}
.gv-talk-row.gv-talk-heaven .gv-talk-meta {
  color: #666666;
}
.gv-talk-row.gv-talk-gm-bc-heaven {
  background: #cccccc;
}
.gv-talk-row.gv-talk-gm-bc-heaven .gv-talk-meta {
  color: #000000;
}
.gv-talk-row.is-system .gv-talk-meta {
  color: inherit;
}
.gv-talk-meta { font-size: 12px; color: #5d4a34; }
.gv-talk-body {
  line-height: 1.6;
}
.gv-talk-size-weak {
  font-size: 8pt;
}
.gv-talk-size-normal {
  font-size: 12pt;
}
.gv-talk-size-strong {
  font-size: 20pt;
}
.gv-talk-weight-bold {
  font-weight: bolder;
}
.gv-talk-weight-strong {
  font-weight: bold;
}
.gv-talk-gm-to {
  color: #c30000 !important;
}
.gv-talk-strike {
  text-decoration: line-through;
}
.gv-talk-mark { font-weight: 700; }
.gv-talk-ref,
.gv-talk-ref:hover,
.gv-talk-ref:focus,
.gv-talk-ref:active,
.gv-talk-link,
.gv-talk-link:hover,
.gv-talk-link:focus,
.gv-talk-link:active,
.gv-talk-ref:visited {
  display: inline;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  min-height: 0;
  height: auto;
  text-decoration: none;
  font-weight: 400;
  cursor: pointer;
  transform: none;
  filter: none;
}
body.new-body .gv-talk-row a,
body.new-body .gv-talk-row a:hover,
body.new-body .gv-talk-row a:focus,
body.new-body .gv-talk-row a:active,
body.new-body .gv-talk-row a:visited {
  display: inline !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  text-decoration: none !important;
  font-weight: 400 !important;
  transform: none !important;
  filter: none !important;
}
.gv-talk-row-highlight {
  background: var(--gv-highlight);
  transition: background-color 0.25s ease;
}
.gv-talk-row img {
  vertical-align: middle;
}
.gv-msg-icon {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
  object-fit: contain;
}
.gv-talk-form {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e3d4bf;
}
.gv-talk-form textarea[name="say"] {
  width: 100%;
  height: 58px;
  min-height: 58px;
  resize: vertical;
}
.gv-talk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.gv-talk-options {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gv-talk-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
}
.gv-talk-submit-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.game-view-page .gm-action-select {
  min-width: 120px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #b8753b;
  background: var(--gv-surface-strong);
  color: var(--gv-text-main);
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.game-view-page .gm-action-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(183, 119, 55, 0.18);
}
.game-view-page .gv-talk-submit-group .gm-action-btn {
  white-space: nowrap;
}
.gv-talk-shortcut-hint {
  font-size: 12px;
  color: #5d4a34;
  line-height: 1.2;
  white-space: nowrap;
}
.gv-talk-send-status {
  font-size: 12px;
  line-height: 1.2;
  color: #4e3e2c;
}
.gv-talk-send-status:empty {
  display: none;
}
.gv-talk-send-status[data-state="error"] {
  color: #b2412d;
}
.spectator-inline-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spectator-inline-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.game-view-page .gv-entry-actions,
.game-view-page .spectator-inline-row {
  font-size: 16px;
}
.game-view-page [hidden] {
  display: none !important;
}
.game-view-page .gv-entry-actions a,
.game-view-page .gv-entry-actions button,
.game-view-page .spectator-inline-row a,
.game-view-page .spectator-inline-row button {
  font-size: inherit;
}
.game-view-page a.gv-pill-link,
.game-view-page a.gv-pill-link:hover,
.game-view-page a.gv-pill-link:focus,
.game-view-page a.gv-pill-link:active,
.game-view-page a.gv-pill-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8753b;
  border-radius: 999px;
  padding: 0 12px;
  min-height: 34px;
  background: linear-gradient(180deg, #cc8a48 0%, #bf7837 100%) !important;
  color: #fffdf7 !important;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 1px 0 rgba(102, 61, 26, 0.26), inset 0 1px 0 rgba(255, 237, 214, 0.2);
}
.game-view-page fieldset {
  position: relative;
  padding: 10px;
  border-radius: 10px;
  border-width: 1px;
  border-top: 0;
}
.game-view-page fieldset > legend {
  position: absolute;
  top: -9px;
  left: 10px;
  z-index: 1;
  margin: 0;
  padding: 0 6px;
  line-height: 1.2;
  background: var(--card-strong);
}
.gv-player-mode-btn,
.gv-player-mode-btn:hover,
.gv-player-mode-btn:focus,
.gv-player-mode-btn:active,
.gv-player-mode-btn:visited {
  display: inline;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #6d5b49;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  vertical-align: baseline;
  text-decoration: none;
  cursor: pointer;
  transform: none;
  filter: none;
}
.gv-player-mode-btn.is-active {
  color: #4e2d14;
  font-weight: 700;
}
.game-view-page .gv-entry-fieldset {
  padding-top: 10px;
  padding-bottom: 10px;
}
.game-view-page .gv-entry-fieldset > legend {
  cursor: pointer;
  user-select: none;
}
.game-view-page .gv-entry-fieldset.gv-mobile-collapsible > legend::after,
.game-view-page .gv-info-fieldset.gv-mobile-collapsible > legend::after {
  content: ' (點擊展開)';
  font-size: 12px;
  font-weight: 400;
  color: #6d5b49;
}
.game-view-page .gv-entry-fieldset.gv-mobile-collapsible.is-open > legend::after,
.game-view-page .gv-info-fieldset.gv-mobile-collapsible.is-open > legend::after {
  content: ' (點擊收合)';
}
.game-view-page .gv-entry-fieldset:not(.is-open) > :not(legend) {
  display: none;
}
.game-view-page .gv-info-fieldset.gv-mobile-collapsible:not(.is-open) > :not(legend) {
  display: none;
}
.game-view-page .gv-room-info {
  gap: 4px;
}
.game-view-page .gv-entry-fieldset form {
  margin: 0;
}

@media (max-width: 920px) {
  .new-shell {
    height: auto;
    max-height: none;
  }
  .new-main {
    overflow: visible;
  }
  .village-form-row { grid-template-columns: 1fr; }
  .gv-main-grid { grid-template-columns: 1fr; }
  .user-manager-page .um-room-stats { grid-template-columns: 1fr; }
  .game-view-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .game-view-page fieldset > legend {
    position: static;
    display: inline-block;
    margin: 0 0 6px;
    padding: 0;
    background: transparent;
  }
  .game-view-page > .gv-main-grid,
  .game-view-page .gv-left-panel,
  .game-view-page .gv-right-panel {
    display: contents;
  }
  .game-view-page .gv-info-fieldset { order: 1; }
  .game-view-page .gv-entry-fieldset { order: 2; }
  .game-view-page .gv-player-fieldset { order: 3; }
  .game-view-page .gv-talk-fieldset { order: 4; }
  .game-play-page .gv-talk-form.gv-talk-form-mobile-detached {
    order: 4;
    margin-top: 0;
    margin-bottom: 0;
    padding: 10px;
    border: 1px solid var(--gv-border);
    border-radius: 10px;
    background: var(--gv-surface-strong);
  }
  .game-play-page .gv-talk-fieldset {
    order: 5;
  }
  .game-view-page .gv-mobile-collapsible > legend {
    cursor: pointer;
    user-select: none;
  }
  .game-view-page .gv-mobile-collapsible > legend::after {
    content: ' (點擊展開)';
    font-size: 12px;
    font-weight: 400;
    color: #6d5b49;
  }
  .game-view-page .gv-mobile-collapsible.is-open > legend::after {
    content: ' (點擊收合)';
  }
  .game-view-page .gv-mobile-collapsible:not(.is-open) > :not(legend) {
    display: none;
  }
  .game-view-page .gv-talk-log {
    overflow-x: hidden;
  }
  .game-view-page .gv-talk-row {
    max-width: 100%;
    overflow-x: hidden;
  }
  .game-view-page .gv-talk-row .gv-talk-body {
    display: block;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .gv-entry-line {
    align-items: stretch;
    flex-direction: column;
  }
  .gv-entry-fields {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .gv-login-inline-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .gv-login-inline-wrap label {
    width: 100%;
    justify-content: space-between;
  }
  .gv-login-inline-wrap input[type="password"] {
    flex: 1 1 auto;
    min-width: 0;
  }
  .gv-entry-actions {
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow: hidden;
    padding-bottom: 0;
  }
  .gv-entry-actions > * {
    flex: 1 1 0;
    min-width: 0;
  }
  .game-view-page .gv-entry-actions a,
  .game-view-page .gv-entry-actions button {
    width: 100%;
    min-height: 34px;
    height: 34px;
    padding: 0 6px;
    font-size: 13px;
    line-height: 1;
  }
  .spectator-inline-row label {
    width: 100%;
    justify-content: space-between;
  }
  .spectator-inline-row input {
    flex: 1;
    min-width: 0;
  }
  .gv-talk-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .gv-talk-options {
    width: 100%;
  }
  .gv-talk-submit-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gv-talk-shortcut-hint {
    white-space: normal;
  }
  #talkSendBtn {
    width: auto;
  }
}

.log-room-table .legacy-row {
  grid-template-columns: 72px minmax(220px, 2fr) minmax(150px, 1.2fr) 78px 72px minmax(180px, 1.4fr);
}
.log-room-row.is-dim {
  color: #8b8b8b;
}
.log-list-note {
  margin-bottom: 6px;
  color: #6d5b49;
  font-size: 13px;
}
.log-mode-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.log-room-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px;
}
.log-player-table .legacy-row,
.log-vote-table .legacy-row {
  grid-template-columns: repeat(6, minmax(70px, 1fr));
}
.log-player-table .legacy-row {
  grid-template-columns: minmax(210px, 2fr) minmax(120px, 1.1fr) minmax(80px, 0.8fr);
}
.game-view-page .log-player-table .legacy-row {
  grid-template-columns: minmax(0, 1fr) 4em 4em;
}
.game-view-page #playerList .log-player-table .legacy-row {
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) 4em 4em !important;
}
.game-view-page .log-player-name-cell,
.game-view-page .log-player-name-text {
  min-width: 0;
}
.game-view-page .log-player-name-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-view-page .log-player-table .legacy-row > div:nth-child(2),
.game-view-page .log-player-table .legacy-row > div:nth-child(3) {
  white-space: nowrap;
}

.new-main > .game-view-page {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.new-main > .game-view-page > fieldset {
  flex: 0 0 auto;
}
.log-view-room-page .gv-player-list-simple {
  grid-auto-rows: 78px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.log-view-room-page .gv-player-item {
  min-height: 78px;
}
.log-view-room-page .gv-talk-fieldset {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.log-view-room-page .log-talk-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d7cab8;
  padding: 8px;
  background: #fff;
}
.log-view-room-page .gv-room-option-row {
  display: inline-flex;
  vertical-align: middle;
}
.log-player-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  line-height: 1.3;
}
.log-player-name-text {
  display: grid;
  gap: 2px;
}
.log-player-name-main {
  font-weight: 600;
}
.log-player-trip {
  font-size: 12px;
  color: #6d5b49;
  word-break: break-all;
}
@media (max-width: 920px) {
}
.trip-link,
.trip-link:hover,
.trip-link:focus,
.trip-link:active,
.trip-link:visited {
  display: inline;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
  transform: none;
  filter: none;
}
.log-player-role-main,
.log-player-role-sub {
  display: block;
  line-height: 1.3;
}
.log-player-role-sub {
  font-size: 12px;
  color: #6d5b49;
}
.log-player-icon {
  width: 45px;
  height: 45px;
  border: 1px solid #d7cab8;
  object-fit: cover;
  border-radius: 2px;
  flex: 0 0 auto;
}
.log-player-avatar {
  position: relative;
  display: inline-flex;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
}
.log-player-avatar .log-player-icon {
  position: absolute;
  inset: 0;
}
.log-player-avatar .log-player-icon-hover {
  opacity: 0;
  transition: opacity 0.12s ease-in-out;
}
.log-player-avatar.is-dead:hover .log-player-icon-hover {
  opacity: 1;
}
.log-player-avatar.is-dead:hover .log-player-icon-default {
  opacity: 0;
}
/* GAMESTART 已投票玩家格子整體背景變綠（需比 body.new-body .game-view-page .gv-player-item 特異性高） */
body.new-body .game-view-page .gv-player-item.gv-voted-start {
  background: rgba(58, 138, 58, 0.35);
}
.log-talk-list {
  display: grid;
  gap: 8px;
}
.log-view-room-page .log-talk-list.gv-talk-log {
  display: block;
  gap: 0;
}
.log-options-fieldset {
  margin-bottom: 8px;
}
.log-options-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.log-option-link,
.log-option-link:hover,
.log-option-link:focus,
.log-option-link:active,
.log-option-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b26b2a;
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #d99348 0%, #c97931 100%) !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 #f5c592, 0 2px 4px rgba(53, 32, 13, 0.28);
  text-decoration: none !important;
  white-space: nowrap;
}
.log-option-link.is-active {
  filter: none;
  box-shadow: inset 0 1px 0 #f5c592, 0 2px 4px rgba(53, 32, 13, 0.28);
}
.log-option-link:hover {
  filter: brightness(1.03);
}
.log-option-link:active {
  transform: translateY(1px);
}
.log-view-room-page .gv-talk-row.log-talk-phase-day {
  background-color: floralwhite;
  color: #000000;
}
.log-view-room-page .gv-talk-row.log-talk-phase-night {
  background-color: #000030;
  color: snow;
}
.log-view-room-page .gv-talk-row.log-talk-phase-beforegame {
  background-color: seashell;
  color: #000000;
}
.log-view-room-page .gv-talk-row.log-talk-phase-aftergame {
  background-color: aliceblue;
  color: #000000;
}
.log-view-room-page .gv-talk-row.log-talk-phase-heaven {
  background-color: #cccccc;
  color: #000000;
}
.log-view-room-page .gv-talk-row.log-talk-phase-day .gv-talk-meta,
.log-view-room-page .gv-talk-row.log-talk-phase-beforegame .gv-talk-meta,
.log-view-room-page .gv-talk-row.log-talk-phase-aftergame .gv-talk-meta,
.log-view-room-page .gv-talk-row.log-talk-phase-heaven .gv-talk-meta {
  color: #000000;
}
.log-view-room-page .gv-talk-row.log-talk-phase-night .gv-talk-meta {
  color: snow;
}
.log-view-room-page .gv-talk-row.is-system {
  padding-top: 2px;
  padding-bottom: 2px;
}
.log-talk-item {
  border: 1px solid #e5d8c6;
  background: #fffdfa;
  padding: 8px;
}
.log-talk-item.is-system {
  background: #f2f2f2;
}
.log-talk-item.is-night {
  background: #16171e;
  border-color: #2f3348;
  color: #f3f5ff;
}
.log-talk-item.is-night .log-talk-meta {
  color: #bac2ef;
}
.log-talk-item.is-heaven {
  border-left: 4px solid #8d7eb2;
}
.log-talk-item.is-ghost {
  background: #e3e5ea;
  border-color: #b7bec9;
  color: #242933;
}
.log-talk-item.is-ghost .log-talk-meta {
  color: #475062;
}
.log-talk-item.is-ghost.is-night {
  background: #2b303a;
  border-color: #4c5564;
  color: #eceff6;
}
.log-talk-item.is-ghost.is-night .log-talk-meta {
  color: #c6cddc;
}
.log-floating-back-btn {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 1700;
  border: 1px solid #b26b2a;
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #d99348 0%, #c97931 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 #f5c592, 0 2px 4px rgba(53, 32, 13, 0.28);
  cursor: pointer;
  white-space: nowrap;
}
.log-floating-back-btn:hover {
  filter: brightness(1.03);
}
.log-floating-back-btn:active {
  transform: translateY(1px);
}
.log-talk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #6d5b49;
  margin-bottom: 4px;
}
.log-talk-content {
  word-break: break-word;
  white-space: normal;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.log-message-body {
  white-space: pre-wrap;
  word-break: break-word;
}
.log-message-body.is-system-message {
  white-space: normal;
}
.log-view-room-page .log-message-body.is-system-message img {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  vertical-align: text-bottom;
  object-fit: contain;
}
.log-talk-icon {
  width: 45px;
  height: 45px;
  border: 1px solid #d7cab8;
  object-fit: cover;
  flex: 0 0 auto;
}
.log-talk-avatar {
  margin-top: 1px;
}
.log-vote-summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.log-vote-summary-table th,
.log-vote-summary-table td {
  border: 1px solid #d9cbb8;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.log-vote-summary-table thead th {
  background: #f3eadf;
  color: #5a3b20;
}
.log-vote-summary-table tbody tr:nth-child(even) {
  background: #fffaf3;
}
.log-system-list {
  display: grid;
  gap: 8px;
}
.log-system-item {
  border: 1px dashed #d7cab8;
  background: #fffefc;
  padding: 8px;
}
.log-system-item.is-night {
  background: #11131a;
  border-color: #3a4263;
  color: #edf0ff;
}
.log-vote-record-head {
  margin: 0 0 2px 0;
  font-weight: 700;
  color: #4f3a20;
}
.log-vote-record-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fffefc;
  margin: 0;
}
.log-vote-record-table col.col-round {
  width: 60px;
}
.log-vote-record-table col.col-voter,
.log-vote-record-table col.col-target {
  width: calc((100% - 60px) / 2);
}
.log-vote-record-table th,
.log-vote-record-table td {
  border: 1px solid #d7cab8;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.log-vote-record-table th:first-child,
.log-vote-record-table td:first-child {
  white-space: nowrap;
}
.log-vote-record-table thead th {
  background: #f3eadf;
  color: #5a3b20;
}
.log-vote-record-table tbody tr:nth-child(even) {
  background: #fff8ef;
}
.log-view-room-page .log-message-body.is-system-message.is-structured {
  white-space: normal;
  line-height: 1.25;
  padding: 0;
}
.game-view-page .gv-talk-row.is-system .gv-talk-body {
  white-space: normal !important;
}
.log-phase-title {
  font-weight: 700;
  color: #6f4218;
  margin-top: 8px;
}
@media (max-width: 920px) {
  .log-floating-back-btn {
    top: 8px;
    right: 8px;
    padding: 7px 12px;
    font-size: 14px;
  }
}
