/* Sassビルドを廃止し、このCSSを正本として直接編集する */


:root {
  --bg-soft: #f0f4ff;
  --bg-bright: #ececec;
  --text: #111827;
  --muted: rgba(0, 0, 0, 0.7);
  --surface: #ffffff;
  --card: #ffffff;
  --page-bg: #030615;
  --outline: #d1d5db;
  --panel-border: #e5e7eb;
  --timeline-header: #f5f9fb;
  --timeline-weekend: #f5f9fb;
  --accent: #111827;
  --accent-soft: rgba(15, 23, 42, 0.06);
  --accent-2: #4b5563;
  --highlight: #111827;
  --danger: #b91c1c;
  --shadow-soft: 0px 0px 4px rgba(0, 0, 0, 0.2);
  --radius-panel: 6px;
  --radius-card: 6px;
  --font-size-base: 15px;
  --font-size-sm: 0.9rem;
  --font-size-xs: 0.78rem;
  --font-letter-spacing: 0.01em;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--page-bg);
  background-image: radial-gradient(circle at 30% 20%, rgba(64, 81, 181, 0.25), transparent 50%),
    radial-gradient(circle at 70% 15%, rgba(236, 72, 153, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(3, 6, 21, 0.9), rgba(4, 9, 24, 0.95));
  color: var(--text);
  letter-spacing: var(--font-letter-spacing);
  line-height: 1.6;
  font-size: var(--font-size-base);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

h2,
h3 {
  letter-spacing: 0.02em;
}

p {
  color: #000;
}

.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;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
  letter-spacing: var(--font-letter-spacing);
}

.background-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.25), transparent 60%),
    radial-gradient(circle at 85% -10%, rgba(244, 114, 182, 0.2), transparent 55%);
}

.background-overlay {
  position: absolute;
  inset: -5% -5% 0;
  background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.3), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.25), transparent 55%),
    linear-gradient(160deg, rgba(2, 6, 23, 0.8), rgba(1, 3, 14, 0.95));
  filter: blur(60px);
  opacity: 0.9;
}

.background-canvas {
  position: absolute;
  inset: 0;
}

.background-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 22px rgba(94, 234, 212, 0.15));
}

.app-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.button {
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  word-break: keep-all;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.button.ghost {
  background: rgba(243, 244, 246, 0.4);
  color: #fff;
  border: none;
}

/* Variants for specific actions */
#back-to-home.button {
  background: rgb(25 189 255 / 50%);
  color: #fff;
  border-color: #ddd;
  /* margin: 20px 0; */
}

#webhook-save-button.button {
  background: rgba(16, 185, 129, 0.5);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.2);
  margin: 20px 0;
  min-width: 100px;
}

#status-confirm-confirm.button {
  background: #10b981;
  color: #fff;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.webhook-preview-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.webhook-preview {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  padding: 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  color: #000;
  font-size: 0.85rem;
  max-height: 320px;
  overflow: auto;
}

.webhook-preview-meta {
  color: #fff;
  font-size: 0.82rem;
}

.google-login-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.google-render-target {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  cursor: pointer;
}

.google-render-target > div,
.google-render-target iframe {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
}

.button.google-login {
  border-radius: 999px;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff),
    linear-gradient(120deg, #4285f4 0%, #34a853 35%, #fbbc05 67%, #ea4335 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  font-weight: 600;
  padding: 10px 18px;
  gap: 10px;
  justify-content: center;
  text-align: center;
  max-width: 240px;
}

.button.google-login:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.button.google-login .google-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4285f4;
  background: #fff;
}

.button.google-login .google-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.hero {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 10px 0px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.hero-menu {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-left: 0;
  margin-top: 2px;
  margin-bottom: 2px;
  padding: 0;
  border: none;
  background: transparent;
}
.hero-menu-global {
  width: 100%;
  justify-content: flex-left;
  gap: 0px;
  /* padding: 10px 16px 0; */
  padding: 8px 0px;
  flex-wrap: wrap;
  background: rgb(76 76 76 / 30%);
  margin-bottom: 20px;
}

.hero-menu-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0.86;
  letter-spacing: 0.05em;
  padding: 2px 20px;
  border-bottom: 2px solid transparent;
  border-right: 1px solid #5d5d5d;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.hero-menu-link:hover {
  opacity: 1;
  color: rgb(132 57 229);
  border-bottom-color: transparent;
}

.hero-main h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #fff;
}
.hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 100%;
}

.hero-logo {
  display: block;
  height: 100px;
  width: auto;
  border: none;
  outline: none;
  background: transparent;
}

.hero-announcement {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  align-self: flex-start;
  margin-bottom: 4px;
}

.hero-announcement-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 148, 255, 0.7);
}

.hero-announcement-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ffffff;
  white-space: pre-wrap;
}

.hero-auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  width: 270px;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  width: 100%;
  min-height: 32px;
}

.auth-actions .auth-mypage {
  background: rgba(59, 130, 246, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.9);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
  min-height: 32px;
}

.auth-actions .auth-mypage:hover {
  background: rgba(59, 130, 246, 0.4);
}

.auth-actions .auth-logout {
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
  min-height: 32px;
  background: rgb(173 19 19 / 18%);
  border: 1px solid rgb(191 48 48 / 45%);
  color: #fee2e2;
}

.auth-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  width: 100%;
}

.mypage-link-row {
  display: none;
}

.hero-auth p {
  margin: 0;
}

.auth-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  padding: 0px;
  background: transparent;
  border: none;
  border-radius: 10px;
  min-height: 45px;
}

.auth-google {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.auth-google button {
  min-height: 34px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.auth-message {
  margin: 4px auto 0;
  font-size: 0.78rem;
  color: #ffffff;
  min-height: 1em;
  letter-spacing: 0.01em;
  display: inline-block;
  text-align: left;
  width: auto;
  max-width: 100%;
  align-self: center;
}

.webhook-status {
  display: block;
  text-align: center;
  font-size: 14px;
  margin-top: 6px;
  color: #67c96a;
  border-bottom: 1px solid transparent;
  padding: 4px 0;
}

.webhook-status.error {
  color: #fca5a5;
  border-bottom-color: #fca5a5;
}

.webhook-status.has-text {
  border-bottom-color: #67c96a;
}

.auth-message.error {
  color: #fca5a5;
}

.auth-state .auth-user-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  border: none;
  width: 100%;
  flex-wrap: wrap;
}

.dev-login {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 8px;
  width: 100%;
  color: #ffffff;
}

.dev-login .task-toggle,
.dev-login .task-toggle span {
  color: #ffffff;
}

.dev-login-note {
  margin: 0;
  font-size: var(--font-size-xs);
  color: #000;
  text-align: center;
  max-width: 260px;
  line-height: 1.3;
}

.auth-user-email {
  font-weight: 600;
  color: var(--text);
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 0px;
}

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .task-panel,
  .timeline-panel,
  .mypage-panel {
    width: 100%;
    max-width: 100%;
  }
}

