/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --sidebar-bg: #111827;
  --sidebar-text: #e5e7eb;
  --sidebar-accent: #22c55e;
  --shell-bg: #f8fafc;
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
  --content-text: #111827;
  --muted-text: #6b7280;

  --brand-primary: #22c55e;
  --brand-bg: #0f172a;
  --brand-text: #f8fafc;
  --brand-font: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

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

body.app-body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--shell-bg);
  color: var(--content-text);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--shell-bg);
}

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: width 0.2s ease;
}

.sidebar__header {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--sidebar-accent);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar__group {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.6);
}

.sidebar__link {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar__link--indented {
  padding-left: 20px;
}

.sidebar__link:hover {
  background: rgba(34, 197, 94, 0.18);
  color: #ffffff;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.app-header__spacer {
  flex: 1;
}

.app-header__account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-text);
  font-size: 14px;
}

.logout-form {
  display: inline;
  margin: 0;
}

.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted-text);
  cursor: pointer;
}

.user-menu__trigger:hover {
  background: #f3f4f6;
}

.user-menu__email {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__arrow {
  font-size: 10px;
}

.user-menu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 100;
}

.user-menu__dropdown.is-open {
  display: block;
}

.user-menu__info {
  padding: 12px 16px;
  font-size: 13px;
  color: #374151;
  font-weight: 600;
  word-break: break-all;
}

.user-menu__divider {
  height: 1px;
  background: #e5e7eb;
}

.user-menu__logout {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 13px;
  color: #ef4444;
  cursor: pointer;
}

.user-menu__logout:hover {
  background: #fef2f2;
}

.user-menu__logout .logout-form {
  display: block;
}

.sidebar-toggle {
  border: none;
  background: #111827;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.app-content {
  padding: 24px;
}

.app-shell.is-collapsed .sidebar {
  width: 72px;
}

.app-shell.is-collapsed .sidebar__link {
  text-align: center;
  padding: 10px;
  font-size: 12px;
}

.app-shell.is-collapsed .sidebar__header,
.app-shell.is-collapsed .app-header__email {
  display: none;
}

@media (max-width: 960px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-shell.is-collapsed .sidebar {
    height: auto;
  }
}

/* LB 管理画面のログイン（Devise）。中央に 1 カラム、装飾なし。配色・フォントは LB 管理画面のほかの画面（.lb-admin-*）と揃える */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--shell-bg);
}

.login-box {
  width: 100%;
  max-width: 360px;
}

.login-box__title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--content-text);
}

.login-form {
  display: grid;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
}

.login-form__label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--content-text);
}

.login-form__input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  color: var(--content-text);
}

.login-form__input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.login-form__checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--muted-text);
}

.login-form__button {
  margin-top: 8px;
  padding: 9px 14px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.login-form__button:hover {
  background: #1d4ed8;
}

.login-form__error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
}

.public-reward-body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--brand-font);
}

.public-page {
  min-height: 100vh;
  padding: 32px 16px 48px;
}

.public-shell {
  width: min(100%, 720px);
  margin: 0 auto;
}

.public-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}

.public-logo img {
  max-width: min(220px, 70vw);
  max-height: 72px;
  object-fit: contain;
}

.campaign-content {
  color: rgba(248, 250, 252, 0.88);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .campaign-content {
    color: color-mix(in srgb, var(--brand-text) 88%, transparent);
  }
}

.campaign-content:empty {
  display: none;
}

.campaign-content h1,
.campaign-content h2,
.campaign-content h3,
.campaign-content h4 {
  margin: 0 0 12px;
  color: var(--brand-text);
  line-height: 1.25;
}

.campaign-content p {
  margin: 0 0 14px;
}

.campaign-content a {
  color: var(--brand-primary);
  text-underline-offset: 0.2em;
}

.campaign-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: 8px;
}

.campaign-content--top {
  margin-bottom: 24px;
}

.campaign-content--bottom {
  margin-top: 24px;
}

.redeem-card {
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 8px;
  padding: 24px;
  background: #3a4150;
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-card {
    border: 1px solid color-mix(in srgb, var(--brand-text) 18%, transparent);
    background: color-mix(in srgb, var(--brand-bg) 82%, white 18%);
  }
}

