/* 青空文庫リーダー — Meta Display Glasses (600x600 加算式ディスプレイ) */

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

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: #000000; /* 加算式ディスプレイでは透明（現実が透ける） */
  color: #ffffff;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#app {
  width: 600px;
  height: 600px;
  padding: 10px;
}

.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ---------- ヘッダー ---------- */

.app-header {
  text-align: center;
  padding: 10px 0 14px;
}

.app-header h1 {
  font-size: 28px;
  font-weight: bold;
  color: #7ec8ff;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 14px;
  color: #b0b3b8;
  margin-top: 4px;
}

.screen-header {
  padding: 8px 4px 12px;
  text-align: center;
}

.screen-header h2 {
  font-size: 22px;
  font-weight: bold;
  color: #7ec8ff;
}

.book-header h2 { font-size: 24px; }

/* ---------- リスト ---------- */

.scroll-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

.scroll-area {
  height: 100%;
  overflow-y: auto;
  padding: 4px 6px 56px;
}

.scroll-area::-webkit-scrollbar { display: none; }

/* スクリム（下端: まだ続きがあるサイン） */
.scroll-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(4, 5, 8, 0.92) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.list-item {
  background: #14161a;
  border: 2px solid #2a2d33;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 10px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  outline: none;
  cursor: pointer;
  transition:
    transform 475ms cubic-bezier(0.6, 0, 0.4, 1),
    border-color 300ms cubic-bezier(0.4, 0.04, 0.5, 1),
    background-color 300ms cubic-bezier(0.4, 0.04, 0.5, 1);
}

.list-item .item-title,
.list-item .item-sub { opacity: 0.8; transition: opacity 300ms cubic-bezier(0.4, 0.04, 0.5, 1); }

.list-item:focus {
  border-color: #ffe066;
  background: rgba(255, 224, 102, 0.12);
  transform: scale(0.97);
}

.list-item:focus .item-title { color: #ffe066; opacity: 1; }
.list-item:focus .item-sub { opacity: 1; }

.item-title {
  font-size: 20px;
  font-weight: bold;
  color: #e4e6eb;
}

.item-sub {
  font-size: 13px;
  color: #b0b3b8;
  margin-top: 4px;
}

.list-item.item-back .item-title { color: #b0b3b8; font-size: 18px; }
.list-item.item-back:focus .item-title { color: #ffe066; }

.list-item.item-static {
  cursor: default;
  border-color: #22242a;
}

.item-note {
  font-size: 15px;
  color: #b0b3b8;
  text-align: center;
}

/* ---------- ヒント・クレジット ---------- */

.hint {
  text-align: center;
  font-size: 13px;
  color: #9090a0;
  padding-top: 8px;
}

.credit {
  text-align: center;
  font-size: 11px;
  color: #6a6d75;
  padding-top: 4px;
}

/* ---------- リーダー ---------- */

#screen-reader { position: relative; }

.reader-header {
  height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid #2a2d33;
}

#reader-title {
  font-size: 15px;
  font-weight: bold;
  color: #7ec8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

#reader-chapter {
  font-size: 13px;
  color: #b0b3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.reader-page {
  flex: 1;
  background: #0e1014;
  border-radius: 12px;
  margin: 8px 0;
  padding: 12px 14px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "MS Mincho", serif;
  font-size: 24px;
  line-height: 38px;
  color: #f0f1f4;
  white-space: pre;
  overflow: hidden;
}

.reader-footer {
  height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

#reader-pos { font-size: 13px; color: #b0b3b8; }
.reader-hint { font-size: 12px; color: #9090a0; }

/* ---------- リーダーメニュー ---------- */

.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 10, 0.6);
  z-index: 100;
}

.menu-panel {
  width: 400px;
  background: #16181d;
  border: 2px solid #3a3d44;
  border-radius: 16px;
  padding: 18px 16px 8px;
}

.menu-panel .list-item { background: #1c1e24; }

/* ---------- トースト ---------- */

.toast {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 536px;
  background: #1C1E21;
  border: 1px solid #3a3d44;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 15px;
  color: #ffffff;
  white-space: nowrap;
  z-index: 200;
}
