/* TOPページ(index.php)専用スタイル。ゲスト・ログイン中の両方から見られる。
   style.css のグローバル指定(input/button の width:100% / margin-bottom、body の中央寄せ)をこのファイル内で打ち消している。
   新規要素を足すときは margin:0・width を明示すること。 */

[hidden] { display: none !important; }

.t-body { display: block; align-items: initial; justify-content: initial; min-height: 100vh; }

.t-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: var(--night-deep);
  border-bottom: 1px solid var(--border-soft);
}
.t-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.t-logo img { width: 32px; height: 32px; border-radius: 8px; }
.t-acts { display: flex; align-items: center; gap: 8px; min-width: 0; }
.t-user {
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-soft);
}

.t-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border-soft);
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.t-btn:hover { border-color: var(--ember); }
.t-btn.primary {
  background: linear-gradient(180deg, #f5a860, var(--ember));
  color: #402406;
  border-color: transparent;
}
.t-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.t-icon-btn:hover { background: var(--paper-soft); }

.t-wrap { max-width: 980px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 24px; }

.t-hero { text-align: center; padding: 28px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.t-hero h1 { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.35; text-align: center; color: var(--ink); }
.t-hero p { margin: 0; max-width: 520px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.t-search { display: flex; gap: 8px; width: 100%; max-width: 520px; }
.t-search input {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-soft);
  background: var(--paper-field);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}
.t-search input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-glow); }

.t-sections { display: flex; flex-direction: column; gap: 24px; }
.t-section { display: flex; flex-direction: column; gap: 12px; }
.t-sec-title { margin: 0; text-align: left; font-size: 15px; color: var(--ink-soft); font-family: var(--font-display); }

.t-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.t-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  min-height: 120px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.t-admin-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper-field);
  border: 1px solid var(--ember);
  border-radius: 999px;
}
.t-tile:hover { border-color: var(--ember); transform: translateY(-2px); }
/* 準備中のカード(リンク・イベントを持たない表示のみ) */
.t-tile-disabled { opacity: 0.6; cursor: not-allowed; user-select: none; }
.t-tile-disabled:hover { border-color: var(--border-soft); transform: none; }
.t-tile .ic { line-height: 1; color: var(--ember-light); }
.t-ico {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.t-drawer a .t-ico { width: 20px; height: 20px; color: var(--ember-light); }
.t-tile h3 { margin: 0; text-align: left; font-size: 16px; font-family: var(--font-display); color: var(--ink); }
.t-tile p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.t-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.t-card strong { color: var(--ink); }
.t-card p { margin: 4px 0 0; font-size: 12px; color: var(--dust); }
.t-card-acts { display: flex; gap: 8px; flex-wrap: wrap; }

.t-news { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--border-soft); border-radius: 14px; }
.t-news li { display: flex; gap: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--border-soft); }
.t-news li:last-child { border-bottom: none; }
.t-news time { flex: none; color: var(--dust); font-size: 13px; }

.t-footer { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--dust); display: flex; flex-direction: column; gap: 8px; }
.t-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }
.t-footer-links a { color: var(--ink-soft); text-decoration: none; }
.t-footer-links a:hover { color: var(--ember-light); text-decoration: underline; }

/* 右ドロワー */
.t-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 200;
}
.t-scrim.open { opacity: 1; pointer-events: auto; }
.t-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 86vw);
  background: var(--paper);
  border-left: 1px solid var(--border-soft);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 201;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  overflow-y: auto;
}
.t-drawer.open { transform: translateX(0); }
.t-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-weight: 700; font-family: var(--font-display); }
.t-drawer .grp { margin: 12px 12px 2px; font-size: 11px; font-weight: 700; color: var(--dust); }
.t-drawer a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
}
.t-drawer a:hover { background: var(--paper-soft); color: var(--ember-light); }
.t-drawer .t-disabled {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dust);
  opacity: 0.7;
  cursor: not-allowed;
  user-select: none;
}
.t-drawer .t-disabled .t-ico { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .t-wrap { padding: 12px; }
  .t-hero h1 { font-size: 22px; }
}