.redeem-card h1 {
  margin: 0 0 14px;
  color: var(--brand-text);
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.redeem-card p {
  margin: 0 0 14px;
  color: rgba(248, 250, 252, 0.84);
  line-height: 1.65;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-card p {
    color: color-mix(in srgb, var(--brand-text) 84%, transparent);
  }
}

.redeem-eyebrow {
  margin-bottom: 8px;
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.redeem-form {
  display: grid;
  gap: 12px;
}

.redeem-code-input,
.redeem-submit {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  font: inherit;
}

.redeem-code-input {
  border: 1px solid rgba(248, 250, 252, 0.22);
  padding: 0 16px;
  background: #4d5361;
  color: var(--brand-text);
  font-size: 1.1rem;
  letter-spacing: 0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-code-input {
    border: 1px solid color-mix(in srgb, var(--brand-text) 22%, transparent);
    background: color-mix(in srgb, var(--brand-bg) 74%, white 26%);
  }
}

.redeem-code-input::placeholder {
  color: rgba(248, 250, 252, 0.48);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-code-input::placeholder {
    color: color-mix(in srgb, var(--brand-text) 48%, transparent);
  }
}

.redeem-code-input:focus {
  border-color: var(--brand-primary);
  outline: 3px solid rgba(34, 197, 94, 0.32);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-code-input:focus {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 32%, transparent);
  }
}

.redeem-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  padding: 0 18px;
  background: var(--brand-primary);
  color: #06120b;
  cursor: pointer;
  font-weight: 700;
}

.redeem-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.redeem-loading {
  font-size: 0.86rem;
  font-weight: 600;
}

.redeem-card--error {
  border-color: rgba(241, 105, 106, 0.78);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-card--error {
    border-color: color-mix(in srgb, #ef4444 62%, var(--brand-text) 16%);
  }
}

.redeem-card--error + .redeem-card--form {
  margin-top: 16px;
}

.redeem-card--campaign-paused {
  border-color: rgba(246, 177, 60, 0.78);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-card--campaign-paused {
    border-color: color-mix(in srgb, #f59e0b 62%, var(--brand-text) 16%);
  }
}

.redeem-card--campaign-archived {
  border-color: rgba(132, 145, 163, 0.74);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .redeem-card--campaign-archived {
    border-color: color-mix(in srgb, #64748b 58%, var(--brand-text) 16%);
  }
}

.redeem-card--success {
  overflow: hidden;
}

.reward-amount {
  color: var(--brand-text);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.05;
}

.reward-status {
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .public-page {
    padding-top: 56px;
  }

  .redeem-form {
    grid-template-columns: 1fr 180px;
    align-items: center;
  }

  .redeem-card h1 {
    font-size: 1.8rem;
  }

  .reward-amount {
    font-size: 3rem;
  }
}

/* ===== 受付完了画面 (完了画面モックアップ準拠) ===== */

.reward-result-shell {
  padding: 0;
  overflow: hidden;
}

.reward-hero {
  position: relative;
  padding: 30px 22px 26px;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(34, 197, 94, 0.22), transparent 60%);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-hero {
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--brand-primary) 22%, transparent), transparent 60%);
  }
}

.reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1b1205;
  background: linear-gradient(120deg, #e8c06a, #f4d896);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.reward-headline {
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.reward-amount-label {
  font-size: 13px;
  color: #72da98;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-amount-label {
    color: color-mix(in srgb, var(--brand-primary) 64%, white 36%);
  }
}

