/* ==========================================
   Shiga Smart Lab
   Estimate Simulator
========================================== */

:root {
  --bg: #0b0d0c;
  --surface: #121613;
  --surface-2: #171c18;
  --surface-3: #1d231f;

  --text: #f3f6f4;
  --muted: #9da8a1;
  --border: rgba(255,255,255,.08);

  --green: #20c875;
  --green-dark: #119a57;
  --green-soft: rgba(32,200,117,.13);

  --yellow: #f2c94c;
  --red: #ef5a5a;
  --gray: #777f7a;

  --radius: 22px;
  --radius-small: 14px;

  --shadow:
    0 20px 50px rgba(0,0,0,.32);

  --shadow-small:
    0 10px 28px rgba(0,0,0,.24);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 110px;

  color: var(--text);
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(32,200,117,.12),
      transparent 34%
    ),
    var(--bg);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans JP",
    sans-serif;

  line-height: 1.6;
}

button,
select,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* ==========================================
   HERO
========================================== */

.hero {
  overflow: hidden;
  margin-bottom: 22px;

  border: 1px solid var(--border);
  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.05),
      rgba(255,255,255,.015)
    );

  box-shadow: var(--shadow);
}

.hero img {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: cover;
}

.hero-copy {
  padding: 24px 24px 26px;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: 7px;

  color: var(--green);

  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero h1 {
  margin: 0;

  font-size: clamp(1.55rem, 5vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -.025em;
}

.hero p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: .94rem;
}

/* ==========================================
   MAIN TABS
========================================== */

.main-tabs {
  position: sticky;
  top: 10px;
  z-index: 50;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;

  margin-bottom: 26px;
  padding: 5px;

  border: 1px solid var(--border);
  border-radius: 18px;

  background: rgba(17,21,18,.92);

  box-shadow: var(--shadow-small);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.main-tab {
  min-width: 0;
  padding: 11px 5px;

  border: 0;
  border-radius: 13px;

  color: var(--muted);
  background: transparent;

  font-size: .83rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.main-tab.active {
  color: #06130c;

  background:
    linear-gradient(
      135deg,
      #36df8a,
      var(--green)
    );

  box-shadow:
    0 6px 18px rgba(32,200,117,.22);
}

.main-tab:active {
  transform: scale(.97);
}

/* ==========================================
   TAB CONTENT
========================================== */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-heading {
  margin: 0 4px 19px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -.02em;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

/* ==========================================
   SEGMENTED CONTROL
========================================== */

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;

  margin-bottom: 17px;
  padding: 5px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: #0d100e;
}

.os-btn,
.coat-btn {
  padding: 12px 10px;

  border: 0;
  border-radius: 12px;

  color: var(--muted);
  background: transparent;

  font-weight: 750;
  cursor: pointer;

  transition: .18s ease;
}

.os-btn.active,
.coat-btn.active {
  color: var(--text);
  background: var(--surface-3);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.07),
    0 5px 16px rgba(0,0,0,.28);
}

/* ==========================================
   CARDS
========================================== */

.form-card,
.service-card,
.info-card,
.month-card,
.result-card,
.loading-card,
.error-card,
.price-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.035),
      rgba(255,255,255,.012)
    ),
    var(--surface);

  box-shadow: var(--shadow-small);
}

.form-card {
  padding: 20px;
}

.field + .field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;

  color: #d9e0dc;
  font-size: .88rem;
  font-weight: 750;
}

select,
input[type="number"],
input[type="date"],
input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  min-height: 50px;

  padding: 0 14px;

  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-small);

  outline: none;

  color: var(--text);
  background: #0c100d;

  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

select:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: rgba(32,200,117,.7);

  box-shadow:
    0 0 0 3px rgba(32,200,117,.12);
}

select:disabled {
  opacity: .55;
  cursor: not-allowed;
}

select option {
  color: #111;
  background: #fff;
}

.battery-description {
  margin-top: 10px;
  padding: 13px 14px;

  border: 1px solid rgba(32,200,117,.18);
  border-radius: var(--radius-small);

  background: rgba(32,200,117,.07);
}

.battery-description strong {
  display: block;
  margin-bottom: 5px;

  color: #e8f5ee;
  font-size: .88rem;
}

.battery-description p {
  margin: 0;

  color: var(--muted);
  font-size: .84rem;
  line-height: 1.65;
}