.panel {
  background-color: rgb(36 36 36 / 70%);
  border-radius: 4px;
  border: 0;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.panel.task-panel,
.panel.timeline-panel {
  box-shadow: none;
  background-color: rgb(36 36 36 / 70%);
  border: 0;
}

.panel.seo-panel {
  grid-column: 1 / -1;
  box-shadow: none;
  background-color: rgb(0 0 0 / 70%);
  color: #ffffff;
  padding: 18px 20px 16px;
}
.seo-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.seo-lead {
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.75;
  margin: 0 0 10px;
}
.seo-lead a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.seo-lead a:hover { color: #c8d3ff; }
.seo-howto {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.7;
}
.seo-howto-label {
  display: inline-block;
  color: #ffffff;
  font-weight: 600;
  margin-right: 8px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0px;
}

.panel-head h2 {
  margin: 0 0 20px 0;
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  font-weight: 700;
  color: #fff;

}

.panel-head p {
  margin: 2px 0 0;
  color: #fff;
  font-size: var(--font-size-sm);
}

.panel-head .description {
  font-size: 0.86rem;
  padding: 0px;
  background: none;
  color: #fff;
  margin: 0 0 16px 0;
  border: none;
  border-radius: 4px;
  box-shadow: none;
}

.task-controls,
.timeline-filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: #fff;
  flex-wrap: wrap;
  margin: 16px 0 10px;
}
.timeline-filters .month-switch {
  margin-left: auto;
}
.timeline-status-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 2px 0 10px;
  padding: 8px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
}

.timeline-status-filter-label {
  font-size: 0.78rem;
  color: #c8d3ff;
  font-weight: 600;
  padding: 0 6px;
  white-space: nowrap;
}

/* 各ステータスのチェックボックス色とラベル文字色をステータスカラーに合わせる */

.timeline-tcg-filter .timeline-tcg-checkbox {
  accent-color: #10b981;
}
.timeline-tcg-filter .timeline-tcg-checkbox + span {
  color: rgba(255, 255, 255, 0.92);
}
.timeline-status-filter .timeline-status-checkbox[data-status="active"] {
  accent-color: #fca5a5;
}
.timeline-status-filter .timeline-status-checkbox[data-status="active"] + span {
  color: #fca5a5;
  font-weight: 600;
}
.timeline-status-filter .timeline-status-checkbox[data-status="upcoming"] {
  accent-color: #60a5fa;
}
.timeline-status-filter .timeline-status-checkbox[data-status="upcoming"] + span {
  color: #60a5fa;
  font-weight: 600;
}
.timeline-status-filter .timeline-status-checkbox[data-status="closed"] {
  accent-color: #000000;
}
.timeline-status-filter .timeline-status-checkbox[data-status="closed"] + span {
  color: #ffffff;
  font-weight: 600;
}
.timeline-status-filter .timeline-status-checkbox[data-status="completed"] {
  accent-color: #34d399;
}
.timeline-status-filter .timeline-status-checkbox[data-status="completed"] + span {
  color: #34d399;
  font-weight: 600;
}
.timeline-status-filter .timeline-status-checkbox[data-status="declined"] {
  accent-color: #000000;
}
.timeline-status-filter .timeline-status-checkbox[data-status="declined"] + span {
  color: #ffffff;
  font-weight: 600;
}

.timeline-filters-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeline-filters-left .timeline-meta {
  min-height: 0;
  margin: 0;
}

.task-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0px;
  cursor: pointer;
  user-select: none;
  color: #fff;
}

.task-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.timeline-panel {
  position: relative;
}

.task-panel {
  width: 100%;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 0;
}

.product-select-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  font-size: var(--font-size-sm);
}

.product-select-group label {
  font-size: 0.82rem;
  color: #fff;
}

#product-select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--outline);
  background: #ffffff;
  font-size: 0.9rem;
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.23);
}

.month-switch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-size: 0.86rem;
  color: #fff;
  box-sizing: border-box;
}

.month-switch-year,
.month-switch-month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.month-switch-year {
  padding: 8px 10px;
  gap: 12px;
  background: #4b4b4b;
}

.month-switch-month {
  gap: 8px;
  padding: 6px 8px;
  background: #f9fafb;
  color: #000;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.month-switch button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.month-switch-year button {
  width: 26px;
  height: 26px;
  background: #cacaca;
  color: var(--accent-2);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.14);
}

.month-switch-year button:hover {
  background: #f3f4f6;
  border-color: #ffffff;
  color: var(--accent-2);
}

.month-switch-month button {
  background: var(--accent-2);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}

.month-switch-month button:hover {
  background: var(--accent);
  color: #fff;
}

.month-label {
  min-width: 110px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #000;
}

