/* ===== clock.css — 時計バー・ニュースフィード ===== */

.clock-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #000;
  border-top: 2px solid #000;
}

.clock-inner {
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 6px 0;
}

/* 時計・日付（Webフォント + フォールバック） */
.clock {
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock-date {
  opacity: 1;
}

.clock-time-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.clock-time {
  font-size: 1rem;
}

@keyframes clockColon {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.clock-colon {
  animation: clockColon 1s steps(1) infinite;
}

/* ニュースフィード */
.ticker-bar {
  border-bottom: 1px solid #1a1a1a;
  height: 24px;
  display: flex;
  align-items: center;
}

.ticker-bar-inner {
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: #c2c2c2;
  padding: 0!important;
}

/* .ticker-track.is-scrolling — animation set dynamically by ticker.js */

.transfer-kb {
  font-family: "Courier New", monospace;
  font-size: 0.6rem;
  color: #777;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.ticker-loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  color: #aaa;
  letter-spacing: 0.15em;
  animation: pixelBlink 0.8s steps(1) infinite;
}

.ticker-track a {
  color: inherit;
  text-decoration: none;
}

.ticker-track a:hover {
  text-decoration: underline;
}

/* Dynamic @keyframes from ticker.js */

/* ボタン群 */
.clock-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.clock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #888;
  background: #ddd;
  cursor: pointer;
  color: #000;
}

.clock-btn[hidden] {
  display: none;
}

.clock-btn:hover {
  background: #bbb;
  border-color: #000;
}

.clock-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

#floatPost svg {
  width: 18px;
  height: 18px;
}

#floatRandom svg {
  width: 18px;
  height: 18px;
}

#floatWriter svg {
  fill: currentColor;
  stroke: none;
}

.logout-popup {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  z-index: 35;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px 14px;
  box-shadow: 2px 2px 0 #ccc;
}

.logout-popup[hidden] {
  display: none !important;
}

.logout-popup-text {
  margin: 0 0 8px;
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

.logout-popup-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.logout-popup-btn {
  font-family: inherit;
  font-size: 0.68rem;
  padding: 2px 10px;
  border: 1px solid #888;
  background: #ddd;
  cursor: pointer;
}

.logout-popup-btn-primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

.login-status-float {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #888;
  border-radius: 999px;
  background: #ddd;
  color: #000;
  font-size: 0.68rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}

.login-status-float[hidden] {
  display: none !important;
}

.login-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a447;
  box-shadow: 0 0 0 2px rgba(34, 164, 71, 0.18);
  flex-shrink: 0;
  animation: loginStatusPulse 1.4s steps(1) infinite;
}

@keyframes loginStatusPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(34, 164, 71, 0.38);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 2px rgba(34, 164, 71, 0.02);
  }
}

.login-status-text {
  color: #444;
  white-space: nowrap;
}

.login-status-text-logout {
  display: none;
  white-space: nowrap;
}

.login-status-float:hover .login-status-text {
  display: none;
}

.login-status-float:hover .login-status-text-logout {
  display: inline;
}

.login-status-float:hover {
  background: #bbb;
  border-color: #777;
  color: #333;
}

/* ---- 読者プロフィールボタン ---- */

.reader-profile-btn {
  font-size: 0.68rem;
}

.reader-profile-btn:hover {
  background: #bbb;
  border-color: #777;
}

.reader-profile-name {
  white-space: nowrap;
  color: #444;
}

.reader-profile-name--unset {
  color: #777;
  animation: readerNameBlink 2.4s steps(1) infinite;
}

@keyframes readerNameBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ログイン中は読者ボタンを非表示 */
body.is-admin .reader-profile-btn {
  display: none;
}
