/* ============================================================
   LuvisYouth Partner Board — Design System
   Brand: #E91B89 / #7B37A8 / #5BAADE   Grid: 8px   Radius: 4px
   ============================================================ */

:root {
  --pink:     #E91B89;
  --purple:   #7B37A8;
  --blue:     #5BAADE;
  --gray:     #5A5A5A;
  --black:    #1A1A1A;
  --bg:       #F5F5F5;
  --surface:  #FFFFFF;
  --zebra:    #F8F8F8;
  --subbg:    #F0F0F0;
  --line:     #E5E5E5;
  --disabled: #C4C4C4;
  --muted:    #8A8A8A;
  --success:  #2E7D32;
  --error:    #C62828;
  --gradient: linear-gradient(135deg, #E91B89 0%, #7B37A8 50%, #5BAADE 100%);

  --font-en: 'Oswald', sans-serif;
  --font-ja: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;

  --radius: 4px;

  --dur-instant: 100ms;
  --dur-fast:    180ms;
  --dur-base:    280ms;
  --dur-slow:    450ms;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --stagger:     70ms;

  --shadow-card:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 1px 2px -1px rgba(0, 0, 0, 0.06),
    0 2px 4px 0 rgba(0, 0, 0, 0.04);
  --shadow-card-hover:
    0 0 0 1px rgba(0, 0, 0, 0.09),
    0 2px 4px -1px rgba(0, 0, 0, 0.08),
    0 6px 12px 0 rgba(0, 0, 0, 0.06);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* .btn 等の display 指定が UA の [hidden] を上書きしてしまうため明示する */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--gray);
  font-family: var(--font-ja);
  font-size: 15px;
  line-height: 1.7;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li      { text-wrap: pretty; }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

.site-header--wide .site-header__inner { max-width: 760px; }

.brand {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 8px;
}

.site-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.site-lead {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.site-who {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.wrap--wide { max-width: 760px; }

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 8px;
  font-family: var(--font-ja);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.tab:hover { color: var(--black); }

.tab[aria-selected="true"] {
  color: var(--black);
  border-bottom-color: var(--pink);
}

.tab__count {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  margin-left: 6px;
}

/* ---------- Chips (業種フィルタ) ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.chip {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 14px;
  font-family: var(--font-ja);
  font-size: 13px;
  color: var(--gray);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.chip:hover { border-color: var(--muted); }

.chip[aria-pressed="true"] {
  background: var(--black);
  border-color: var(--black);
  color: var(--surface);
}

/* ---------- Month label ---------- */

.month {
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}

.month:first-of-type { margin-top: 0; }

/* ---------- Card ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out);
}

.card:hover { box-shadow: var(--shadow-card-hover); }

.card.is-taken {
  opacity: 0.55;
  box-shadow: var(--shadow-card);
}

.card.is-taken:hover { box-shadow: var(--shadow-card); }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card__date {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.card__cat {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.card__cat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.card__cat[data-cat="telecom"]::before { background: var(--purple); }

.card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.5;
}

.card__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.card__meta {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.card__meta dl {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 6px 16px;
  margin: 0;
}

.card__meta dt {
  color: var(--muted);
  font-size: 13px;
}

.card__meta dd {
  margin: 0;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

.card__reward {
  color: var(--black);
  font-weight: 600;
}

.card__note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.card__action {
  margin-top: 24px;
  min-height: 48px;
}

.card__taken-by {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 2px;
  font-family: var(--font-ja);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-instant) var(--ease-out),
              background-color var(--dur-instant) var(--ease-out),
              box-shadow var(--dur-instant) var(--ease-out),
              opacity var(--dur-instant) var(--ease-out);
}

.btn--primary {
  background: var(--pink);
  color: var(--surface);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px -2px rgba(233, 27, 137, 0.4);
}

.btn--primary:active { transform: scale(0.98); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
}

.btn--ghost:hover { background: var(--black); color: var(--surface); }
.btn--ghost:active { transform: scale(0.98); }

.btn--sm {
  width: auto;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
}

.btn--danger {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--error);
}

.btn--danger:hover { border-color: var(--error); }

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--subbg);
  color: var(--disabled);
  border-color: var(--line);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* ---------- Claim form (インライン展開) ---------- */

.claim {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.claim__row { margin-bottom: 16px; }

.claim__label,
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.req {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--pink);
}

.input,
.select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-ja);
  font-size: 15px;
  color: var(--black);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.input::placeholder { color: var(--disabled); }

.input:hover,
.select:hover { border-color: var(--muted); }

.input:focus,
.select:focus {
  border-color: var(--pink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 27, 137, 0.12);
}

.input--code {
  font-family: var(--font-en);
  font-size: 22px;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.confirm__text {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--black);
  text-align: center;
  line-height: 1.6;
}

.confirm__actions {
  display: flex;
  gap: 8px;
}

.confirm__actions .btn { width: auto; flex: 1; }

.code {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.14em;
  background: var(--subbg);
  color: var(--black);
  padding: 4px 10px;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

.partner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.partner-row:last-of-type { border-bottom: 0; }

.partner-row__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
}

.partner-row__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.partner-row__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.claim__actions {
  display: flex;
  gap: 8px;
}

.claim__actions .btn { width: auto; flex: 1; }

.msg {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.6;
}

.msg--ok    { background: rgba(46, 125, 50, 0.08);  color: var(--success); }
.msg--error { background: rgba(198, 40, 40, 0.08);  color: var(--error); }

/* ---------- Empty / Skeleton ---------- */

.empty {
  padding: 48px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.empty__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.empty__text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.skeleton {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.skeleton__bar {
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--subbg) 25%, var(--zebra) 37%, var(--subbg) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.6s linear infinite;
  margin-bottom: 12px;
}

.skeleton__bar--lg { height: 22px; width: 60%; }
.skeleton__bar--sm { width: 40%; margin-bottom: 0; }

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px;
  font-size: 12px;
  color: var(--muted);
}

.terms {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.terms li {
  padding-left: 16px;
  position: relative;
  line-height: 1.8;
}

.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--disabled);
}

/* ---------- Admin ---------- */

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.panel__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.panel__lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.template {
  appearance: none;
  text-align: left;
  background: var(--zebra);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px;
  cursor: pointer;
  font-family: var(--font-ja);
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              transform var(--dur-instant) var(--ease-out);
}

.template:hover {
  background: var(--surface);
  border-color: var(--pink);
  transform: translateY(-2px);
}

.template:active { transform: scale(0.99); }

.template__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.5;
}