.reward-amount-line {
  margin: 0;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.reward-amount-number {
  background: linear-gradient(120deg, #fff, #e8c06a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reward-amount-unit {
  font-size: 18px;
  font-weight: 700;
  margin-left: 4px;
  color: #e8c06a;
}

.reward-sub {
  font-size: 13px;
  color: rgba(248, 250, 252, 0.62);
  margin: 10px 0 0;
  line-height: 1.6;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-sub {
    color: color-mix(in srgb, var(--brand-text) 62%, transparent);
  }
}

.reward-steps-section {
  padding: 20px 20px 4px;
  text-align: left;
}

.reward-section-eyebrow {
  font-size: 11px;
  color: rgba(248, 250, 252, 0.42);
  letter-spacing: 0.1em;
  font-weight: 700;
  margin: 0 0 12px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-section-eyebrow {
    color: color-mix(in srgb, var(--brand-text) 42%, transparent);
  }
}

.reward-steps {
  display: flex;
  flex-direction: column;
}

.reward-step {
  display: flex;
  gap: 13px;
  position: relative;
  padding-bottom: 18px;
}

.reward-step:last-child {
  padding-bottom: 0;
}

.reward-step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.reward-step--done .reward-step-dot {
  background: #3fb27f;
  color: #06251a;
}

.reward-step--now .reward-step-dot {
  background: var(--brand-primary);
  color: #062311;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-step--now .reward-step-dot {
    color: color-mix(in srgb, var(--brand-primary) 18%, black 82%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 18%, transparent);
  }
}

.reward-step--todo .reward-step-dot {
  background: rgba(42, 49, 66, 0.88);
  color: rgba(248, 250, 252, 0.42);
  border: 1px solid rgba(248, 250, 252, 0.16);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-step--todo .reward-step-dot {
    background: color-mix(in srgb, var(--brand-bg) 78%, white 10%);
    color: color-mix(in srgb, var(--brand-text) 42%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-text) 16%, transparent);
  }
}

.reward-step-line {
  width: 2px;
  flex: 1;
  background: rgba(248, 250, 252, 0.16);
  margin: 3px 0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-step-line {
    background: color-mix(in srgb, var(--brand-text) 16%, transparent);
  }
}

.reward-step-body {
  padding-top: 2px;
}

.reward-step-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 3px;
}

.reward-step-body p {
  font-size: 12px;
  color: rgba(248, 250, 252, 0.62);
  line-height: 1.6;
  margin: 0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-step-body p {
    color: color-mix(in srgb, var(--brand-text) 62%, transparent);
  }
}

.reward-step-tag {
  font-size: 10px;
  color: var(--brand-primary);
  font-weight: 700;
  margin-left: 6px;
}

.reward-cond {
  margin: 8px 20px 0;
  background: rgba(35, 43, 60, 0.94);
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: 14px;
  padding: 15px 16px;
  text-align: left;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-cond {
    background: color-mix(in srgb, var(--brand-bg) 86%, white 8%);
    border: 1px solid color-mix(in srgb, var(--brand-text) 16%, transparent);
  }
}

.reward-cond h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.reward-cond-ic {
  color: var(--brand-primary);
}

.reward-cond ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.reward-cond li {
  font-size: 12.5px;
  color: rgba(248, 250, 252, 0.62);
  line-height: 1.55;
  display: flex;
  gap: 8px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-cond li {
    color: color-mix(in srgb, var(--brand-text) 62%, transparent);
  }
}

.reward-cond-chk {
  color: #72da98;
  flex: none;
  font-weight: 700;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-cond-chk {
    color: color-mix(in srgb, var(--brand-primary) 64%, white 36%);
  }
}

.reward-cta-wrap {
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-btn {
  border: none;
  border-radius: 13px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: block;
}

.reward-btn--primary {
  background: var(--brand-primary);
  color: #051c0d;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-btn--primary {
    color: color-mix(in srgb, var(--brand-primary) 14%, black 86%);
  }
}

.reward-btn-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  margin-top: 2px;
}

.reward-btn--ghost {
  background: transparent;
  color: rgba(248, 250, 252, 0.62);
  border: 1px solid rgba(248, 250, 252, 0.16);
  font-size: 13px;
  padding: 13px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-btn--ghost {
    color: color-mix(in srgb, var(--brand-text) 62%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-text) 16%, transparent);
  }
}

.reward-foot {
  padding: 6px 22px 24px;
  text-align: center;
}

.reward-foot a {
  color: #72da98;
  font-size: 12px;
  text-decoration: none;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-foot a {
    color: color-mix(in srgb, var(--brand-primary) 64%, white 36%);
  }
}

