/* Extracted from original game_app.css ability and self-last-words sections. */
/* Ability / private role panel */

.ability-panel {
  position: relative;
}

.ability-panel-actions {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.ability-lastwords-btn {
  appearance: none;
  min-height: 28px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  pointer-events: auto;
}

.ability-lastwords-btn:hover,
.ability-lastwords-btn.is-open {
  background: rgba(219, 234, 254, 0.98);
  border-color: rgba(37, 99, 235, 0.44);
}

.ability-lastwords-btn.is-empty {
  background: rgba(254, 226, 226, 0.92);
  border-color: rgba(220, 38, 38, 0.30);
  color: #dc2626;
  box-shadow: none;
}

.ability-lastwords-btn:disabled {
  cursor: default;
}

.ability-lastwords-btn[hidden] {
  display: none !important;
}

.ability-panel.has-self-lastwords .ability-self-info {
  padding-right: 106px;
}

.game-app[data-phase="night"] .ability-lastwords-btn {
  background: rgba(30, 64, 175, 0.82);
  border-color: rgba(147, 197, 253, 0.35);
  color: #dbeafe;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.game-app[data-phase="night"] .ability-lastwords-btn:hover,
.game-app[data-phase="night"] .ability-lastwords-btn.is-open {
  background: rgba(37, 99, 235, 0.92);
  border-color: rgba(191, 219, 254, 0.52);
}

.game-app[data-phase="night"] .ability-lastwords-btn.is-empty {
  background: rgba(127, 29, 29, 0.82);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
}

.role-description-no-copy,
.role-description-no-copy * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.ability-copyable,
.ability-copyable * {
  user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
}

.ability-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ability-self-info {
  margin-bottom: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: rgba(31, 41, 55, 0.86);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.ability-self-info[hidden] {
  display: none !important;
}

.ability-panel.is-identity-only .ability-self-info {
  margin-bottom: 0;
}

.game-app[data-phase="night"] .ability-self-info {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 252, 0.92);
}

.ability-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
}

.ability-self-name {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
}

.ability-live {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.game-app[data-phase="night"] .ability-self-name,
.game-app[data-phase="night"] .ability-live {
  background: rgba(255, 255, 255, 0.12);
}

.ability-main-role-card {
  --role-accent: #8b93a7;
  --role-ink: #1f2937;
  --role-border: rgba(179, 151, 91, 0.52);
  --role-glow: rgba(153, 153, 255, 0.24);
  --role-card-bg:
    radial-gradient(circle at 12% 18%, rgba(153, 153, 255, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(247, 244, 237, 0.96), rgba(238, 242, 247, 0.88));
  width: 100%;
  border: 1px solid var(--role-border);
  border-radius: 8px;
  background: var(--role-card-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46), 0 1px 4px rgba(15, 23, 42, 0.08);
  color: #1f2937;
  overflow: hidden;
}

.ability-main-role-card summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.ability-main-role-card summary::-webkit-details-marker {
  display: none;
}

.ability-main-role-card summary::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  align-self: stretch;
  min-height: 36px;
  border-radius: 999px;
  background: var(--role-accent);
  box-shadow: 0 0 10px var(--role-glow);
}

.ability-main-role-card summary::after {
  content: "＋";
  margin-left: auto;
  color: rgba(31, 41, 55, 0.62);
  font-size: 14px;
  line-height: 1;
}

.ability-main-role-card[open] summary::after {
  content: "－";
}

.ability-main-role-card.is-static summary {
  cursor: default;
}

.ability-main-role-card.is-static summary::after,
.ability-main-role-card.is-static[open] summary::after {
  content: "";
}

.ability-main-role-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ability-main-role-icon img {
  width: auto;
  height: 34px;
  max-width: 36px;
  object-fit: contain;
  pointer-events: none;
}

.ability-main-role-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ability-main-role-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ability-main-role-name {
  min-width: 0;
  flex: 0 1 auto;
  color: var(--role-ink);
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.70);
}

.ability-main-role-live {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
  line-height: 1.2;
}

.ability-subrole-stickers {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ability-subrole-sticker {
  --role-accent: #b38b22;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 7px 2px 5px;
  border: 1px solid rgba(166, 132, 74, 0.34);
  border-left: 3px solid var(--role-accent);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.90);
  color: rgba(31, 41, 55, 0.90);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.ability-subrole-sticker span {
  color: var(--role-accent);
}

.ability-subrole-sticker img {
  width: auto;
  height: 18px;
  max-width: 20px;
  object-fit: contain;
  pointer-events: none;
}

.ability-main-role-hint {
  color: rgba(31, 41, 55, 0.68);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.ability-main-role-card.role-gm {
  --role-accent: #ff8000;
  --role-ink: #ff8000;
  --role-border: rgba(255, 128, 0, 0.42);
  --role-glow: rgba(255, 128, 0, 0.26);
  --role-card-bg: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.84));
}

.ability-main-role-card.role-human,
.ability-main-role-card.role-noble,
.ability-main-role-card.role-slave {
  --role-accent: #111827;
  --role-ink: #111827;
  --role-border: rgba(17, 24, 39, 0.18);
}

.ability-main-role-card.role-wolf,
.ability-main-role-card.role-wfbig,
.ability-main-role-card.role-mad,
.ability-main-role-card.role-spy {
  --role-accent: #ff0000;
  --role-ink: #ff0000;
  --role-border: rgba(255, 0, 0, 0.34);
  --role-glow: rgba(255, 0, 0, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(255, 245, 245, 0.98), rgba(254, 226, 226, 0.78));
}

.ability-main-role-card.role-bskwolf {
  --role-accent: #d00000;
  --role-ink: #d00000;
  --role-border: rgba(208, 0, 0, 0.36);
  --role-glow: rgba(208, 0, 0, 0.24);
}

.ability-main-role-card.role-asmwolf,
.ability-main-role-card.role-wndwolf,
.ability-main-role-card.role-wndwolf_lock {
  --role-accent: #ff3000;
  --role-ink: #ff3000;
  --role-border: rgba(255, 48, 0, 0.38);
  --role-glow: rgba(255, 48, 0, 0.24);
  --role-card-bg: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.80));
}

