/* =====================================================================
   PANDA TICKETS — Design System (base)
   Ticketmaster風のダークテーマ / モバイルファースト / 完全レスポンシブ
   ===================================================================== */

/* ---- Design Tokens ---- */
:root {
  /* Brand */
  --tm-blue:        #026cdf;
  --tm-blue-hover:  #0a5fc0;
  --tm-blue-soft:   rgba(2, 108, 223, 0.14);

  /* Surfaces (dark) */
  --bg:            #16171b;
  --bg-elevated:   #1e2025;
  --bg-card:       #202228;
  --bg-input:      #26282f;
  --line:          #33353d;
  --line-soft:     #2a2c33;

  /* Text */
  --text:          #f4f5f7;
  --text-muted:    #a9adb8;
  --text-faint:    #6f7481;

  /* Semantic */
  --ok:            #21c07a;
  --warn:          #f5a623;
  --danger:        #ef4b5b;

  /* Layout */
  --maxw:          1200px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --header-h:      60px;

  --shadow:        0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.25);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
          Meiryo, Arial, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}
.main { flex: 1 0 auto; padding-bottom: 64px; }
.section { margin-top: 40px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 1.4rem; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.hidden { display: none !important; }
.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;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 23, 27, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; letter-spacing: 0.04em; font-size: 1.05rem;
  white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--tm-blue), #7b5cff);
  display: grid; place-items: center; font-size: 15px;
}
.header-search { flex: 1; max-width: 460px; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-nav a {
  color: var(--text-muted); font-size: 0.9rem; padding: 8px 10px;
  border-radius: 8px; white-space: nowrap;
}
.header-nav a:hover { color: var(--text); background: var(--bg-elevated); }

/* ---- Footer ---- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elevated);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
}
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--bg-elevated);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: transform 0.08s var(--ease), background 0.15s var(--ease),
              border-color 0.15s var(--ease), opacity 0.15s;
  text-align: center; white-space: nowrap;
}
.btn:hover { border-color: #4a4d57; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; transform: none;
}
.btn-primary {
  --btn-bg: var(--tm-blue); --btn-fg: #fff; border-color: transparent;
}
.btn-primary:hover { --btn-bg: var(--tm-blue-hover); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }

/* ---- Chips / filters ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-elevated); color: var(--text-muted);
  font-size: 0.85rem; cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: #fff; color: #111; border-color: #fff; font-weight: 600; }

/* ---- Inputs ---- */
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.field .req { color: var(--danger); margin-left: 3px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--tm-blue);
  box-shadow: 0 0 0 3px var(--tm-blue-soft);
}
.input::placeholder { color: var(--text-faint); }
.textarea { resize: vertical; min-height: 90px; }
.field-error { color: var(--danger); font-size: 0.82rem; margin-top: 5px; display: none; }
.field.has-error .input,
.field.has-error .textarea { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

.search-input {
  width: 100%; padding: 10px 14px 10px 40px; font-size: 0.95rem;
  background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23a9adb8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--text); border: 1px solid var(--line); border-radius: 999px;
}
.search-input:focus { outline: none; border-color: var(--tm-blue); box-shadow: 0 0 0 3px var(--tm-blue-soft); }

/* ---- Card ---- */
.card {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
}
.card-pad { padding: 20px; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.badge-cat { background: var(--tm-blue-soft); color: #7fb5ff; }
.badge-soldout { background: rgba(239,75,91,0.16); color: #ff8a95; }
.badge-few { background: rgba(245,166,35,0.16); color: #f5c069; }
.badge-soon { background: rgba(33,192,122,0.16); color: #5fdca6; }

/* ---- Toast / alert ---- */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem;
  border: 1px solid var(--line); background: var(--bg-elevated); margin-bottom: 16px;
}
.alert-error { border-color: rgba(239,75,91,0.5); background: rgba(239,75,91,0.1); color: #ff9aa4; }
.alert-ok { border-color: rgba(33,192,122,0.5); background: rgba(33,192,122,0.1); color: #7fe3b7; }

/* ---- Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #2b2d34 37%, var(--bg-elevated) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- Spinner ---- */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive header ---- */
@media (max-width: 720px) {
  .header-search { display: none; }
  .header-nav a { padding: 8px 8px; }
  .brand span.brand-text { display: none; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
