/* =========================================================================
 * voxellab.css — ボクセルキャンパス (voxelcampus) トップポータル デザインシステム
 * デザインルール：不要なセカンダリラベルや説明を避ける。レイアウトに説明させる。
 * ========================================================================= */
:root {
  --bg-sky: hsl(204, 62%, 96%);
  --bg-tint: hsl(202, 55%, 91%);
  --surface: #ffffff;
  --surface-soft: hsl(204, 45%, 98%);
  --ink-900: hsl(214, 52%, 15%);
  --ink-700: hsl(214, 26%, 34%);
  --ink-500: hsl(214, 18%, 48%);

  --navy-800: hsl(216, 56%, 19%);
  --navy-700: hsl(215, 50%, 26%);
  --cyan-600: hsl(199, 88%, 40%);
  --cyan-500: hsl(197, 88%, 48%);
  --cyan-100: hsl(198, 86%, 93%);
  --amber-100: hsl(45, 96%, 91%);
  --orange-600: hsl(26, 88%, 45%);
  --orange-700: hsl(24, 88%, 31%);
  --emerald-600: hsl(152, 68%, 34%);
  --emerald-700: hsl(152, 72%, 22%);

  --border-subtle: hsl(208, 32%, 86%);
  --shadow-md: 0 12px 28px hsla(214, 45%, 15%, 0.08);
  --shadow-lg: 0 18px 42px hsla(214, 48%, 14%, 0.13);

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", sans-serif;
  background-color: var(--bg-sky);
  color: var(--ink-900);
  font-size: 16.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

ruby {
  ruby-align: center;
  ruby-position: over;
}

ruby rt {
  font-size: 0.58em;
  font-weight: 800;
  line-height: 1.1;
  color: inherit;
  opacity: 0.88;
  letter-spacing: 0.02em;
  user-select: none;
}

.jukucho-talk-bar ruby rt {
  color: hsl(196, 92%, 86%);
  opacity: 1;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- ヘッダー ---------------- */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-800);
}

.brand-logo-mark {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}

.brand-cube {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--navy-800);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.brand-en {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.total-stats-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.4;
  background: var(--amber-100);
  color: hsl(32, 85%, 28%);
}

.stat-pill.badges {
  background: var(--cyan-100);
  color: var(--navy-800);
}

.pass-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--navy-800);
  background: var(--surface);
  color: var(--navy-800);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.pass-btn:hover {
  background: var(--navy-800);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ---------------- ヒーロー（イラスト＋3頭身じゅくちょうナビ） ---------------- */
.hero-section {
  padding: 24px 0 12px;
}

.hero-frame {
  background: var(--navy-800);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
}

.hero-art-wrap {
  aspect-ratio: 21 / 9.2;
  max-height: 430px;
  width: 100%;
  background: var(--navy-800);
  overflow: hidden;
}

.hero-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  display: block;
}

.jukucho-talk-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 26px;
  background: var(--navy-800);
  color: #ffffff;
  border-top: 1px solid rgba(125, 211, 252, 0.22);
}

.talk-avatar-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--cyan-500);
  background: #09213b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.talk-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.talk-content {
  flex: 1;
  min-width: 0;
}

.hero-title {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.6vw, 29px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.talk-bubble-text {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.9;
  color: hsl(198, 92%, 88%);
}

/* ---------------- ワールドカード（2カラム・レイアウト自明構造） ---------------- */
.worlds-section {
  padding: 16px 0 48px;
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.world-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.world-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.world-card-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy-800);
  overflow: hidden;
}

.world-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.world-card:hover .world-card-thumb img {
  transform: scale(1.03);
}

.world-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.world-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.world-card-title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 23.5px);
  font-weight: 900;
  line-height: 1.55;
  color: var(--ink-900);
}

.world-progress-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prog-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--navy-800);
  white-space: nowrap;
}

.world-desc {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.92;
  color: var(--ink-700);
  flex: 1;
}

.btn-world-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  margin-top: 4px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--cyan-600);
  color: #ffffff;
  text-decoration: none;
  font-size: 17.5px;
  font-weight: 900;
  line-height: 1.45;
  box-shadow: 0 4px 0 hsl(201, 90%, 27%);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.btn-world-enter:hover {
  filter: brightness(0.96);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 hsl(201, 90%, 27%);
}

.btn-world-enter:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 hsl(201, 90%, 27%);
}

.world-card[data-world="circuit"] .btn-world-enter,
.world-card[data-theme="orange"] .btn-world-enter {
  background: var(--orange-600);
  box-shadow: 0 4px 0 var(--orange-700);
}