.reservation-cta {
  width: 100%;
  margin-top: 12px;
}

.reservation-panel {
  margin-top: 28px;
  scroll-margin-top: 18px;
}

.reservation-summary {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(32,200,117,.18);
  border-radius: var(--radius-small);
  background: var(--green-soft);
}

.reservation-summary p {
  margin: 6px 0 0;
  color: var(--muted);
}

.reservation-summary-total {
  color: var(--green) !important;
  font-weight: 800;
}

.preference-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.preference-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: rgba(255,255,255,.018);
}

.preference-card > strong {
  display: block;
  margin-bottom: 10px;
}

.preference-card .field + .field {
  margin-top: 12px;
}

textarea {
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

@media (min-width: 760px) {
  .preference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================
   REPAIR DETAIL
========================================== */

.repair-detail {
  display: grid;
  gap: 3px;

  margin-top: 18px;
  padding: 15px 16px;

  border: 1px solid rgba(32,200,117,.18);
  border-radius: var(--radius-small);

  background: var(--green-soft);
}

.repair-detail strong {
  font-size: 1rem;
}

.repair-detail > span {
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 850;
}

.repair-detail small {
  color: var(--muted);
}

/* ==========================================
   TRAVEL
========================================== */

.travel-box {
  margin-top: 19px;
  padding: 15px;

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  background: rgba(255,255,255,.018);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
  font-size: .91rem;
  font-weight: 650;
}

.check-row input {
  width: 19px;
  height: 19px;

  accent-color: var(--green);
}

.travel-area {
  margin-top: 13px;
}

/* ==========================================
   BUTTONS
========================================== */

.primary-btn,
.secondary-btn {
  width: 100%;

  border: 0;
  border-radius: 15px;

  font-weight: 800;
  cursor: pointer;

  transition:
    transform .16s ease,
    opacity .16s ease,
    box-shadow .16s ease;
}

.primary-btn {
  min-height: 54px;
  margin-top: 20px;

  color: #04140b;

  background:
    linear-gradient(
      135deg,
      #39e18d,
      var(--green)
    );

  box-shadow:
    0 10px 26px rgba(32,200,117,.20);
}

.secondary-btn {
  min-height: 46px;
  margin-bottom: 16px;

  color: var(--text);
  background: var(--surface-3);

  border: 1px solid var(--border);
}

.primary-btn:not(:disabled):hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:not(:disabled):active,
.secondary-btn:active {
  transform: translateY(1px);
}

.primary-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================
   RESULTS
========================================== */

.result-area {
  margin-top: 18px;
}

.result-card {
  overflow: hidden;
  padding: 20px;
}

.result-label {
  display: block;

  margin-bottom: 13px;

  color: var(--green);

  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;

  padding: 9px 0;

  border-bottom:
    1px solid rgba(255,255,255,.055);

  color: var(--muted);
  font-size: .9rem;
}

.result-row strong {
  color: var(--text);
  text-align: right;
}

.result-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  padding-top: 18px;
}

.result-total span {
  font-weight: 750;
}

.result-total strong {
  color: var(--green);

  font-size: 1.8rem;
  line-height: 1;
}

.error-card {
  padding: 18px;

  color: #ffc6c6;
  border-color: rgba(239,90,90,.22);
  background: rgba(239,90,90,.08);
}

/* ==========================================
   SERVICE
========================================== */

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.service-card {
  padding: 18px;
}

.service-icon {
  display: block;
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.service-card h3 {
  margin: 0 0 7px;
  font-size: .98rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: .83rem;
}

.info-card {
  margin-top: 15px;
  padding: 18px;
}

.info-card strong {
  color: var(--green);
}

.info-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .88rem;
}

/* ==========================================
   COATING
========================================== */

.coat-content {
  display: none;
}

.coat-content.active {
  display: block;
}

.price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin-bottom: 14px;
  padding: 16px 18px;
}

.price-summary span {
  color: var(--muted);
  font-size: .87rem;
}

.price-summary strong {
  color: var(--green);
  white-space: nowrap;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  padding: 0 0 15px;

  border: 0;
  border-bottom: 1px solid var(--border);

  color: var(--text);
  background: transparent;

  font-weight: 750;
  cursor: pointer;
}

.price-rules {
  display: none;

  margin: 0 0 18px;
  padding: 14px 0 0 21px;

  color: var(--muted);
  font-size: .87rem;
}

.price-rules.open {
  display: block;
}

