/* 공통 색상·크기 */
:root {
  --green: #286044;
  --dark: #203d30;
  --muted: #717b72;
  --paper: #fafbf7;
  --line: #e1e6dc;
  --soft: #edf2e5;
  --radius: 20px;
}

/* 기본 스타일 */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--dark);
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  line-height: 1.65;
}
button,
input,
select {
  font: inherit;
}
button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
label:focus-within,
select:focus-visible {
  outline: 3px solid #b39c3c;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}

/* 전체 너비 */
header,
main,
footer {
  max-width: 1180px;
  margin: auto;
}

/* 헤더·로고·메뉴 버튼 */
header {
  height: 100px;
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.logo {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -2px;
}
.logo span {
  font-size: 11px;
  color: #7c9b4f;
  margin-left: 3px;
}
.header-note {
  font-size: 12px;
  color: var(--muted);
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 26px;
  min-width: 48px;
  min-height: 48px;
}
#menu-open {
  margin-left: auto;
}

/* 본문·메인 배치 */
main {
  padding: 0 32px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  align-items: center;
  padding: 65px 0 48px;
}

/* 제목·소개 문구 */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  margin: 0 0 20px;
}
h1 {
  font-size: clamp(32px, 4vw, 49px);
  line-height: 1.35;
  letter-spacing: -2.6px;
  margin: 0 0 22px;
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: var(--green);
}
.intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

/* 텍스트 링크 */
.text-link {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 18px;
  border: 0;
  border-bottom: 1px solid #acb9a7;
  padding: 0 0 6px;
  background: transparent;
}

/* 메인 일러스트 */
.illustration {
  position: relative;
  background: #e5eddc;
  border-radius: 110px 20px 20px 20px;
  min-width: 0;
  overflow: hidden;
  padding: 25px 0 20px;
}
.illustration svg {
  display: block;
  width: 100%;
}
.art-tag {
  position: absolute;
  top: 32px;
  right: 28px;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #5c7756;
}
.art-caption {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #5e7757;
}
.art-caption span {
  color: #6f934b;
  margin-right: 8px;
}

/* 대여 상태 카드 */
.rental-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 30px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.rental-card .eyebrow {
  margin-bottom: 10px;
}
.badge {
  background: var(--soft);
  color: var(--green);
  border-radius: 30px;
  padding: 5px 10px;
  letter-spacing: 0;
  margin-left: 10px;
}
.rental-card h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
  margin: 0 0 6px;
}
.rental-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 5px 0;
}

/* 공통 버튼 */
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 38px;
  border: 0;
  border-radius: 10px;
  min-height: 54px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #194c32;
}
.secondary {
  background: var(--soft);
  color: var(--green);
  cursor: pointer;
}

/* 구역 제목·이용 단계 */
.section-heading {
  padding-top: 55px;
}
.section-heading .eyebrow {
  margin-bottom: 10px;
}
.section-heading h2 {
  font-size: 24px;
  letter-spacing: -1px;
  margin: 0 0 28px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.steps article {
  border-top: 1px solid #bdcbb6;
  padding: 22px 0;
}
.step-number {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--green);
}
h3 {
  font-size: 18px;
  margin: 13px 0 8px;
}
.steps p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* 안내 문구 */
.notice {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
#home > .notice {
  padding: 20px 0;
  margin-bottom: 30px;
}

/* 소개·이용 방법 페이지 */
.content-page {
  padding: 60px 0 75px;
  min-height: 65vh;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 35px 0;
}
.info-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.info-grid h2 {
  font-size: 20px;
}
.info-grid p,
.info-grid li {
  font-size: 14px;
  color: #637064;
}
.info-grid li {
  margin: 12px 0;
}
.inline-button {
  margin-top: 15px;
}

/* 반납·결과 페이지 너비 */
.narrow {
  max-width: 690px;
  margin: auto;
}

/* 사진 선택·미리보기 */
.upload-card {
  border: 1px dashed #a9bda0;
  background: white;
  border-radius: var(--radius);
  text-align: center;
  padding: 28px;
  margin: 30px 0 20px;
}
.camera-icon {
  font-size: 50px;
  color: var(--green);
}
.upload-card h2 {
  font-size: 19px;
}
.upload-card p {
  font-size: 12px;
  color: var(--muted);
}
#photo-preview {
  max-width: 100%;
  max-height: 330px;
  border-radius: 12px;
  object-fit: contain;
}
.upload-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-actions label:has(+ input:focus-visible) {
  outline: 3px solid #b39c3c;
  outline-offset: 3px;
}

