:root{
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#111;
  --muted:#666;
  --line:#e7e9ef;
  --brand:#1f4fbf;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--text);
  background:var(--bg);
}

/* ===== Topbar ===== */
.topbar{background:#fff; border-bottom:1px solid var(--line);}
.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit;}
.brand-logo{width:54px; height:34px; object-fit:contain;}
.brand-text{line-height:1;}
.brand-sub{font-size:11px; color:#f39c12; font-weight:700; letter-spacing:.2px;}
.brand-title{font-size:20px; font-weight:900; color:#1a4bbf; margin-top:2px;}

.admin-links{display:flex; gap:14px; align-items:center; font-size:13px;}
.admin-link{color:#333; text-decoration:none;}
.admin-link:hover{text-decoration:underline;}
.admin-link.is-muted{color:#999; cursor:not-allowed;}

/* ===== Menu ===== */
.menu{border-top:1px solid var(--line);}
.menu-inner{
  max-width:1100px;
  margin:0 auto;
  padding:10px 18px;
  display:flex;
  gap:22px;
  flex-wrap:wrap;
  justify-content:center;
}
.menu-item{
  text-decoration:none;
  color:#333;
  font-size:13px;
}
.menu-item:hover{color:var(--brand);}

/* ===== Hero ===== */
.hero{background:#fff;}
.hero-inner{
  max-width:1100px;
  margin:0 auto;
  padding:14px 18px 22px;
}
.hero-frame{
  border-radius:14px;
  overflow:hidden;
  background:#ddd;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}
.hero-img{
  width:100%;
  height:320px;
  object-fit:cover;
  display:block;
}
.hero-dots{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:10px;
}
.dot{
  width:8px; height:8px;
  border-radius:50%;
  background:#cfd5e3;
}
.dot.is-active{background:#f5b301;}

/* ===== Main ===== */
.main{padding:38px 18px 60px;}
.main-inner{max-width:1100px; margin:0 auto;}
.section-title{text-align:center; margin-bottom:26px;}
.section-title h2{margin:0; font-size:22px; font-weight:900;}
.section-title p{margin:8px 0 0; color:var(--muted); font-size:13px;}

.service-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:22px;
  align-items:stretch;
  justify-content:center;
}
.service-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:26px 22px;
  text-decoration:none;
  color:inherit;
  box-shadow:0 10px 28px rgba(0,0,0,.05);
  display:flex;
  flex-direction:column;
  align-items:center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.service-card:hover{
  transform: translateY(-2px);
  box-shadow:0 14px 36px rgba(0,0,0,.08);
}
.service-thumb{
  width:120px; height:80px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
}
.service-thumb img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.service-name{font-size:18px; font-weight:900; margin-top:4px;}
.service-desc{margin-top:8px; font-size:13px; color:var(--muted);}

/* ===== Footer ===== */
.footer{background:#fff; border-top:1px solid var(--line);}
.footer-inner{
  max-width:1100px;
  margin:0 auto;
  padding:16px 18px;
  color:#888;
  font-size:12px;
}

/* ===== Responsive ===== */
@media (max-width: 860px){
  .hero-img{height:240px;}
  .service-grid{grid-template-columns:1fr;}
  .admin-links{gap:10px;}
}
/* ===== Responsive helpers ===== */
.desktop-only { display: flex; }
.mobile-only { display: none; }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }
}

/* ===== Hamburger ===== */
.hamburger {
  width: 44px;
  height: 44px;
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.hamburger-line {
  width: 18px;
  height: 2px;
  background: #222;
  display: block;
  border-radius: 2px;
}

/* ===== Drawer ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2000;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100vh;
  background: #fff;
  z-index: 2001;
  transform: translateX(100%);
  transition: transform .18s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  padding: 14px;
}
.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.drawer-close {
  width: 44px;
  height: 44px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.drawer-menu {
  display: flex;
  flex-direction: column;
}

.drawer-item {
  padding: 14px 10px;
  border-bottom: 1px solid #eee;
  color: #111;
  text-decoration: none;
  font-weight: 600;
}

.drawer-item.is-muted {
  color: #888;
  font-weight: 500;
}

.drawer-divider {
  height: 1px;
  background: #eee;
  margin: 12px 0;
}

/* ✅ 모바일에서 header가 작게 보이도록 (필요 시) */
@media (max-width: 900px) {
  .topbar-inner { padding: 10px 14px; }
  .brand-logo { height: 34px; }
}
/* ===== GL 예약조회 카드/모달 ===== */

@media (min-width: 861px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.service-card-button {
  width: 100%;
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
}

.service-thumb-icon {
  width: 86px;
  height: 86px;
  border-radius: 26px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: inset 0 0 0 1px rgba(31, 79, 191, 0.1);
}

.lookup-service-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f4fbf;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(31, 79, 191, 0.22);
}

.lookup-modal[hidden] {
  display: none;
}

.lookup-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lookup-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(4px);
}

.lookup-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: visible;
  background: #fff;
  border-radius: 26px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
  padding: 28px;
}

.lookup-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
}

.lookup-modal-head {
  padding-right: 42px;
  margin-bottom: 18px;
}

.lookup-modal-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1f4fbf;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.lookup-modal-head h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 950;
  color: #0f172a;
}

.lookup-modal-head p {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

.lookup-start-form {
  display: grid;
  gap: 14px;
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lookup-field {
  display: grid;
  gap: 7px;
}

.lookup-field label {
  font-size: 13px;
  font-weight: 900;
  color: #334155;
}

.lookup-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  padding: 0 13px;
  outline: none;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

.lookup-field input:focus {
  border-color: #1f4fbf;
  box-shadow: 0 0 0 4px rgba(31, 79, 191, 0.1);
}

.lookup-hospital-combobox {
  position: relative;
}

.lookup-hospital-list {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 245px;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  padding: 6px;
}

.lookup-hospital-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lookup-hospital-item:hover {
  background: #f1f5ff;
}

.lookup-hospital-item span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.lookup-hospital-item small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.lookup-hospital-empty {
  padding: 18px 12px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.lookup-help {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.lookup-submit {
  height: 50px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #1f4fbf 0%, #153a91 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(31, 79, 191, 0.2);
  margin-top: 4px;
}

.lookup-submit:hover {
  transform: translateY(-1px);
}

.lookup-modal-error {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 850;
}

@media (max-width: 640px) {
  .lookup-modal {
    align-items: flex-start;
    padding: 14px;
  }

  .lookup-modal-panel {
    padding: 23px 18px;
    border-radius: 22px;
  }

  .lookup-row {
    grid-template-columns: 1fr;
  }

  .lookup-modal-head h2 {
    font-size: 24px;
  }
}