/* ==========================================
   AVAILABILITY
========================================== */

.availability-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;

  margin-bottom: 15px;
  padding: 14px;

  border: 1px solid var(--border);
  border-radius: 16px;

  color: var(--muted);
  background: rgba(255,255,255,.018);

  font-size: .8rem;
}

.availability-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;

  border-radius: 50%;
}

.calendar-wrapper {
  display: grid;
  gap: 16px;
}

.loading-card {
  padding: 25px;
  color: var(--muted);
  text-align: center;
}

.month-card {
  overflow: hidden;
}

.month-title {
  margin: 0;
  padding: 16px 18px;

  border-bottom: 1px solid var(--border);

  font-size: 1.05rem;
}

.availability-list {
  padding: 5px 16px 10px;
}

.availability-row {
  display: grid;
  grid-template-columns: 1fr auto;

  align-items: center;
  gap: 10px;

  min-height: 53px;
  padding: 8px 2px;

  border-bottom:
    1px solid rgba(255,255,255,.05);
}

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

.availability-date {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.availability-date strong {
  min-width: 44px;
}

.availability-date span {
  color: var(--muted);
  font-size: .82rem;
}

.availability-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 48px;
  height: 31px;

  padding: 0 10px;

  border-radius: 999px;

  font-size: .83rem;
  font-weight: 850;
}

.availability-note {
  grid-column: 1 / -1;

  margin-top: -3px;
  padding: 7px 10px;

  border-radius: 9px;

  color: var(--muted);
  background: rgba(255,255,255,.025);

  font-size: .79rem;
}

.status-o {
  color: #9af0c3;
  background: rgba(32,200,117,.18);
}

.status-triangle {
  color: #ffe087;
  background: rgba(242,201,76,.16);
}

.status-x {
  color: #ffaaaa;
  background: rgba(239,90,90,.16);
}

.status-off {
  color: #c1c6c3;
  background: rgba(119,127,122,.19);
}

.status-unknown {
  color: var(--muted);
  background: rgba(255,255,255,.05);
}

/* ==========================================
   TEXT
========================================== */

.fine-print {
  margin: 14px 4px 0;

  color: #747e78;

  font-size: .76rem;
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

/* ==========================================
   LINE
========================================== */

.line-contact {
  position: fixed;
  z-index: 100;

  right: 18px;
  bottom: 18px;
}

.line-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 52px;

  padding: 0 22px;

  border-radius: 999px;

  color: #06170d;
  background: #32df7d;

  box-shadow:
    0 12px 32px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.12) inset;

  font-size: .9rem;
  font-weight: 850;

  text-decoration: none;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

  body {
    padding:
      10px
      10px
      95px;
  }

  .hero {
    border-radius: 22px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero p {
    font-size: .86rem;
  }

  .main-tabs {
    top: 5px;
  }

  .main-tab {
    padding: 10px 2px;
    font-size: .75rem;
  }

  .form-card {
    padding: 16px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .availability-legend {
    font-size: .75rem;
  }

  .price-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .line-contact {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .line-btn {
    width: 100%;
  }
}

/* ==========================================
   PC
========================================== */

@media (min-width: 900px) {

  body {
    padding-top: 42px;
  }

  .app-shell {
    max-width: 820px;
  }

  .hero-copy {
    padding: 30px;
  }

  .form-card {
    padding: 25px;
  }

  .availability-list {
    padding-left: 22px;
    padding-right: 22px;
  }
}


/* 予約対応方法 */
.service-mode-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}

.service-mode-fieldset legend {
  font-weight: 700;
  margin-bottom: 10px;
}

.service-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  color: #000;
}

.service-mode-option input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.service-mode-option:has(input:checked) {
  border-color: currentColor;
  font-weight: 700;
}

@media (max-width: 640px) {
  .service-mode-options {
    grid-template-columns: 1fr;
  }
}


/* 予約送信結果 */
#reservation-message {
  margin: 14px 0 16px;
}

.reservation-message-success,
.reservation-message-error {
  display: block;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.reservation-message-success {
  background: #eafaf1;
  border: 2px solid #2ecc71;
  color: #0b3d22;
  font-size: 1.05rem;
}

.reservation-message-error {
  background: #fff1f1;
  border: 2px solid #d9534f;
  color: #7a1f1c;
}


.reservation-clear-btn {
  width: 100%;
  margin-top: 12px;
}