/* 개발자 테스트 영역 */
.developer {
  background: #f0efe9;
  padding: 20px;
  border-radius: 12px;
  font-size: 13px;
  margin: 20px 0;
}
.developer summary {
  cursor: pointer;
  font-weight: 700;
}
.developer select {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #bbc5b5;
  border-radius: 8px;
  background: white;
  margin-top: 8px;
}

/* 전체 너비 버튼 */
.full {
  width: 100%;
}

/* 반납 결과 */
.result-card {
  text-align: center;
}
.result-icon {
  font-size: 55px;
  color: var(--green);
  margin: 15px;
}
.result-card h1 {
  font-size: 34px;
}
.result-card .primary {
  margin-top: 25px;
}

/* 상태 메시지 */
#app-message:not(:empty) {
  background: var(--soft);
  padding: 16px;
  border-radius: 10px;
  margin: 20px 0;
}

/* 푸터 */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}
footer .logo {
  font-size: 22px;
}
footer p,
footer > span {
  font-size: 11px;
  color: var(--muted);
}
footer > span {
  margin-left: auto;
}

/* 오른쪽 사이드 메뉴 */
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(360px, 90vw);
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  background: var(--paper);
  padding: 30px;
  color: var(--dark);
}
dialog::backdrop {
  background: #15241c80;
}
.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav {
  margin-top: 50px;
}
nav a {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 21px 0;
  font-size: 19px;
  font-weight: 700;
}
.menu-bottom {
  margin-top: 70px;
  color: var(--muted);
}
body:has(dialog[open]) {
  overflow: hidden;
}

/* 키보드 본문 바로가기 */
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: white;
  padding: 10px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}

/* 모바일 레이아웃 (700px 이하) */
@media (max-width: 700px) {
  header {
    height: 76px;
    padding: 0 22px;
  }
  .header-note {
    display: none;
  }
  /* 프로젝트 소개 한 줄 문구 */
  #about > .intro {
    font-size: 15px;
    letter-spacing: -0.3px;
    white-space: nowrap;
  }
  main {
    padding: 0 22px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 38px 0 28px;
    gap: 30px;
  }
  h1 {
    font-size: 36px;
  }
  .illustration {
    border-radius: 70px 18px 18px 18px;
  }
  .illustration svg {
    max-height: 270px;
  }
  .rental-card {
    display: block;
    padding: 24px;
  }
  .rental-card .primary {
    width: 100%;
    margin-top: 20px;
  }
  .rental-card h2 {
    font-size: 20px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .steps article {
    padding: 20px 0;
  }
  .section-heading {
    padding-top: 38px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .content-page {
    padding: 38px 0 50px;
  }
  footer {
    padding: 24px 22px;
    gap: 12px;
    flex-wrap: wrap;
  }
  footer > span {
    width: 100%;
    margin: 0;
  }
  .upload-card {
    padding: 20px;
  }
  .secondary {
    font-size: 12px;
    padding: 12px;
  }
  .art-tag {
    font-size: 8px;
  }
}

/* 모바일 조작을 중심으로 구성하고 데스크톱 마우스 환경에서는 대여 진입을 숨깁니다. */
.desktop-notice { display: none; }
#qr-dialog { width: min(480px, 100vw); }
#qr-video { display: block; width: 100%; min-height: 200px; background: #203d30; border-radius: 12px; }
#photo-name, #scooter-number, #rental-details { overflow-wrap: anywhere; }
#refresh-state { margin-bottom: 24px; }
.upload-actions label:has(+ input:disabled) { opacity: .45; cursor: not-allowed; }
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
  .mobile-action { display: none !important; }
  .desktop-notice { display: block; color: var(--green); background: var(--soft); padding: 18px; border-radius: 12px; }
}
@media (max-width: 700px) {
  #about > .intro { white-space: normal; }
  .intro, .info-grid p, .info-grid li, .steps p { font-size: 15px; }
  h1 { font-size: clamp(28px, 8vw, 36px); }
}
