* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: #0a0a0f;
  color: #f4f7fc;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
}

.screen {
  width: 600px;
  height: 600px;
  background: #0a0a0f;
}

.hidden,
.row-hidden {
  display: none !important;
}

/* ===== タブ ===== */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 68px;
  border-bottom: 2px solid #33506a;
  background: #14171d;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0c8d4;
  font-size: 21px;
  font-weight: 800;
  border-bottom: 4px solid transparent;
}

.tab.active {
  color: #8fe9ff;
  border-bottom-color: #8fe9ff;
  background: #1b2028;
}

/* ===== メッセージ画面ヘッダ ===== */
.message-header {
  width: 600px;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 2px solid #33506a;
  background: #14171d;
  color: #8fe9ff;
  font-size: 23px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 中央メッセージ（空・エラー・ローディング）===== */
.message {
  position: absolute;
  top: 68px;
  left: 0;
  z-index: 3;
  width: 600px;
  height: 532px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  background: #0a0a0f;
  color: #eef2f8;
  font-size: 24px;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
}

/* ===== リスト領域 ===== */
.item-list {
  width: 600px;
  height: 496px;
  overflow: hidden;
  padding: 12px 12px 8px;
}

.pager {
  width: 600px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #2c3038;
  background: #14171d;
  color: #aab4c2;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ===== カード共通 ===== */
.room-row,
.task-row,
.msg-row {
  width: 576px;
  min-height: 88px;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 2px solid #3b4552;
  border-radius: 10px;
  background: #171c25;
  color: #f4f7fc;
}

/* フォーカス（選択中）＝明るいシアン枠＋グロー */
.focusable:focus {
  outline: none;
  border-color: #8fe9ff;
  background: #223042;
  box-shadow: 0 0 0 3px rgba(143, 233, 255, 0.30);
}

/* ===== ルーム行 ===== */
.room-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.room-name,
.task-body {
  min-width: 0;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.3;
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.room-name {
  -webkit-line-clamp: 2;
}

.task-body {
  -webkit-line-clamp: 2;
}

.badge {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #235066;
  color: #8fe9ff;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.badge.mention {
  background: #5a4620;
  color: #ffd166;
}

.task-meta,
.msg-time {
  margin-top: 9px;
  color: #9aa4b2;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== メッセージ行 ===== */
.msg-author {
  color: #8fe9ff;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-body {
  margin-top: 8px;
  color: #f4f7fc;
  font-size: 21px;
  line-height: 1.42;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.msg-time {
  text-align: right;
}

/* ===== 空・注記 ===== */
.empty-row {
  width: 576px;
  min-height: 92px;
  padding: 20px 24px;
  border-left: 5px solid #8fe9ff;
  background: #111820;
  color: #d2dae4;
  font-size: 21px;
  line-height: 1.45;
}

/* ===== メッセージ内メディアのchip ===== */
.msg-media {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.media-chip {
  padding: 6px 14px;
  border: 2px solid #3d6f86;
  border-radius: 999px;
  background: #14232c;
  color: #bfeeff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.media-chip.play {
  border-color: #8fe9ff;
  color: #8fe9ff;
}

.media-open {
  color: #8b96a4;
  font-size: 15px;
  font-weight: 700;
}

/* ===== メディアビューア（全画面）===== */
.screen-media {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-header {
  width: 600px;
  height: 68px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 2px solid #33506a;
  background: #14171d;
  font-size: 23px;
  font-weight: 800;
}

.media-mark {
  flex: 0 0 auto;
  color: #8fe9ff;
  font-size: 22px;
}

.media-title {
  min-width: 0;
  color: #8fe9ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-counter {
  margin-left: auto;
  color: #aab4c2;
  font-size: 18px;
  font-weight: 700;
}

.media-stage {
  flex: 1 1 auto;
  width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000000;
  padding: 8px;
}

.media-full {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-yt {
  width: 568px;
  height: 320px;
  max-width: 100%;
  border: 0;
}

.media-error {
  max-width: 520px;
  padding: 24px;
  color: #ffd2d2;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.media-hint {
  flex: 0 0 auto;
  width: 600px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-top: 1px solid #2c3038;
  background: #14171d;
  color: #aab4c2;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}
