@import url('https://cdn.jsdelivr.net/npm/wanted-sans@1.0.3/fonts/webfonts/variable/split/WantedSansVariable.min.css');
@import url('https://cdn.jsdelivr.net/gh/toss/tossface/dist/tossface.css');

:root {
  --glass: rgba(255,255,255,.24);
  --glass-strong: rgba(255,255,255,.74);
  --line: rgba(255,255,255,.34);
  --text: #101114;
  --muted: #666d78;
  --shadow: 0 18px 60px rgba(0,0,0,.18);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #0b1622; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: 'Wanted Sans Variable','Wanted Sans',system-ui,sans-serif;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  background: transparent;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button,input,textarea,select { font: inherit; }
button { border: 0; }
.tossface { font-family: Tossface, sans-serif; }

.wallpaper-stage,.wallpaper-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
.wallpaper-stage {
  z-index: 0;
  background: #102231;
  overflow: hidden;
  pointer-events: none;
}
.wallpaper-layer {
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: scale(1.015);
}
.wallpaper-layer.is-active { opacity: 1; }
.wallpaper-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.01) 38%,rgba(0,0,0,.25));
}

#siteTopbar, .home-shell, .page-shell { position: relative; z-index: 2; }

.topbar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  transform: none;
}
.topbar {
  height: 72px;
  padding: 0 18px 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.30);
  border-radius: 0 0 34px 34px;
  background: linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.10));
  box-shadow: 0 10px 35px rgba(0,0,0,.10), inset 0 -1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}