.world-card[data-world="circuit"] .btn-world-enter:hover,
.world-card[data-theme="orange"] .btn-world-enter:hover {
  box-shadow: 0 6px 0 var(--orange-700);
}

.world-card[data-world="marukou"] .btn-world-enter,
.world-card[data-theme="emerald"] .btn-world-enter {
  background: var(--emerald-600);
  box-shadow: 0 4px 0 var(--emerald-700);
}

.world-card[data-world="marukou"] .btn-world-enter:hover,
.world-card[data-theme="emerald"] .btn-world-enter:hover {
  box-shadow: 0 6px 0 var(--emerald-700);
}

.world-card[data-theme="amber"] .btn-world-enter {
  background: hsl(35, 90%, 44%);
  box-shadow: 0 4px 0 hsl(31, 90%, 29%);
}

.world-card[data-theme="amber"] .btn-world-enter:hover {
  box-shadow: 0 6px 0 hsl(31, 90%, 29%);
}

.world-card[data-theme="indigo"] .btn-world-enter {
  background: hsl(234, 72%, 54%);
  box-shadow: 0 4px 0 hsl(236, 72%, 36%);
}

.world-card[data-theme="indigo"] .btn-world-enter:hover {
  box-shadow: 0 6px 0 hsl(236, 72%, 36%);
}

.world-card[data-theme="rose"] .btn-world-enter {
  background: hsl(344, 76%, 50%);
  box-shadow: 0 4px 0 hsl(344, 78%, 33%);
}

.world-card[data-theme="rose"] .btn-world-enter:hover {
  box-shadow: 0 6px 0 hsl(344, 78%, 33%);
}

/* ---------------- スタート認証・ユーザー切替モーダル ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 52, 0.68);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 425px;
  background: var(--surface);
  border-radius: 24px;
  padding: 24px 26px 28px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-subtle);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.modal-title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  color: var(--navy-800);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-sky);
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: var(--bg-sky);
  margin-bottom: 16px;
}

.auth-tab {
  padding: 10px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-700);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--navy-800);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.form-field {
  margin-bottom: 15px;
}

.form-field label {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.75;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--border-subtle);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-900);
}

.form-field input:focus {
  outline: none;
  border-color: var(--cyan-500);
}

.pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pin-input-wrap input {
  letter-spacing: 0.36em;
  font-size: 21px;
  text-align: center;
  padding-right: 44px;
}

.pin-vis-btn {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 17px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-save-pass {
  width: 100%;
  flex: 1 1 170px;
  padding: 13px 16px;
  border-radius: 13px;
  border: none;
  background: var(--navy-800);
  color: #ffffff;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: 0 4px 0 hsl(216, 58%, 12%);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn-save-pass:hover {
  transform: translateY(-1px);
}

.btn-save-pass:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-load-cloud {
  flex: 1 1 140px;
  padding: 12px 15px;
  border-radius: 13px;
  border: 2px solid var(--border-subtle);
  background: var(--surface-soft);
  color: var(--navy-800);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 12px;
  color: var(--ink-500);
  font-size: 13.5px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.btn-guest-start {
  width: 100%;
  padding: 12px 16px;
  border-radius: 13px;
  border: 2px solid var(--border-subtle);
  background: var(--surface-soft);
  color: var(--ink-700);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-guest-start:hover {
  border-color: var(--navy-800);
  color: var(--navy-800);
  background: #ffffff;
}

.account-summary-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-sky);
  border: 1.5px solid var(--border-subtle);
}

.account-badge-icon {
  font-size: 28px;
}

.account-summary-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.account-user-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-plan-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: var(--cyan-100);
  color: var(--navy-800);
}

.pass-status-msg {
  margin: 10px 0 0;
  min-height: 22px;
  font-size: 14.5px;
  line-height: 1.7;
  font-weight: 800;
  color: var(--cyan-600);
  text-align: center;
}

.pass-status-msg.is-error {
  color: #dc2626;
}

/* ---------------- フッター ---------------- */
.site-footer {
  padding: 18px 0 26px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-500);
}

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 820px) {
  .worlds-grid {
    grid-template-columns: 1fr;
  }

  .hero-art-wrap {
    aspect-ratio: 16 / 9;
  }

  .jukucho-talk-bar {
    padding: 15px 18px;
    gap: 14px;
  }

  .talk-avatar-ring {
    width: 60px;
    height: 60px;
  }
}