.ability-main-role-card.role-wtrwolf {
  --role-accent: #ccffff;
  --role-ink: #006b75;
  --role-border: rgba(0, 107, 117, 0.36);
  --role-glow: rgba(0, 107, 117, 0.18);
  --role-card-bg: linear-gradient(135deg, rgba(236, 254, 255, 0.98), rgba(207, 250, 254, 0.78));
}

.ability-main-role-card.role-mage {
  --role-accent: #9933ff;
  --role-ink: #9933ff;
  --role-border: rgba(153, 51, 255, 0.36);
  --role-glow: rgba(153, 51, 255, 0.24);
  --role-card-bg: linear-gradient(135deg, rgba(250, 245, 255, 0.98), rgba(233, 213, 255, 0.76));
}

.ability-main-role-card.role-necromancer {
  --role-accent: #009900;
  --role-ink: #009900;
  --role-border: rgba(0, 153, 0, 0.36);
  --role-glow: rgba(0, 153, 0, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.78));
}

.ability-main-role-card.role-common {
  --role-accent: #cc9966;
  --role-ink: #b27a43;
  --role-border: rgba(204, 153, 102, 0.44);
  --role-glow: rgba(204, 153, 102, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.76));
}

.ability-main-role-card.role-guard {
  --role-accent: #3399ff;
  --role-ink: #1675d1;
  --role-border: rgba(51, 153, 255, 0.38);
  --role-glow: rgba(51, 153, 255, 0.24);
  --role-card-bg: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.78));
}

.ability-main-role-card.role-fox,
.ability-main-role-card.role-fosi,
.ability-main-role-card.role-betr,
.ability-main-role-card.role-fxism {
  --role-accent: #cc0099;
  --role-ink: #cc0099;
  --role-border: rgba(204, 0, 153, 0.36);
  --role-glow: rgba(204, 0, 153, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(253, 242, 248, 0.98), rgba(252, 231, 243, 0.78));
}

.ability-main-role-card.role-poison,
.ability-main-role-card.role-cat {
  --role-accent: #006633;
  --role-ink: #006633;
  --role-border: rgba(0, 102, 51, 0.38);
  --role-glow: rgba(0, 102, 51, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.78));
}

.ability-main-role-card.role-mytho,
.ability-main-role-card.role-mimic {
  --role-accent: #ff8000;
  --role-ink: #ff8000;
  --role-border: rgba(255, 128, 0, 0.40);
  --role-glow: rgba(255, 128, 0, 0.24);
  --role-card-bg: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.80));
}

.ability-main-role-card.role-owlman {
  --role-accent: #000080;
  --role-ink: #000080;
  --role-border: rgba(0, 0, 128, 0.36);
  --role-glow: rgba(0, 0, 128, 0.22);
  --role-card-bg: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.78));
}

.ability-main-role-card.role-pengu {
  --role-accent: #ff9933;
  --role-ink: #ff9933;
  --role-border: rgba(255, 153, 51, 0.42);
  --role-glow: rgba(255, 153, 51, 0.24);
  --role-card-bg: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.78));
}