.brand { font-size: 21px; font-weight: 780; letter-spacing: -.04em; color:#fff; text-shadow:0 1px 12px rgba(0,0,0,.28); }
.clock {
  min-width: 78px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color:#fff;
  text-shadow:0 1px 12px rgba(0,0,0,.28);
}
.clock-colon { display: inline-block; width: .55em; animation: blinkColon 1s steps(1,end) infinite; }
@keyframes blinkColon { 50% { opacity: .18; } }
.menu-area { justify-self: end; }
.menu-button {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(16,17,20,.72);
  border:1px solid rgba(255,255,255,.18);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: transform .18s ease, background .18s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.menu-button:active { transform: scale(.94); }
.menu-popover {
  margin-top: 10px;
  margin-right: 14px;
  margin-left: auto;
  width: min(430px, calc(100% - 28px));
  padding: 16px;
  border-radius: 28px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  opacity: 0;
  transform: translateY(-12px) scale(.985);
  pointer-events: none;
  transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}
.menu-popover.is-open { opacity: 1; transform: none; pointer-events: auto; }
.menu-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.menu-item {
  min-height: 108px;
  padding: 14px 8px;
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  font-weight: 680;
  transition: transform .16s ease, background .16s ease;
}
.menu-item:hover { background: #fff; transform: translateY(-2px); }
.menu-icon { font-size: 31px; line-height: 1; }

.home-shell {
  min-height: 100svh;
  padding: 96px 42px 38px;
}
.home-greeting {
  position: fixed;
  left: 42px;
  bottom: 38px;
  width: min(560px, calc(100vw - 84px));
  color: #fff;
  text-align: left !important;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  text-shadow: 0 3px 26px rgba(0,0,0,.34);
}
.home-greeting h1 {
  margin: 0;
  width: 100%;
  text-align: left !important;
  font-size: clamp(36px,5.2vw,78px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 850;
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 116px 0 44px;
  min-height: 100svh;
}
.hero {
  min-height: calc(100svh - 150px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 10px 44px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.28);
}
.hero h1 { margin: 0; font-size: clamp(52px,9vw,118px); line-height: .95; letter-spacing: -.065em; font-weight: 830; }
.hero p { margin: 18px 3px 0; font-size: clamp(17px,2vw,25px); font-weight: 560; opacity: .94; }

.panel {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border-radius: var(--radius-xl);
}
.page-card { padding: clamp(22px,4vw,46px); }
.page-heading { margin: 0 0 8px; font-size: clamp(34px,5vw,56px); letter-spacing: -.055em; line-height: 1; }
.page-subtitle { margin: 0 0 28px; color: var(--muted); font-size: 16px; }

.search-wrap { position: relative; margin-bottom: 28px; }
.search-icon { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.search-input {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 52px;
  border: 1px solid rgba(16,17,20,.08);
  border-radius: 21px;
  outline: none;
  background: rgba(247,248,250,.9);
  transition: box-shadow .18s ease, background .18s ease;
}
.search-input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(38,115,255,.12); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  gap: 26px 20px;
}
.service-app { text-align: center; min-width: 0; }
.service-icon {
  width: min(96px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 11px;
  border-radius: 25%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg,#f2f4f7,#fff);
  box-shadow: 0 9px 22px rgba(0,0,0,.11);
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-app:hover .service-icon { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 30px rgba(0,0,0,.15); }
.service-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-fallback { font-size: 38px; }
.service-name { font-size: 14px; font-weight: 670; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-category { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty { padding: 42px 10px; text-align: center; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.contact-item {
  min-height: 110px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(247,248,250,.86);
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact-emoji { width: 52px; height: 52px; border-radius: 18px; background: #fff; display: grid; place-items: center; font-size: 27px; flex: 0 0 auto; }
.contact-name { font-weight: 720; }
.contact-value { color: var(--muted); margin-top: 4px; word-break: break-all; }

.admin-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 18px; }
.admin-nav { padding: 16px; height: fit-content; position: sticky; top: 96px; }
.admin-nav button { width: 100%; text-align: left; padding: 13px 15px; border-radius: 15px; background: transparent; cursor: pointer; font-weight: 650; }
.admin-nav button.is-active { background: #101114; color: #fff; }
.admin-content { padding: 24px; min-width: 0; }
.admin-section[hidden] { display: none !important; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-toolbar h2 { margin: 0; }
.btn { min-height: 42px; padding: 0 16px; border-radius: 14px; background: #101114; color: #fff; cursor: pointer; font-weight: 650; }
.btn.secondary { background: #eef0f3; color: #15171b; }
.btn.danger { background: #ffebee; color: #c62828; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 650; }
.field input,.field textarea,.field select {
  width: 100%;
  border: 1px solid #e4e7eb;
  background: #fff;
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.list { display: grid; gap: 10px; margin-top: 18px; }
.list-row { background: #f7f8fa; border-radius: 18px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.list-row-main { min-width: 0; flex: 1; }
.list-row-title { font-weight: 700; }
.list-row-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-card { width: min(430px,100%); margin: 9vh auto 0; padding: 28px; }
.login-card h1 { margin: 0 0 8px; }
.notice { color: var(--muted); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: rgba(15,17,20,.94); color: white; padding: 12px 17px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 100; }
.toast.is-show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 760px) {
  .page-shell { width: calc(100% - 16px); }
  .topbar { height: 64px; padding: 0 10px 0 16px; border-radius: 0 0 28px 28px; }
  .brand { font-size: 18px; }
  .clock { font-size: 18px; min-width: 70px; }
  .menu-button { width: 42px; height: 42px; }
  .menu-popover { margin-right: 8px; width: calc(100% - 16px); padding: 12px; border-radius: 24px; }
  .menu-item { min-height: 94px; border-radius: 19px; font-size: 13px; }
  .menu-icon { font-size: 28px; }
  .home-shell { padding: 82px 18px 24px; }
  .home-greeting {
    left: 18px;
    bottom: 24px;
    width: min(430px, calc(100vw - 36px));
    text-align: left !important;
  }
  .home-greeting h1 { font-size: clamp(34px,11vw,58px); text-align: left !important; }
  .page-shell { padding-top: 94px; padding-bottom: 20px; }
  .hero { min-height: calc(100svh - 110px); padding: 0 8px 28px; }
  .hero h1 { font-size: clamp(48px,19vw,82px); }
  .hero p { font-size: 17px; max-width: 88%; }
  .page-card { padding: 22px 16px 24px; border-radius: 28px; }
  .service-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px 10px; }
  .service-icon { width: 70px; border-radius: 22%; margin-bottom: 8px; }
  .service-name { font-size: 12px; }
  .service-category { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: 6px; }
  .admin-nav button { width: auto; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}

@media (max-width: 380px) {
  .service-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