.reward-foot p {
  font-size: 10.5px;
  color: rgba(248, 250, 252, 0.42);
  line-height: 1.6;
  margin: 10px 0 0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reward-foot p {
    color: color-mix(in srgb, var(--brand-text) 42%, transparent);
  }
}

.reward-result-shell .reward-status {
  padding: 0 22px 20px;
  margin: 0;
}


/* ラッキーボールのエンドユーザー向けの画面（設計書 §6.1）。見た目は入稿の CSS で着せ替える前提の最低限 */
.lb-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.lb-card {
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
}

.lb-card-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.lb-card-note,
.lb-card-period {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.lb-card-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.lb-lp-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.lb-redeem-panel {
  display: grid;
  gap: 12px;
}

.lb-ball-count {
  font-size: 1.5rem;
  font-weight: 700;
}

/* 反映の見込みの 1 行（#1180）。状態のカードの下に、カードの外の補足として出す */
.lb-reflect-hint {
  margin: 0;
  color: rgba(248, 250, 252, 0.84);
  font-size: 0.9rem;
  line-height: 1.65;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .lb-reflect-hint {
    color: color-mix(in srgb, var(--brand-text) 84%, transparent);
  }
}

.lb-reveal-animation img,
.lb-reveal-animation video {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.lb-prize-rank {
  font-size: 1.5rem;
  font-weight: 800;
}

.lb-prize-jpy {
  font-size: 1.25rem;
  font-weight: 700;
}

.lb-close {
  display: block;
  margin-top: 12px;
  text-align: center;
}

.lb-preview-badge {
  margin: 0 0 12px;
  padding: 4px 8px;
  border: 1px dashed currentColor;
  font-size: 0.8rem;
  text-align: center;
}

/* LB 管理画面の共通の部品（設計書 §6.2） */
.lb-admin-card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; }
.lb-admin-card h1, .lb-admin-card h2, .lb-admin-card h3 { margin: 0 0 12px; }
.lb-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lb-admin-head h1, .lb-admin-head h2 { margin: 0; }
.lb-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lb-admin-actions form { display: inline; margin: 0; }
.lb-admin-btn { display: inline-block; background: #2563eb; color: #ffffff; border: 1px solid #2563eb; padding: 7px 14px; border-radius: 8px; text-decoration: none; cursor: pointer; font: inherit; font-size: 14px; }
.lb-admin-btn--secondary { background: #ffffff; color: #2563eb; }
.lb-admin-btn--danger { background: #dc2626; border-color: #dc2626; }
.lb-admin-link { color: #2563eb; text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
.lb-admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-admin-table th { background: #f3f4f6; text-align: left; padding: 8px 10px; font-weight: 600; white-space: nowrap; }
.lb-admin-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.lb-admin-table .lb-admin-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-admin-table tr.lb-admin-row--current td { background: #eff6ff; }
.lb-admin-table-wrap { overflow-x: auto; }
.lb-admin-field { margin-bottom: 16px; }
.lb-admin-label { display: block; font-weight: 600; margin-bottom: 6px; }
.lb-admin-input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 1px solid #d1d5db; font: inherit; line-height: 1.4; background: #ffffff; }
select.lb-admin-input { height: 40px; }
.lb-admin-input--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lb-admin-input--short { width: 14em; max-width: 100%; }
select.lb-admin-input--short { width: auto; min-width: 14em; }
input[type="datetime-local"].lb-admin-input, input[type="date"].lb-admin-input { width: 16em; max-width: 100%; }
.lb-admin-input--count { width: 8em; text-align: right; }
.lb-admin-fixed-value { margin: 0; min-height: 40px; display: flex; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-admin-hint { margin: 6px 0 0; font-size: 12px; color: #6b7280; line-height: 1.6; }
.lb-admin-errors { background: #fee2e2; color: #991b1b; padding: 12px; border-radius: 8px; margin-bottom: 16px; }
.lb-admin-errors ul { margin: 0; padding-left: 18px; }
.lb-admin-note { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 12px; border-radius: 8px; margin: 12px 0; line-height: 1.6; }
.lb-admin-flash { margin-bottom: 16px; border-radius: 8px; padding: 10px 12px; }
.lb-admin-flash--notice { border: 1px solid #86efac; background: #f0fdf4; color: #166534; }
.lb-admin-flash--alert { border: 1px solid #fca5a5; background: #fef2f2; color: #991b1b; }
.lb-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin: 0; }
.lb-admin-grid dt { font-size: 12px; color: #6b7280; }
.lb-admin-grid dd { margin: 2px 0 0; }
.lb-admin-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e5e7eb; color: #374151; }
.lb-admin-badge--published { background: #dcfce7; color: #166534; }
.lb-admin-badge--paused { background: #fef3c7; color: #92400e; }
.lb-admin-badge--lot-current { background: #dbeafe; color: #1e40af; }
.lb-admin-badge--lot-ended { background: #f3f4f6; color: #6b7280; }
.lb-admin-pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 14px; }
.lb-admin-inline-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
/* 項目の枠の外に置いた説明（見出しの直下・横並びの入力欄の直下）にも、次の項目との間を空ける */
.lb-admin-card > h1 + .lb-admin-hint { margin: 0 0 20px; }
.lb-admin-inline-fields + .lb-admin-hint { margin: -10px 0 16px; }
/* 在庫ロットを作る操作の入力の下に出す、ロットの切替時間を含めた実際の開催期間と在庫ロットの数（lot_period_preview_controller.js） */
.lb-admin-period-preview { margin: 0 0 16px; padding: 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; }
.lb-admin-period-preview dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.lb-admin-period-preview[hidden], .lb-admin-note[hidden] { display: none; }

/* ダッシュボード（設計書 §6.2.3）。色は LB 管理画面の配色に合わせる */
.lb-admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.lb-admin-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #ffffff; color: #374151; text-decoration: none; font-size: 14px; }
.lb-admin-tab:hover { border-color: #93c5fd; }
.lb-admin-tab--current { background: #eff6ff; border-color: #2563eb; color: #1e40af; font-weight: 600; }
.lb-admin-dashboard-scope { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.lb-admin-dashboard-scope .lb-admin-hint { margin: 0; }
.lb-admin-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #fca5a5; border-radius: 8px; background: #fef2f2; color: #991b1b; font-weight: 600; }
.lb-admin-hint.lb-admin-ticket-grant-status { margin: 8px 0 0; }
.lb-admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.lb-admin-stat { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 20px; min-width: 0; }
.lb-admin-stat__label { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #6b7280; line-height: 1.5; }
.lb-admin-stat__value { margin: 0 0 8px; font-size: 30px; font-weight: 700; line-height: 1.2; color: #111827; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lb-admin-stat__unit { font-size: 14px; font-weight: 400; color: #374151; }
.lb-admin-stat__value.lb-admin-stat__value--sub { font-size: 24px; }
.lb-admin-stat__note { margin: 2px 0 0; font-size: 12px; color: #6b7280; line-height: 1.6; }
.lb-admin-meter { display: block; margin: 4px 0 8px; }
.lb-admin-stat__links { list-style: none; margin: 4px 0 2px; padding: 0; font-size: 12px; line-height: 1.7; }
.lb-admin-meter__track { fill: #e5e7eb; }
.lb-admin-meter__fill { fill: #2563eb; }
.lb-admin-stack { display: block; border-radius: 6px; background: #f3f4f6; }
.lb-admin-stack__part--opened { fill: #2563eb; background: #2563eb; }
.lb-admin-stack__part--claimed-open { fill: #93c5fd; background: #93c5fd; }
.lb-admin-stack__part--claimed-expired { fill: #dc2626; background: #dc2626; }
.lb-admin-stack__part--unexchanged-open { fill: #e5e7eb; background: #e5e7eb; }
.lb-admin-stack__part--unexchanged-ended { fill: #f59e0b; background: #f59e0b; }
.lb-admin-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 13px; color: #374151; }
.lb-admin-legend li { display: inline-block; line-height: 1.6; }
.lb-admin-legend__swatch { display: inline-block; vertical-align: -1px; margin-right: 6px; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(17, 24, 39, 0.12); }
.lb-admin-legend__line { display: inline-block; vertical-align: middle; margin-right: 6px; width: 16px; height: 0; border-top: 2px solid #111827; }
.lb-admin-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lb-admin-panels > .lb-admin-card { margin-bottom: 16px; min-width: 0; }
.lb-admin-chart { width: 100%; overflow-x: auto; margin-top: 8px; }
.lb-admin-chart svg { display: block; width: 100%; min-width: 420px; height: auto; }
.lb-admin-chart__grid { stroke: #e5e7eb; stroke-width: 1; }
.lb-admin-chart__axis { fill: #6b7280; font-size: 11px; }
.lb-admin-chart__bar--granted { fill: #dbeafe; background: #dbeafe; }
.lb-admin-chart__bar--exchanged { fill: #93c5fd; background: #93c5fd; }
.lb-admin-chart__bar--opened { fill: #2563eb; background: #2563eb; }
.lb-admin-chart__stock { stroke: #111827; stroke-width: 2; }
.lb-admin-table td.lb-admin-cell--nowrap { white-space: nowrap; }
.lb-admin-table--compact th, .lb-admin-table--compact td { padding-left: 8px; padding-right: 8px; }
/* エンドユーザー検索（設計書 §6.2.4） */
.lb-admin-badge--expired { background: #fee2e2; color: #991b1b; white-space: nowrap; }
.lb-admin-text--danger { color: #dc2626; font-weight: 600; }
.lb-admin-tx-hash { font-size: 12px; color: #6b7280; word-break: break-all; }
.lb-admin-cell__sub { font-size: 12px; color: #6b7280; }
.lb-admin-cell__sub label { font-weight: 400; }
.lb-admin-table td.lb-admin-cell--transfer { min-width: 13em; }
.lb-admin-nowrap { white-space: nowrap; }
.lb-admin-table--wrap-head th { white-space: normal; }
.lb-admin-actions--spaced { margin-top: 16px; }
/* 残りの在庫を移す（設計書 §5.7）: 移す元・移す先の在庫ロットを大きく出し、取り違えを防ぐ */
.lb-admin-move-lot { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; border: 2px solid #2563eb; border-radius: 10px; background: #eff6ff; margin: 0 0 16px; }
.lb-admin-move-lot__caption { font-size: 12px; font-weight: 600; color: #1e40af; }
.lb-admin-move-lot__label { font-size: 22px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; }
.lb-admin-move-band { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 16px; }
.lb-admin-move-band .lb-admin-move-lot { margin: 0; }
.lb-admin-move-band__arrow { display: flex; flex-direction: column; align-items: center; font-size: 28px; color: #2563eb; line-height: 1.1; }
.lb-admin-move-band__total { font-size: 16px; font-weight: 700; color: #111827; }
.lb-admin-pager form { display: inline; margin: 0; }
.lb-admin-table tr.lb-admin-row--total td { font-weight: 600; background: #f9fafb; }
@media (max-width: 1100px) {
  .lb-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-admin-panels { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .lb-admin-stats { grid-template-columns: minmax(0, 1fr); }
  .lb-admin-stat__value { font-size: 26px; }
}

/* 入稿のプレビュー（LB 管理画面の中だけ）。ボタンは押せないようにする */
.lb-preview-bar { background: #111827; color: #ffffff; padding: 8px 16px; font-size: 13px; line-height: 1.8; }
.lb-preview-bar a { color: #93c5fd; margin-right: 10px; }
.lb-preview-bar a[aria-current="page"] { color: #ffffff; font-weight: 700; text-decoration: none; }
.lb-preview-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
/* プレビューの中のリンク（LP のカード等）は押せない。admin のホストでは公開の URL に届かないため */
.lb-preview-fieldset a { pointer-events: none; cursor: default; }

/* 在庫の一括登録の振り分け方のラジオボタン（§5.6） */
.lb-admin-allocation-methods { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.lb-admin-radio { display: flex; align-items: center; gap: 6px; margin: 4px 0; cursor: pointer; }
.lb-admin-radio .lb-admin-radio-note { margin: 0; }