.ability-role-detail {
  padding: 0 13px 11px 27px;
  color: rgba(31, 41, 55, 0.82);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

.ability-role-detail-sub {
  display: flex;
  gap: 7px;
  padding-top: 0;
  color: rgba(31, 41, 55, 0.74);
}

.ability-role-detail-sub strong {
  flex: 0 0 auto;
  color: rgba(31, 41, 55, 0.88);
}

.ability-role-detail-sub span {
  min-width: 0;
}

.ability-subroles {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.ability-subrole-label {
  flex: 0 0 auto;
  padding-top: 3px;
  color: rgba(31, 41, 55, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.ability-subrole-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ability-subrole-chip {
  --role-accent: #b38b22;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid rgba(166, 132, 74, 0.34);
  border-left: 3px solid var(--role-accent);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.92), rgba(238, 242, 247, 0.74));
  color: rgba(31, 41, 55, 0.90);
  font-size: 12px;
  font-weight: 900;
}

.ability-subrole-chip img {
  width: auto;
  height: 18px;
  max-width: 22px;
  object-fit: contain;
  pointer-events: none;
}

.game-app[data-phase="night"] .ability-main-role-card {
  background:
    radial-gradient(circle at 16% 18%, rgba(153, 153, 255, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.72));
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 250, 252, 0.94);
}

.game-app[data-phase="night"] .ability-main-role-name {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.game-app[data-phase="night"] .ability-main-role-card.role-human .ability-main-role-name,
.game-app[data-phase="night"] .ability-main-role-card.role-noble .ability-main-role-name,
.game-app[data-phase="night"] .ability-main-role-card.role-slave .ability-main-role-name,
.game-app[data-phase="night"] .ability-main-role-card.role-owlman .ability-main-role-name {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  text-shadow: none;
}

.game-app[data-phase="night"] .ability-main-role-card summary::after {
  color: rgba(248, 250, 252, 0.60);
}

.game-app[data-phase="night"] .ability-main-role-icon {
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.game-app[data-phase="night"] .ability-main-role-live {
  background: rgba(255, 255, 255, 0.12);
}

.game-app[data-phase="night"] .ability-subrole-sticker {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 250, 252, 0.92);
}

.game-app[data-phase="night"] .ability-main-role-hint {
  color: rgba(248, 250, 252, 0.68);
}

.game-app[data-phase="night"] .ability-role-detail {
  color: rgba(248, 250, 252, 0.76);
}

.game-app[data-phase="night"] .ability-role-detail-sub {
  color: rgba(248, 250, 252, 0.70);
}

.game-app[data-phase="night"] .ability-role-detail-sub strong {
  color: rgba(248, 250, 252, 0.88);
}

.game-app[data-phase="night"] .ability-subroles {
  background: rgba(15, 23, 42, 0.38);
  border-color: rgba(255, 255, 255, 0.10);
}

.game-app[data-phase="night"] .ability-subrole-label {
  color: rgba(248, 250, 252, 0.66);
}

.game-app[data-phase="night"] .ability-subrole-chip {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 252, 0.92);
}

.ability-note,
.ability-empty {
  font-size: 12px;
  opacity: 0.72;
  line-height: 1.45;
}

.ability-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ability-subpanel,
.ability-result,
.ability-action {
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  padding: 7px 8px;
}

.game-app[data-phase="night"] .ability-subpanel,
.game-app[data-phase="night"] .ability-result,
.game-app[data-phase="night"] .ability-action {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(255, 255, 255, 0.12);
}

.ability-subtitle {
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.ability-partner-group {
  padding-top: 6px;
  padding-bottom: 6px;
}

.ability-partner-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.ability-partner-title {
  flex: 0 0 auto;
  margin-bottom: 0;
  white-space: nowrap;
}

.ability-partner-line .ability-chip-row {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.ability-line {
  font-size: 13px;
  line-height: 1.45;
}

.ability-line.is-muted {
  opacity: 0.72;
}

.ability-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.ability-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.ability-chip small {
  font-size: 11px;
  opacity: 0.70;
}

.game-app[data-phase="night"] .ability-chip {
  background: rgba(255, 255, 255, 0.12);
}

.ability-result {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ability-result img {
  flex: 0 0 auto;
  width: auto;
  height: 26px;
  max-width: 44px;
  object-fit: contain;
  pointer-events: none;
}

.ability-result-body {
  min-width: 0;
}

.ability-result-judgement {
  min-height: 36px;
}

.ability-result-line {
  font-size: 13px;
  line-height: 1.45;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.ability-result-prefix,
.ability-result-tail,
.ability-result-verdict {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.ability-result-prefix {
  font-weight: 900;
}

.ability-result-target {
  font-weight: 900;
  user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
}

.ability-result-target.is-danger,
.ability-result-verdict.is-danger {
  color: #dc2626;
}

.game-app[data-phase="night"] .ability-result-target.is-danger,
.game-app[data-phase="night"] .ability-result-verdict.is-danger {
  color: #f87171;
}

.ability-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ability-action-title {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.ability-action-text {
  min-width: 0;
  text-align: right;
  font-size: 13px;
  line-height: 1.35;
}

.ability-action.is-pending {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(254, 226, 226, 0.46);
}

.game-app[data-phase="night"] .ability-action.is-pending {
  border-color: rgba(248, 113, 113, 0.30);
  background: rgba(127, 29, 29, 0.30);
}


/* Self last words floating panel */

.self-lastwords-float {
  position: fixed;
  left: 50%;
  bottom: calc(var(--talk-input-offset, 96px) + 8px);
  z-index: 39;
  width: min(720px, calc(100vw - 20px));
  max-height: min(32vh, 240px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.96);
  color: #111827;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.20);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.game-app.talk-newest-top .self-lastwords-float {
  bottom: 8px;
}

.self-lastwords-float[hidden] {
  display: none !important;
}

.self-lastwords-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 6px 9px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(219, 234, 254, 0.76);
}

.self-lastwords-head strong {
  font-size: 13px;
  font-weight: 900;
}

.self-lastwords-close-btn {
  appearance: none;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #1d4ed8;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
}

.self-lastwords-close-btn:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.42);
}

.self-lastwords-body {
  flex: 1 1 auto;
  min-height: 44px;
  overflow: auto;
  padding: 8px 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.game-app[data-phase="night"] .self-lastwords-float {
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 42, 0.96);
  color: snow;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.game-app[data-phase="night"] .self-lastwords-head {
  border-bottom-color: rgba(147, 197, 253, 0.16);
  background: rgba(30, 64, 175, 0.36);
}

.game-app[data-phase="night"] .self-lastwords-close-btn {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(191, 219, 254, 0.24);
  color: #dbeafe;
}

.game-app[data-phase="night"] .self-lastwords-close-btn:hover {
  background: rgba(37, 99, 235, 0.36);
  border-color: rgba(191, 219, 254, 0.44);
}

.game-app[data-phase="night"] .self-lastwords-body {
  color: snow;
}


/* Preserve original panel rules within the independently mounted fragment. */
#abilityPanel[hidden], #abilityPanel [hidden] { display: none !important; }
#abilityRoleCards:empty, #abilityNotices:empty, #selfPartners:empty, #abilityResults:empty, #abilityActions:empty { display: none; }
#abilityPanel { min-width: 0; }
#abilityPanel .ability-main-role-body, #abilityPanel .ability-chip-row { min-width: 0; }
#abilityPanel .ability-role-detail { overflow-wrap: anywhere; white-space: pre-wrap; }
#abilityPanel #roleArt { display: none !important; }
#selfLastWordsFloat { max-width: calc(100vw - 20px); }
@media (max-width: 620px) {
  #abilityPanel .ability-main-role-card summary { padding: 9px 10px; }
  #abilityPanel .ability-partner-line { flex-wrap: wrap; }
  #abilityPanel .ability-main-role-name { font-size: 18px; }
  #abilityPanel.has-self-lastwords .ability-self-info { padding-right: 100px; }
}
.game-app[data-phase="night"] #abilityPanel { color: #f8fafc; }
/* Unified personal-info will editor. */
#selfInfoLine{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-right:0}#selfInfoLine .ability-panel-actions{position:static;display:inline-flex;float:none;margin-left:auto}#selfLastWordsFloat #willForm textarea{width:100%;box-sizing:border-box;resize:vertical}#selfLastWordsFloat #willForm[hidden]{display:none}#speechHint:empty{display:none}

#selfLastWordsFloat:has(#willForm:not([hidden])){max-height:min(65dvh,500px)}#selfLastWordsFloat #willForm{flex:1 1 auto;min-height:0;overflow:auto;margin:0;padding:10px;display:grid;gap:8px}#selfLastWordsFloat #willForm label{display:grid;gap:6px;font-size:13px;font-weight:700}#selfLastWordsFloat #willForm textarea{font:inherit;min-height:100px;border:1px solid #93c5fd;border-radius:10px;padding:8px;background:#fff;color:#111827}#selfLastWordsFloat #willForm .form-actions{display:flex;justify-content:flex-end}#selfLastWordsFloat #willForm button{border:0;border-radius:999px;padding:7px 14px;background:#2563eb;color:white;font-weight:800}#selfLastWordsFloat #willForm button:disabled{opacity:.5}#abilityPanel.has-self-lastwords #selfInfoLine{padding-right:0}