.template__meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 24px; }

.field__no {
  font-family: var(--font-en);
  color: var(--pink);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.radio-group {
  display: flex;
  gap: 8px;
}

.radio {
  flex: 1;
  position: relative;
}

.radio input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.radio span {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-align: center;
  font-size: 14px;
  color: var(--gray);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.radio input:hover + span { border-color: var(--muted); }

.radio input:checked + span {
  background: var(--black);
  border-color: var(--black);
  color: var(--surface);
  font-weight: 600;
}

.radio input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.row-2 {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
}

.reward-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.reward-row span { font-size: 14px; color: var(--gray); white-space: nowrap; }

.slot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.slot-row--month { grid-template-columns: 1fr auto; }

.slot-row span { color: var(--muted); font-size: 14px; }

.slot-row__del {
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  width: 36px;
  height: 36px;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.slot-row__del:hover { border-color: var(--error); color: var(--error); }

.preview-label {
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.job-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.job-row:last-child { border-bottom: 0; }

.job-row__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.5;
}

.job-row__slots {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.job-row__slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.job-row__status { color: var(--muted); }
.job-row__status--open { color: var(--success); }

.job-row__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.gate {
  max-width: 360px;
  margin: 64px auto;
}

/* ---------- Motion ---------- */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: rise-in var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .card { padding: 20px 16px; }
  .card__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card__date { font-size: 18px; }
  .card__meta dl { grid-template-columns: 5em 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .slot-row { grid-template-columns: 1fr auto 1fr; }
  .slot-row__del { grid-column: 1 / -1; width: 100%; }
  .templates { grid-template-columns: 1fr; }
}