.year-label {
  min-width: 100px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.timeline-meta {
  font-size: 0.86rem;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  min-height: 40px;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 0 8px;
}

.timeline-grid-wrapper {
  position: relative;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px;
  box-shadow: var(--shadow-soft);
  min-height: 340px;
  border-radius: 4px;
}

.timeline-scroll {
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.timeline-grid {
  display: block;
  min-width: 820px;
  width: max-content;
}

.timeline-row {
  display: grid;
  gap: 0;
  align-items: stretch;
  position: relative;
}

.timeline-cell {
  padding: 8px;
  background: #fff;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.timeline-row.header .timeline-cell {
  background: var(--timeline-header);
  color: #000;
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.02em;
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Sticky-left for the two leftmost columns so they stay visible while the
   user scrolls the timeline horizontally toward month-end. */
.timeline-cell.status-header,
.timeline-cell.status-control {
  position: sticky;
  left: 0;
  z-index: 1;
  background-clip: padding-box;
}

.timeline-cell.label {
  position: sticky;
  left: 200px; /* width of the status column */
  z-index: 1;
  background-clip: padding-box;
}

/* Header row cells need a higher z-index because the row is already sticky top */
.timeline-row.header .timeline-cell.status-header {
  z-index: 4;
}
.timeline-row.header .timeline-cell.label {
  z-index: 3;
}

/* Visual separator between the sticky columns and the scrollable day cells */
.timeline-cell.label {
  box-shadow: 1px 0 0 #e5e7eb;
}

.timeline-row.header .day-label.today {
  background: #ffe4e6;
}

.timeline-cell.label {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-cell.status-header {
  text-align: center;
  border: 1px solid #e5e7eb;
  background: var(--timeline-header);
  color: #000;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.timeline-cell.status-control {
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
}

.timeline-cell.status-control .timeline-radio-group {
  width: 100%;
}

.label-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.timeline-cell.label .title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-cell.label .meta {
  margin: 0;
  color: #000;
  font-size: var(--font-size-sm);
}

.timeline-cell.label .period {
  margin: 2px 0 0;
  font-size: var(--font-size-sm);
  color: #000;
}

@media (max-width: 360px) {
  .label-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.timeline-cell.label .apply-method {
  margin: 6px 0 0;
}
.timeline-cell.label .apply-method-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-cell.label .label-detail {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeline-cell.label .label-detail .meta {
  font-size: 0.78rem;
}
.timeline-cell.label .label-detail .meta .card-label {
  font-size: 0.65em;
}

.day-label {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #fff;
}

.day-label.today {
  background: #fff5f6;
}

.day-label .date {
  font-weight: 600;
  font-size: 0.86rem;
}

.day-label .dow {
  font-size: var(--font-size-xs);
  color: #000;
  letter-spacing: 0.04em;
}

.day-slot {
  position: relative;
  min-height: 26px;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: background 0.1s ease, box-shadow 0.1s ease;
}

.day-slot.today::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff5f6;
  z-index: 0;
  pointer-events: none;
}

.day-slot.weekend {
  background: var(--timeline-weekend);
}

.day-slot.range {
  min-height: 46px;
}

.day-slot.range::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -1px;
  right: -1px;
  border-radius: 0;
  z-index: 1;
  pointer-events: none;
  background: #e5e7eb;
  border: none;
}

.day-slot.range-active::after {
  background: #fecaca;
}

.day-slot.range-active.range-urgent::after {
  background: #fecaca;
}

.day-slot.range-upcoming {
  color: #fff;
}

.day-slot.range-upcoming::after {
  background: #e0f2fe;
}

.day-slot.range-closed {
  background: #e5e7eb;
}

.day-slot.range-closed::after {
  background: #e5e7eb;
}

.day-slot.range-completed {
  color: #065f46;
}

.day-slot.range-completed::after {
  background: #d1fae5;
}

.day-slot.range-completed.range-active::after,
.day-slot.range-completed.range-active.range-urgent::after {
  background: #d1fae5;
}

.day-slot.range-declined {
  color: #ffffff;
}

.day-slot.range-declined::after {
  background: rgb(215, 215, 215);
}

.day-slot.range-declined.range-active::after,
.day-slot.range-declined.range-active.range-urgent::after,
.day-slot.range-declined.range-upcoming::after,
.day-slot.range-declined.range-closed::after,
.day-slot.range-declined.range-completed::after {
  background: rgb(215, 215, 215);
}

.timeline-status-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fef9c3;
  color: #111;
  font-size: 0.72rem;
  align-self: flex-start;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

.timeline-status-badge.declined {
  background: rgba(167, 167, 167, 0.5);
  border-color: #4b5563;
  color: #111;
}

.timeline-row.is-completed .timeline-status-badge,
.timeline-row.is-declined .timeline-status-badge {
  display: inline-flex;
}

.timeline-status-badge.status-active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.timeline-status-badge.status-active.urgent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.timeline-status-badge.status-upcoming {
  background: #e0f2fe;
  border-color: #60a5fa;
  color: #111;
  white-space: nowrap;
}

.timeline-status-badge.status-closed {
  background: #e5e7eb;
  border-color: #ffffff;
  color: #111;
}

.timeline-status-badge.status-completed {
  background: #d1fae5;
  border-color: #34d399;
  color: #111;
}


.timeline-radio-group {
  margin-top: 6px;
}

#timeline-empty,
#timeline-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: #000;
  background: #ffffff;
  border-radius: 4px;
  font-size: var(--font-size-sm);
}

#timeline-empty[hidden],
#timeline-prompt[hidden] {
  display: none !important;
}

.raffle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.raffle-card {
  position: relative;
  border-radius: var(--radius-card);
  padding: 14px 14px 12px;
  background: #eae6ec;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.card-head h3 {
  margin: 2px 0 0;
  font-size: 0.98rem;
}

.card-head p.shop {
  margin: 0;
  color: #000;
  font-size: 0.86rem;
  font-weight: 600;
}

.status-chip {
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f3f4f6;
  color: var(--text);
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.status-chip.status-active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.status-chip.status-active.is-urgent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 0.86rem;
}

.meta-grid span.label {
  display: block;
  margin-bottom: 2px;
  color: #000;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.meta-grid .meta-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.meta-grid .meta-entry .label {
  margin-bottom: 0;
}

.meta-period-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: flex-start;
}

.apply-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-xs);
  margin-top: 0px;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(90deg, #2d5fba, #247a3a, #c49500, #b82a1e, #7340bf, #2d5fba);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  transition: box-shadow 0.15s ease;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.apply-link::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: conic-gradient(#4285f4 0deg 90deg, #34a853 90deg 180deg, #fbbc05 180deg 270deg, #ea4335 270deg 360deg);
  flex-shrink: 0;
}

.apply-link::after {
  content: "↗";
  font-size: 0.7rem;
}

.apply-link:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.apply-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-xs);
  color: #111827;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #111827;
  background: #ffffff;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.card-section {
  margin-bottom: 8px;
}

.card-label {
  display: block;
  font-size: 0.7em;
  font-weight: 400;
  color: #475569;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.apply-link-row {
  margin-top: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  min-width: 0;
}

.product-collapsible {
  display: inline;
}

.shop-list-item {
  display: block;
  padding-left: 0.8em;
  position: relative;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.shop-list-item::before {
  content: "■";
  position: absolute;
  left: 0;
  color: #475569;
  font-size: 0.5em;
  top: 50%;
  transform: translateY(-50%);
}

.product-collapsible {
  display: block;
  line-height: 1.8;
}

.product-list-prefix {
  display: block;
  margin-bottom: 4px;
}

.product-list-item {
  display: block;
  padding-left: 1.2em;
  position: relative;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.product-list-item::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #475569;
}

.product-toggle {
  display: inline-block;
  margin-left: 4px;
  background: transparent;
  border: none;
  padding: 0;
  color: #2563eb;
  font: inherit;
  font-size: 0.85em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.product-toggle:hover,
.product-toggle:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  outline: none;
  background: transparent;
}

.card-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  padding: 10px;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: #fff;
}

.site-footer {
  width: 100%;
  text-align: center;
  padding: 12px 16px 20px;
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-link {
  color: #ffffff;
  font-size: 0.82rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  word-break: keep-all;
}

.footer-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.footer-copyright {
  margin-top: 6px;
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.footer-x-link {
  display: inline-block;
  margin-top: 6px;
  color: #ffffff;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-x-link:hover {
  opacity: 1;
}

.article-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}
@media (max-width: 600px) {
  .article-card-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  min-width: 0;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.article-card:hover {
  background: rgba(31, 41, 55, 0.86);
  border-color: rgba(200, 211, 255, 0.42);
  transform: translateY(-1px);
}

.article-card-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.article-card-meta {
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.4;
}

.article-card strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 700;
}

.article-card span:last-child {
  color: #ffffff;
  font-size: 0.93rem;
  line-height: 1.65;
}

.article-cover,
.article-image {
  margin: 20px 0;
}

.article-cover img,
.article-image img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}

.article-content h2,
.article-content h3 {
  margin-top: 28px;
}

.task-status {
  padding: 6px 10px;
  border-radius: 0;
  border-top: 1px dashed #d1d5db;
  border-bottom: 1px dashed #d1d5db;
  border-left: none;
  border-right: none;
  background: #f7f7f7;
  color: var(--text);
  width: 100%;
  text-align: center;
  display: block;
  font-weight: 600;
}

.task-status.completed {
  background: #def7ec;
  border-color: #34d399;
  color: #047857;
}

.task-status.declined {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.status-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
  padding: 0;
}

.card-actions .status-radio-group {
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
}

.timeline-radio-group {
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
}

.timeline-radio-group .status-radio {
  justify-content: flex-start;
  width: 100%;
}

.card-actions .status-radio-group .status-radio {
  width: 100%;
  justify-content: flex-start;
}

.status-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 2px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: color 0.2s ease;
  min-height: 22px;
}

.status-radio input {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0;
}

