/* ============ VARIABLES ============ */
:root {
  --ink: #1a1a2e;
  --paper: #faf8f3;
  --accent: #c8401a;
  --accent2: #2a6496;
  --accent-light: #f0e8e3;
  --muted: #7a7a8a;
  --border: #e0ddd5;
  --ai-bubble: #ffffff;
  --user-bubble: #1a1a2e;
}

/* ============ RESET ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

header {
  background: white;
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 24px;
  gap: 14px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.header-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.header-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-left: 4px;
}

/* ============ NAV TABS ============ */
.tab-nav {
  background: var(--ink);
}

.tab-nav-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  padding: 0 24px;
}

.tab-link {
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.tab-link.active {
  color: white;
  border-bottom-color: var(--accent);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: white;
  max-width: 560px;
  width: 100%;
  padding: 30px;
  position: relative;
  animation: fadeUp 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  color: var(--ink);
  text-transform: uppercase;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 9px 13px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--ink);
}

.form-row textarea {
  resize: vertical;
  min-height: 75px;
}

.summary-box {
  background: var(--accent-light);
  border: 1px solid var(--border);
  padding: 11px 15px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.8;
}

.summary-box strong {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 5px;
  font-weight: 700;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 13px 22px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
  width: 100%;
  justify-content: center;
}

.cta-btn:hover {
  background: #a33415;
  transform: translateY(-1px);
}


footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 24px;
  font-size: 12px;
}

footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

footer a:hover {
  color: white;
}

.tab-short-label {
  display: none;
}

@media(max-width: 600px) {
  .modal {
    padding: 16px;
  }

  .logo-wrapper svg {
    height: 32px !important;
  }

  .tab-full-label {
    display: none;
  }

  .tab-short-label {
    display: block;
  }

  .tab-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 100;
  }

  .tab-nav-inner {
    justify-content: space-around;
    padding: 0;
    max-width: 100%;
  }

  .tab-link {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-size: 10px;
    gap: 4px;
    color: var(--muted);
    border-bottom: none;
    border-top: 2px solid transparent;
  }

  .tab-link.active {
    color: var(--accent);
    border-bottom: none;
  }

  .tab-link .tab-icon {
    display: none;
  }

  /* 絵文字非表示 */

  /* コンテンツがナビと被らないように */
  body {
    padding-bottom: 59px;
  }

  footer {
    padding: 12px 8px;
    background: var(--paper);
    color: var(--muted);
  }

  footer a {
    color: var(--muted);
  }

  footer .footer-nav {
    display: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