.status-radio input::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg);
  top: 2px;
  left: 1px;
}

.status-radio input:checked {
  border-color: #8a46ff;
  background: #f0e7ff;
}

.status-radio input:checked::after {
  border-left-color: #8a46ff;
  border-bottom-color: #8a46ff;
}

.status-radio span {
  font-size: 0.82rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  white-space: nowrap;
  word-break: keep-all;
}

.status-radio input:checked+span {
  color: #000;
}

.status-radio[data-status="declined"] input:checked+span {
  color: #000;
}

.status-radio[data-status="none"] input:checked {
  border-color: #fca5a5;
  background: #fca5a5;
}
.status-radio[data-status="none"] input:checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.status-radio[data-status="completed"] input:checked {
  border-color: #34d399;
  background: #34d399;
}
.status-radio[data-status="completed"] input:checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.status-radio[data-status="declined"] input:checked {
  border-color: rgba(167, 167, 167, 0.5);
  background: rgba(167, 167, 167, 0.5);
}
.status-radio[data-status="declined"] input:checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.status-radio-group.compact {
  gap: 10px;
  justify-content: flex-start;
}

.timeline-radio-group.status-radio-group.compact {
  gap: 2px;
}

.status-radio-group.compact span {
  font-size: 0.72rem;
}

.raffle-card.is-completed,
.raffle-card.is-declined {
  opacity: 0.8;
}

.raffle-card.is-declined {
  border-color: #fecaca;
}

.status-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-size: 0.86rem;
  z-index: 2500;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

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

.modal-card {
  background: #fff;
  border-radius: 6px;
  padding: 22px 24px 20px;
  width: min(420px, 100%);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.modal-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #000;
}

.modal-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: none;
  background: #f3f4f6;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 10px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #111;
  font-size: 0.78rem;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.tag.urgent {
  background: #fee2e2;
  border-color: #fecaca;
  color: #111;
}

.tag.subtle {
  background: #f9fafb;
  color: #111;
}

.tag.deadline {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.tag.deadline.urgent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #111;
}

.empty-state {
  border: 1px dashed #d1d5db;
  border-radius: 4px;
  padding: 40px 16px;
  text-align: center;
  background: #ffffff;
  color: #000;
  font-size: var(--font-size-sm);
  margin-top: 6px;
}

/* MyPage panel styling to align with home layout */
.mypage-panel {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
}

.status-panel {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  box-shadow: none;
  background-color: rgb(40 40 40 / 90%);
  position: relative;
  padding: 28px 24px 32px;
}


.status-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-top: 8px;
  margin-bottom: 22px;
}

.status-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  border: 2px solid rgba(34, 197, 94, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  font-size: 1.4rem;
  font-weight: 700;
}

.status-hero-title {
  margin: 0;
  font-size: 1.6rem;
  color: #ffffff;
}

.status-hero-meta {
  margin: 0;
  font-size: 0.82rem;
  color: #ffffff;
}

.status-hero-link {
  font-size: 0.86rem;
  color: #ffffff;
  text-decoration: none;
}

.status-hero-link:hover {
  color: #fff;
}

.status-hero-status {
  font-size: 1.2rem;
  font-weight: 600;
  color: #39e3ab;
  letter-spacing: 0.08em;
}

.status-card--single {
  margin: 18px auto 0;
  max-width: 520px;
  width: 100%;
}

.status-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.status-card-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.status-card-note {
  font-size: 0.85rem;
  color: #ffffff;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.status-item + .status-item {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  margin-top: 6px;
}

.status-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.status-item-link {
  font-size: 0.85rem;
  color: #ffffff;
  text-decoration: none;
}

.status-item-link:hover {
  color: #fff;
}

.status-uptime-bar {
  width: 100%;
  margin-top: 6px;
}

.status-uptime-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #39e3ab;
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
}

.status-uptime-track {
  height: 12px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(74, 222, 128, 0.7) 0 24px, rgba(15, 23, 42, 0.55) 24px 28px);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.status-uptime-scale {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #ffffff;
}

.status-badge {
  display: block;
  width: auto;
  height: 26px;
  max-width: 100%;
  margin: 0 auto;
  filter: saturate(0.9);
}

.status-badge--large {
  height: 28px;
}

.status-badge--hero {
  height: 32px;
  filter: brightness(0) saturate(100%) invert(76%) sepia(36%) saturate(564%) hue-rotate(112deg) brightness(96%) contrast(88%);
}

.status-footnote {
  margin-top: 14px;
  font-size: 0.84rem;
  color: #ffffff;
  text-align: center;
}

.status-credit {
  margin-top: 6px;
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.04em;
}

@media (max-width: 860px) {
  .status-card--single {
    max-width: 100%;
  }
}

.mypage-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 30px;
}

.mypage {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  border-radius: 8px;
}

.mypage-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mypage-form .input-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.mypage-form input[type="url"] {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
}

.mypage-form input[type="url"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.mypage-form input[type="url"]:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.mypage-section-title {
  margin: 0 0 8px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.mypage-section-description {
  margin: 0 0 16px 0;
  font-size: 0.86rem;
  color: #ffffff;
  line-height: 1.5;
}

.mypage-login-id {
  margin: 0 0 12px 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-weight: 700;
  width: 100%;

  .mypage-login-id__label {
    color: #ffffff;
    font-weight: 600;
  }

  .mypage-login-id__value {
    word-break: break-all;
    font-weight: 700;
    color: #fff;
    flex: 1;
  }
}

.mypage-panel .mypage {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.mypage-panel .mypage-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  gap: 28px;
  align-items: start;
}

.admin-shell {
  max-width: 1200px;
  color: #e2e8f0;
  --admin-surface: rgba(15, 23, 42, 0.78);
  --admin-surface-strong: rgba(15, 23, 42, 0.92);
  --admin-border: rgba(148, 163, 184, 0.24);
  --admin-accent: #fbbf24;
  --admin-accent-soft: rgba(251, 191, 36, 0.2);
  --admin-accent-2: #38bdf8;
}

.admin-shell .panel {
  position: relative;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 26px 28px 28px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  animation: adminReveal 0.65s ease both;
}

.admin-shell .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  pointer-events: none;
}

.admin-shell .panel:nth-of-type(2) {
  animation-delay: 0.08s;
}

.admin-panel-card {
  background: var(--admin-surface-strong);
}

.admin-login-card {
  max-width: 760px;
  margin: 0 auto;
}

.admin-login-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.admin-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.7);
}

.admin-shell h2,
.admin-shell h3 {
  color: #ffffff;
}

.admin-shell p,
.admin-shell .description {
  color: rgba(226, 232, 240, 0.75);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.admin-input,
.admin-textarea {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus,
.admin-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
  color: rgba(226, 232, 240, 0.45);
}

.admin-textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-textarea-large {
  min-height: 320px;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.admin-ai-result {
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-ai-result:empty {
  display: none;
}

.ai-result-section {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.45);
}

.ai-result-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.55);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.ai-result-count {
  font-weight: 600;
  color: rgb(133, 255, 155);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.8rem;
}

.ai-result-content {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.82rem;
}

.ai-result-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgb(133, 255, 155, 0.8);
  background: rgba(133, 255, 155, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.admin-ai-json {
  min-height: 220px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(860px, 92vw);
  max-height: 84vh;
  overflow: auto;
  background: var(--admin-surface-strong);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
}

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

.admin-modal-actions {
  justify-content: flex-end;
}

.admin-modal-close {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-ai-fetch > .admin-actions {
  margin-top: 12px;
  margin-bottom: 16px;
}

.admin-ai-apply-actions {
  margin-top: 20px;
}

.admin-login-actions {
  justify-content: flex-end;
}

.admin-shell .button.primary {
  background: rgb(133 255 155 / 45%);
  color: #ffffff;
  border: none;
  transition: transform 0.2s ease;
}

.admin-shell .button.primary:hover {
  transform: translateY(-1px);
}

.admin-shell .button.ghost {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

.admin-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.admin-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--admin-accent);
  box-shadow: none;
}

.admin-section .admin-section {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.35);
  box-shadow: none;
}

.admin-section .admin-section::before {
  display: none;
}

.admin-section .admin-section h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 4px;
}

.admin-section .admin-section + .admin-section {
  margin-top: 14px;
}

.admin-section-announcement::before {
  background: #38bdf8;
}

.admin-section-articles::before {
  background: #f59e0b;
}

.admin-section-raffles::before {
  background: #10b981;
}

.admin-section-raffles > h3 {
  margin-bottom: 4px;
}

.admin-section + .admin-section {
  margin-top: 50px;
}

.admin-article-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-article-list-wrap,
.admin-article-editor {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.28);
  padding: 14px;
}

.admin-article-list-head,
.admin-article-tools,
.admin-article-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-article-list-head {
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
  color: #ffffff;
}

.admin-article-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.admin-article-list-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  cursor: pointer;
}

.admin-article-list-item.is-selected {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.12);
}

.admin-article-list-title {
  font-weight: 700;
  line-height: 1.35;
}

.admin-article-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.76rem;
}

.article-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
}

.article-status-badge.published {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.article-status-badge.draft {
  background: rgba(148, 163, 184, 0.16);
  color: #ffffff;
}

.admin-article-empty {
  padding: 16px;
  color: rgba(226, 232, 240, 0.62);
  text-align: center;
}

.admin-article-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-article-row .admin-field {
  flex: 1 1 220px;
}

.admin-upload-button {
  cursor: pointer;
}

#admin-article-body.is-dragover {
  border-color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
  background: rgba(120, 53, 15, 0.26);
}

.admin-ai-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.65));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.admin-ai-mode .task-toggle {
  position: relative;
  gap: 0;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.admin-ai-mode .task-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 8px 16px 8px 40px;
  border-radius: 999px;
  position: relative;
  color: rgba(226, 232, 240, 0.92);
  letter-spacing: 0.02em;
}

.admin-ai-mode .task-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-ai-mode .task-toggle span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.6);
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.4) inset;
}

.admin-ai-mode .task-toggle input:checked + span {
  color: #10b981;
  background: transparent;
  box-shadow: none;
}

.admin-ai-mode .task-toggle input:checked + span::before {
  border-color: #10b981;
  background: transparent;
  box-shadow: inset 0 0 0 4px #10b981;
}


.admin-status {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.9);
}

.admin-status.is-error {
  color: #fca5a5;
}

.admin-status.is-success {
  color: #67c96a;
}

.admin-status.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(226, 232, 240, 0.35);
  border-top-color: #10b981;
  vertical-align: -2px;
  animation: adminSpin 0.9s linear infinite;
}

@keyframes adminSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.admin-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-user {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.9);
}

.admin-turnstile {
  min-height: 70px;
  padding: 6px;
  border-radius: 12px;
}

.admin-shell .hero-announcement {
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

@keyframes adminReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    position: relative;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding-right: 180px;
    min-height: 60px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
  }

  .hero-logo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 56px;
  }

  .hero-auth {
    position: absolute;
    top: 4px;
    right: 4px;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 16px);
    padding: 6px 8px;
    gap: 4px;
    box-sizing: border-box;
  }

  .hero-auth .auth-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .hero-auth .auth-actions .button {
    width: 100%;
    min-width: 0;
    padding: 5px 8px;
    font-size: 12px;
    min-height: 28px;
  }

  .hero-auth .auth-message,
  .hero-auth p {
    display: none;
  }

  .hero-auth .google-login {
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding: 6px 10px;
    gap: 6px;
    font-size: 12px;
    box-sizing: border-box;
  }

  .hero-auth .google-login .google-label {
    min-width: 0;
    white-space: nowrap;
    letter-spacing: 0;
  }

  .hero-auth .google-login .google-icon {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  .admin-article-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Admin Raffles Table ────────────────────── */
.admin-raffles-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-raffles-count {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.8);
  font-weight: 600;
}

.admin-raffles-filter {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
  padding: 5px 10px;
  font-size: 0.82rem;
}

.admin-raffles-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.45);
}

.admin-raffles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.admin-raffles-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-raffles-table th {
  padding: 9px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
  user-select: none;
}

.admin-raffles-table th.sortable {
  cursor: pointer;
}

.admin-raffles-table th.sortable:hover {
  color: #e2e8f0;
}

.admin-raffles-table th.sortable::after {
  content: "⇅";
  margin-left: 4px;
  opacity: 0.35;
  font-size: 0.72rem;
}

.admin-raffles-table th.sort-asc::after {
  content: "▲";
  opacity: 0.9;
  color: #10b981;
}

.admin-raffles-table th.sort-desc::after {
  content: "▼";
  opacity: 0.9;
  color: #10b981;
}

.admin-raffles-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-raffles-table td.col-num {
  text-align: center;
  color: rgba(148, 163, 184, 0.5);
  font-size: 0.74rem;
  width: 40px;
  max-width: 40px;
}

.admin-raffles-table td.col-ops {
  white-space: nowrap;
  width: 1%;
}

.admin-raffles-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}

.admin-raffles-table tbody tr.is-editing {
  background: rgba(16, 185, 129, 0.10);
}

.admin-raffles-table tbody tr.is-editing td {
  border-bottom-color: rgba(16, 185, 129, 0.25);
}

.raffles-edit-input {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.82rem;
  width: 100%;
  min-width: 80px;
  font-family: inherit;
}

.raffles-edit-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.raffles-row-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
}

.raffles-row-btn:hover {
  background: rgba(30, 41, 59, 0.9);
}

.raffles-row-btn.raffles-row-delete {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.raffles-row-btn.raffles-row-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

.raffles-row-btn.raffles-row-save {
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.admin-raffles-table td a {
  color: #38bdf8;
  text-decoration: none;
}

.admin-raffles-table td a:hover {
  text-decoration: underline;
}

.admin-grok-log-section {
  margin-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 12px;
}

.admin-grok-log-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-grok-log-header h5 {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.admin-grok-log-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.admin-grok-log-table td.grok-log-time {
  white-space: nowrap;
  font-size: 0.8rem;
  opacity: 0.8;
}

.admin-grok-log-table td.grok-log-num {
  text-align: center;
}

.grok-log-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.grok-log-auto {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.grok-log-manual {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}

.grok-log-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.grok-log-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.twitter-log-new-raffle {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.twitter-log-daily-summary {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}

@media (max-width: 600px) {
  /* app-shell の左右余白を狭く */
  .app-shell {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  /* 狭い画面ではガントチャートの「日付（カレンダー）列」だけを非表示にし、
     「申込状況」「抽選情報」の列はそのまま残す。 */
  #timeline-panel .timeline-row.header .timeline-cell.day-label,
  #timeline-panel .timeline-row .day-slot {
    display: none !important;
  }

  /* 行を1列にし、申込状況を抽選情報の下にスタック表示する */
  #timeline-panel .timeline-row {
    grid-template-columns: 1fr !important;
  }
  #timeline-panel .timeline-row .timeline-cell.label,
  #timeline-panel .timeline-row.header .timeline-cell.label {
    order: 1;
  }
  #timeline-panel .timeline-row .timeline-cell.status-control,
  #timeline-panel .timeline-row.header .timeline-cell.status-header {
    order: 2;
  }

  /* 申込状況のラジオを横並びに */
  #timeline-panel .timeline-cell.status-control {
    padding: 8px 6px !important;
  }
  #timeline-panel .timeline-cell.status-control .timeline-radio-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
  }
  /* 各ラジオは内容幅に合わせる（縦伸びを防止） */
  #timeline-panel .timeline-cell.status-control .timeline-radio-group .status-radio {
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: center !important;
  }

  /* 店舗ごとの境目を、その行のステータスと同じ色の太い枠線で示す（ヘッダー行は除外） */
  #timeline-panel .timeline-row:not(.header) {
    border: 4px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: none;
  }
  #timeline-panel .timeline-row:not(.header):last-child {
    margin-bottom: 0;
  }
  /* ステータス badge クラスに応じて枠色を変更（:has() を使用） */
  #timeline-panel .timeline-row:not(.header):has(.timeline-status-badge.status-active) {
    border-color: #fca5a5;
  }
  #timeline-panel .timeline-row:not(.header):has(.timeline-status-badge.status-upcoming) {
    border-color: #60a5fa;
  }
  #timeline-panel .timeline-row:not(.header):has(.timeline-status-badge.status-closed) {
    border-color: #ffffff;
  }
  /* 行クラスベースの状態（申込済・申込しない）は :has() より優先して上書き */
  #timeline-panel .timeline-row.is-completed {
    border-color: #34d399 !important;
  }
  #timeline-panel .timeline-row.is-declined {
    border-color: #4b5563 !important;
  }
  /* 内側のセルは透過にして行の背景を見せる */
  #timeline-panel .timeline-row:not(.header) .timeline-cell.label,
  #timeline-panel .timeline-row:not(.header) .timeline-cell.status-control {
    background: transparent;
    border-left: none;
    border-right: none;
  }
  #timeline-panel .timeline-row:not(.header) .timeline-cell.label {
    border-top: none;
  }
  #timeline-panel .timeline-row:not(.header) .timeline-cell.status-control {
    border-bottom: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  /* スマホサイズではヘッダー行（「申込状況」「抽選情報」）はまるごと非表示 */
  #timeline-panel .timeline-row.header {
    display: none !important;
  }

  /* 抽選情報セルのはみ出し対策（ステータスバッジが切れないようにする） */
  #timeline-panel .timeline-cell.label {
    min-width: 0;
    overflow: visible;
  }
  #timeline-panel .timeline-cell.label .label-head {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  #timeline-panel .timeline-cell.label .title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #timeline-panel .timeline-cell.label .timeline-status-badge {
    flex: 0 0 auto;
  }
  #timeline-panel .timeline-cell.label .meta,
  #timeline-panel .timeline-cell.label .period,
  #timeline-panel .timeline-cell.label .label-detail,
  #timeline-panel .timeline-cell.label .product-collapsible,
  #timeline-panel .timeline-cell.label .shop-list-item {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
  }

  /* 横スクロール不要。
     `overflow-x: hidden` だとブラウザが `overflow-y: auto` 相当として扱い
     ボックスシャドウがクリップされてしまうため、ここでは visible にする。
     日付セルが display: none なので横にはみ出さない。 */
  #timeline-panel .timeline-scroll {
    overflow: visible !important;
  }

  /* チャート全体のラッパーは透過にして、各店舗ブロック（行）の背景だけが見えるようにする。
     ロード時にプロンプト（position:absolute）が潰れないよう min-height は確保。 */
  #timeline-panel .timeline-grid-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0;
    min-height: 240px;
  }
  /* 月・年切替ボタンは横幅いっぱいで表示 */
  #timeline-panel .timeline-filters .month-switch {
    margin-left: 0;
    width: 100%;
  }
  #timeline-panel .month-switch-year,
  #timeline-panel .month-switch-month {
    width: 100%;
  }
  /* 狭幅では grid 自体の min-width 制約を解除（横はみ出し防止） */
  #timeline-panel .timeline-grid {
    min-width: 0 !important;
    width: 100%;
  }
  /* ヘッダー行（抽選情報ラベル）も背景なし扱い */
  #timeline-panel .timeline-row.header .timeline-cell.label {
    background: transparent;
    border: none;
    color: #fff;
  }
  #timeline-panel .timeline-row.header {
    margin-bottom: 6px;
  }


  /* 狭い画面では抽選カードを1列レイアウトに */
  .raffle-grid {
    grid-template-columns: 1fr !important;
  }

  /* 抽選カードのテキストはみ出しを折返しに */
  .raffle-card {
    overflow: visible;
  }

  .raffle-card,
  .raffle-card .card-head,
  .raffle-card .card-head > div,
  .raffle-card .card-section,
  .raffle-card .card-body,
  .raffle-card .card-info,
  .raffle-card .card-footer,
  .raffle-card .meta-grid,
  .raffle-card .meta-entry,
  .raffle-card .meta-period-content,
  .raffle-card .apply-link-row {
    min-width: 0;
  }

  .raffle-card .card-section,
  .raffle-card .meta-grid,
  .raffle-card .meta-entry,
  .raffle-card .meta-period-content,
  .raffle-card .product-collapsible,
  .raffle-card .shop-list-item,
  .raffle-card h3,
  .raffle-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 480px) {
  /* Keep the row layout from the 768px breakpoint (do not collapse to column).
     auth-panel is absolutely positioned top-right; logo stays small at top-left
     with a guaranteed gap from the auth panel. */
  .hero {
    flex-direction: row;
    align-items: center;
    padding-right: 170px;
  }

  .hero-main {
    width: auto;
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 18px;
  }

  .month-label {
    min-width: auto;
  }

  .hero-auth {
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 16px);
    top: 4px;
    right: 6px;
  }

  .hero-logo {
    height: auto;
    max-height: 56px;
  }

  .raffle-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .card-body {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #e1e1e1;
    padding: 10px;
    background: #fff;
  }

  .card-info {
    flex: 1 1 0;
    min-width: 0;
  }

  .card-actions {
    width: 14%;
    /* min-width: 108px; */
    flex: 1 1 140px;
    max-width: 43%;
    align-self: stretch;
    /* height: 100%; */
    display: flex;
    flex-direction: column;
  }

  .card-footer {
    justify-content: flex-start;
  }

  #admin-panel {
    padding: 6px;
  }
}

/* ---------- Article / Guide pages (SSR) ---------- */
/* Aligned with top-page panel aesthetic: charcoal panel, purple 3px border,
 * sharp 4px radius, Outfit + Noto Sans JP. No gradient accents. */
.article-body {
  margin: 0;
  color: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.article-shell {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-header {
  background: transparent;
  border-bottom: none;
}
.article-header-inner {
  margin: 0;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.article-logo-link { line-height: 0; }
.article-logo { height: 44px; width: auto; display: block; }
.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.article-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-sm);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.article-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.article-main {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.breadcrumbs {
  margin-bottom: 14px;
  font-size: var(--font-size-xs);
  color: #ffffff;
}
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumbs li::after { content: "›"; margin-left: 6px; color: #ffffff; }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: #c8d3ff; text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: #fff; }

.article {
  background: rgb(36 36 36 / 70%);
  border: 0;
  border-radius: 4px;
  padding: 22px 24px 28px;
  box-shadow: var(--shadow-soft);
  color: #ffffff;
}

.article-hero {
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}
.article-kicker {
  display: inline-block;
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  color: #c8d3ff;
  background: transparent;
  border: 1px solid rgba(200, 211, 255, 0.35);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.article-title {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: 0.02em;
}
.article-lead {
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.7;
}

.article-section { margin: 22px 0; }
.article-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(73, 49, 77, 0.9);
  letter-spacing: 0.02em;
}
.article-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin: 16px 0 6px;
}
.article-section p {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.85;
}
.article-section a {
  color: #c8d3ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-section a:hover { color: #fff; }

.article-list {
  padding-left: 22px;
  margin: 8px 0 14px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.85;
}
.article-list li { margin-bottom: 6px; }
.article-list li strong { color: #ffffff; }

/* 話題ネタの記事：本文だけ白カード化、見出しは暗背景＋白文字のまま */
.article-content {
  background: transparent;
  padding: 0;
  border-radius: 0;
  max-width: none;
}
.article-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 36px 0 16px;
  padding: 0 0 8px;
  border: none;
  border-bottom: none;
  letter-spacing: 0.04em;
  position: relative;
}
.article-content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: #c8d3ff;
  border-radius: 2px;
}
.article-content h2:first-child {
  margin-top: 0;
}
/* 連続する段落は1つの白カードとして表示（個別カードにしない） */
.article-content p {
  background: #ffffff;
  color: #111827;
  font-size: 1rem;
  line-height: 1.95;
  margin: 0;
  padding: 4px 22px;
}
/* 白カードの先頭 */
.article-content > p:first-child,
.article-content h2 + p,
.article-content hr + p {
  padding-top: 18px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
/* 白カードの末尾（次が見出し/区切り/埋め込み or 最後） */
.article-content p:last-child,
.article-content p:has(+ h2),
.article-content p:has(+ hr),
.article-content p:has(+ blockquote) {
  padding-bottom: 18px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  margin-bottom: 18px;
}
.article-content p a {
  color: #6b21a8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content p a:hover {
  color: #4c1d95;
}
.article-content ul,
.article-content ol {
  background: #ffffff;
  color: #111827;
  padding: 14px 18px 14px 38px;
  border-radius: 6px;
  margin: 0 0 18px;
}
.article-content blockquote.twitter-tweet {
  margin: 16px auto !important;
}
/* 区切り線は非表示 */
.article-content hr {
  display: none;
}
/* hr 直後の段落（免責文）は白カードにしない・小さく薄く */
.article-content hr + p,
.article-content hr + p:last-child {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.7;
  padding: 0;
  margin: 18px 0 0;
  border-radius: 0;
}

/* 関連記事セクションの見出しを本文と同じアクセント線スタイルに統一 */
.article-related {
  margin-top: 36px;
}
.article-related h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 18px;
  padding: 0 0 8px;
  border: none;
  border-bottom: none;
  letter-spacing: 0.04em;
  position: relative;
}
.article-related h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: #c8d3ff;
  border-radius: 2px;
}
.article-related .article-card-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.article-related .article-card {
  gap: 8px;
  padding: 12px;
}
.article-related .article-card strong {
  font-size: 0.94rem;
}
.article-related .article-card span:last-child {
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-note {
  font-size: var(--font-size-sm);
  color: #ffffff;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 10px;
  line-height: 1.7;
}

.article-cta { margin: 14px 0; }
.article-cta-link {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.article-cta-link:hover {
  background: #1f2937;
  border-color: #374151;
}

.article-back { margin-top: 20px; font-size: var(--font-size-sm); }
.article-back a { color: #c8d3ff; text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

.article-updated { margin-top: 24px; font-size: var(--font-size-xs); color: #ffffff; text-align: right; }

.info-list { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; padding: 0; }
.info-list > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 1rem;
}
.info-list dt { font-weight: 600; color: #ffffff; margin: 0; }
.info-list dd { margin: 0; color: #ffffff; }

.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.related-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  text-decoration: none !important;
  color: #ffffff !important;
  font-size: var(--font-size-sm);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.related-list a:hover {
  background: rgba(73, 49, 77, 0.45);
  border-color: #49314d;
}
.related-shop { font-weight: 600; }
.related-dates { font-size: var(--font-size-xs); color: #ffffff; }

.faq-list h3 {
  color: #fff;
  font-size: 1.05rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin: 16px 0 6px;
}
.faq-list h3::before { content: "Q. "; color: #c8d3ff; margin-right: 2px; }

@media (max-width: 640px) {
  .article { padding: 16px 14px 20px; }
  .article-main { padding: 8px 0 36px; }
  .article-title { font-size: 1.28rem; line-height: 1.45; }
  .article-lead,
  .article-section p,
  .article-list {
    font-size: 0.95rem;
  }
  .article-card-list { grid-template-columns: 1fr; gap: 14px; }
  .article-card { padding: 12px; }
  .article-card strong {
    font-size: 0.95rem;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  .article-card span:last-child {
    font-size: 0.9rem;
  }
  .info-list > div { grid-template-columns: 90px 1fr; font-size: var(--font-size-xs); }
  .article-nav { gap: 4px; width: 100%; margin-left: 0; }
  .article-nav a { font-size: var(--font-size-xs); padding: 4px 8px; }
}

/* ---------- Market price table ---------- */
.market-article .article-main { max-width: 100%; }

/* Mobile-only card list (hidden on desktop) */
.market-list { display: none; }
@media (max-width: 720px) {
  .market-table-wrap { display: none; }
  .market-list {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 12px 0;
  }
  .market-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 10px 12px;
  }
  .market-card-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    font-size: var(--font-size-sm);
    line-height: 1.35;
    word-break: break-word;
  }
  .market-card-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 0;
    font-size: var(--font-size-xs);
  }
  .market-card-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .market-card-stats dt {
    color: #ffffff;
    margin: 0;
    font-size: 11px;
    white-space: nowrap;
  }
  .market-card-stats dd {
    margin: 0;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }
  .market-card-stats dd.market-best { color: #ffffff; }
  .market-card-stats .profit-positive { color: #10b981; }
  .market-card-stats .profit-negative { color: #ef4444; }
}
.market-article .article { padding: 22px 24px 28px; }
.market-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 220px);
  min-height: 420px;
  margin: 12px -4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.market-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}
.market-filter label {
  font-size: var(--font-size-sm);
  color: #ffffff;
}
.market-filter input,
.market-filter select {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 7px 12px;
  background: #ffffff;
  color: #111827;
  border: 1px solid var(--outline);
  border-radius: 4px;
  font-size: var(--font-size-sm);
  font-family: inherit;
}
.market-filter input {
  flex-basis: 100%;
}
.market-filter select {
  flex: 0 0 210px;
  max-width: 240px;
}
.market-filter input::placeholder { color: #ffffff; }
.market-filter input:focus,
.market-filter select:focus {
  outline: none;
  border-color: #49314d;
  box-shadow: 0 0 0 2px rgba(73, 49, 77, 0.35);
}
.market-sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 240px;
}
.market-sort-control select {
  width: 100%;
}
.market-filter-count {
  font-size: var(--font-size-xs);
  color: #ffffff;
}
@media (max-width: 480px) {
  .market-filter input,
  .market-filter select,
  .market-sort-control {
    max-width: 100%;
  }
  .market-sort-control {
    flex-basis: 100%;
  }
}
.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: #ffffff;
  min-width: 900px;
}
.market-table th, .market-table td {
  padding: 12px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.market-table thead th {
  background: #1f1f1f;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}
.market-table td.num, .market-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.market-table .market-product { white-space: normal; max-width: 340px; color: #fff; font-weight: 500; }
.market-table tbody tr:hover { background: rgba(73, 49, 77, 0.25); }
.market-table .market-best { color: #ffffff; font-weight: 700; }
.market-table .market-profit .profit-positive { color: #10b981; font-weight: 700; }
.market-table .market-profit .profit-negative { color: #ef4444; }
@media (max-width: 640px) {
  .market-table { font-size: var(--font-size-sm); }
  .market-table th, .market-table td { padding: 8px 8px; }
  .market-table thead th { font-size: var(--font-size-xs); }
}

/* ---------- Product selector buyback price annotation ---------- */
.product-option-price { color: #a8c2ff; font-size: 0.85em; margin-left: 4px; }

/* ---------- Site primary nav (index) ---------- */
/* Matches existing panel aesthetic: dark charcoal with 3px purple border,
 * sharp 4px radius, no gradients. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: stretch;
  margin: 8px 0 -10px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  position: relative;
  z-index: 1;
}
.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px 10px 0 0;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  word-break: keep-all;
}
.site-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.site-nav-active {
  color: #fff;
  background: rgba(196, 181, 253, 0.25);
  border-color: rgba(196, 181, 253, 0.35);
}
.site-nav-active:hover {
  background: rgba(196, 181, 253, 0.3);
}
.site-nav-featured {
  color: #fff;
  border-color: #49314d;
  background: rgba(73, 49, 77, 0.55);
}
.site-nav-featured:hover {
  background: rgba(73, 49, 77, 0.85);
  border-color: #6a4670;
}
.site-nav-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #b91c1c;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  white-space: nowrap;
}
@media (max-width: 600px) {
  /* 4項目が1行に収まるよう、余白とフォントを最小化 */
  .site-nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 6px 0 8px;
    gap: 2px;
    overflow: hidden;
  }
  .site-nav-link {
    flex: 1 1 auto;
    justify-content: center;
    padding: 5px 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    min-width: 0;
  }
  .site-nav-badge {
    font-size: 8px;
    padding: 0 3px;
    line-height: 1.3;
  }
}

/* ---------- Market info card (below product selector) ---------- */
/* Matches existing task-panel / timeline-panel aesthetic. */
.market-info {
  margin: 10px 0 12px;
  padding: 10px 12px;
  max-width: 520px;
  background: rgb(40 40 40 / 90%);
  border: 1px solid #49314d;
  border-radius: 4px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}
.market-info-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.market-info-title {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: #fff;
}
.market-info-more {
  font-size: var(--font-size-xs);
  color: #cbd5ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.market-info-more:hover { color: #fff; }
.market-info-body {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.market-info-cell {
  flex: 1 1 100px;
  min-width: 88px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.market-info-label {
  font-size: var(--font-size-xs);
  color: #ffffff;
  letter-spacing: 0.04em;
}
.market-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.market-info-cell-profit .market-info-value.profit-positive { color: #10b981; }
.market-info-cell-profit .market-info-value.profit-negative { color: #ef4444; }
.market-info-empty .market-info-body .market-info-value {
  font-size: var(--font-size-sm);
  color: #ffffff;
  font-weight: 500;
}
.market-info-source {
  margin: 10px 0 0;
  font-size: var(--font-size-xs);
  color: #ffffff;
}
.market-info-source a { color: #cbd5ff; text-decoration: underline; text-underline-offset: 2px; }
.market-info-source a:hover { color: #fff; }
@media (max-width: 480px) {
  .market-info-value { font-size: var(--font-size-base); }
  .market-info-cell { flex: 1 1 calc(50% - 4px); }
}

/* ---------- Product custom dropdown ---------- */
.product-dropdown {
  position: relative;
  width: 100%;
  max-width: 560px;
}
.product-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 4px;
  font-size: var(--font-size-sm);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.product-dropdown-trigger:hover { border-color: #ffffff; }
.product-dropdown.is-open .product-dropdown-trigger {
  border-color: #49314d;
  box-shadow: 0 0 0 2px rgba(73, 49, 77, 0.3);
}
.product-dropdown-value {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-dropdown-arrow {
  font-size: 10px;
  color: #ffffff;
  transition: transform 0.15s ease;
}
.product-dropdown.is-open .product-dropdown-arrow {
  transform: rotate(180deg);
}
.product-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #1f2937;
  border: 1px solid #49314d;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 420px;
  overflow-y: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(880px, calc(100vw - 32px));
}
@media (min-width: 480px) {
  .product-dropdown-menu { min-width: max(100%, 420px); }
}
.product-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 10px;
  font-size: var(--font-size-sm);
  color: #ffffff;
  cursor: pointer;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.product-dropdown-option:last-child {
  border-bottom: none;
}
.product-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.08);
}
.product-dropdown-option.is-selected {
  background: rgba(73, 49, 77, 0.65);
  color: #fff;
}
.product-dropdown-name {
  flex: 1 1 auto;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}
.product-dropdown-profit {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #ffffff;
}
.product-dropdown-profit.profit-positive { color: #10b981; }
.product-dropdown-profit.profit-negative { color: #ef4444; }

/* ---------- Timeline detail column ---------- */

/* (legacy detail-list block removed — detail items now use card-label pattern
 * inside .timeline-cell.label .label-detail) */

/* ---------- Frozen columns for gantt timeline ---------- */
@media (min-width: 601px) {
  .timeline-cell.status-control,
  .timeline-cell.status-header {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
  }
  .timeline-cell.label {
    position: sticky;
    left: 200px;
    z-index: 2;
  }
  .timeline-row.header .timeline-cell.status-header,
  .timeline-row.header .timeline-cell.label {
    z-index: 3;
  }
  .timeline-row.header .timeline-cell.status-header {
    background: var(--timeline-header);
  }
  .timeline-row.header .timeline-cell.label {
    background: var(--timeline-header);
  }
}
