:root {
  --bg: #08101f;
  --bg-soft: #0f1b35;
  --card: #121f3a;
  --card-2: #17284a;
  --line: #2b3f69;
  --text: #eef4ff;
  --muted: #9cb2d9;
  --accent: #5da8ff;
  --ok: #49d39a;
  --warn: #ffb74f;
  --hero-row-height: clamp(820px, 81vh, 1020px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #17325e 0%, transparent 45%),
    radial-gradient(circle at 100% 10%, #0f274f 0%, transparent 36%),
    var(--bg);
}

.page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.header-main {
  min-width: 0;
  flex: 1;
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.header-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.saru-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.header-lines {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  text-align: right;
}

.header-lines p {
  margin: 0;
  line-height: 1.42;
  font-size: 1.08rem;
  text-align: right;
  color: #d9e8ff;
}

.header-lines .work-count-time {
  font-size: 1.08rem;
  font-weight: 500;
}

.header-lines .work-count-done {
  color: #8bf7a8;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.header-lines .work-count-meta {
  display: inline;
  margin-left: 6px;
  font-size: 0.88rem;
  color: #95b3de;
}

.header-lines .work-quest-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  width: fit-content;
  max-width: min(100%, 860px);
  margin-left: auto;
  margin-right: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 173, 221, 0.18);
  background: linear-gradient(180deg, rgba(23, 47, 85, 0.82), rgba(17, 33, 64, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.header-lines .work-quest-cleared {
  border-color: rgba(143, 221, 160, 0.35);
  background: linear-gradient(180deg, rgba(40, 75, 48, 0.4), rgba(28, 55, 40, 0.5));
}

.header-lines .work-quest-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}

.header-lines .work-quest-badge,
.header-lines .work-quest-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.header-lines .work-quest-badge {
  width: 16px;
  height: 16px;
  border: 1px solid #7dd89a;
  color: #7dd89a;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  background: linear-gradient(180deg, rgba(125, 216, 154, 0.22), rgba(125, 216, 154, 0.08));
  box-shadow: 0 0 0 2px rgba(125, 216, 154, 0.16), inset 0 0 0 1px rgba(125, 216, 154, 0.2);
}

.header-lines .work-quest-chip {
  margin-left: 2px;
  padding: 0 7px;
  height: 18px;
  box-shadow: inset 0 0 0 1px rgba(125, 216, 154, 0.15);
  background: linear-gradient(180deg, rgba(125, 216, 154, 0.25), rgba(125, 216, 154, 0.08));
  color: #93f3a8;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(125, 216, 154, 0.35);
}

.header-lines .work-quest-title {
  color: #f0f5ff;
  font-size: 0.95rem;
  white-space: nowrap;
}

.header-lines .work-quest-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9e6ff;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-lines .work-count-note {
  font-size: 0.96rem;
  color: #a4bedf;
}

@media (max-width: 860px) {
  .header {
    display: block;
  }

  .header-lines {
    text-align: left;
    margin-top: 10px;
  }
}

button {
  background: linear-gradient(180deg, #335896, #2a4677);
  border: 1px solid #4c6eab;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

button:hover { filter: brightness(1.06); }
button.ghost {
  background: #1a294a;
  border-color: #395485;
  color: #cfe1ff;
}

.dashboard {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2.3fr) minmax(340px, 1fr);
  grid-template-areas:
    "menuHero weather"
    "menuHero menuList";
  grid-template-rows: 1.1fr 0.9fr;
  height: var(--hero-row-height);
  min-height: var(--hero-row-height);
  align-items: stretch;
}

.card {
  background: linear-gradient(160deg, rgba(25, 42, 74, 0.95), rgba(15, 25, 44, 0.92));
  border: 1px solid rgba(84, 119, 184, 0.45);
  border-radius: 20px;
  padding: clamp(12px, 1.2vw, 16px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}

.menu-hero-card { grid-area: menuHero; }
.weather-card { grid-area: weather; }
.menu-list-card { grid-area: menuList; }

.menu-hero-card {
  min-height: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.weather-card {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu-list-card {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-height: none;
  overflow: hidden;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.menu-hero-title-link {
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.menu-hero-subtitle {
  font-size: 0.83rem;
  color: #c3d7ff;
}

.menu-hero-title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.menu-hero {
  height: calc(100% - 42px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.menu-image-wrap {
  width: 100%;
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #3f5f98;
  background: #0c152a;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px;
  min-height: clamp(320px, 40vh, 620px);
  height: clamp(320px, 40vh, 620px);
}

.menu-text-wrap {
  align-items: stretch;
  justify-content: stretch;
  padding: 14px;
  flex: 1;
  min-height: 0;
}

.menu-text-board {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(106, 154, 236, 0.45);
  background:
    radial-gradient(circle at 85% 0%, rgba(95, 166, 255, 0.16) 0%, transparent 40%),
  rgba(10, 22, 43, 0.82);
  padding: 14px;
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
}

.menu-text-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.menu-text-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #d7e8ff;
  border: 1px solid rgba(124, 172, 255, 0.5);
  background: rgba(36, 67, 116, 0.55);
}

.menu-text-time {
  font-size: 0.76rem;
  color: #b6caea;
}

.menu-text-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
  color: #f2f7ff;
  letter-spacing: -0.02em;
}

.menu-text-body {
  margin: 12px 0 0;
  font-size: 1.22rem;
  line-height: 1.5;
  color: #dce9ff;
}

.menu-text-list {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  line-height: 1.5;
  color: #bbd1f3;
}

.menu-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
  max-width: calc(100% - 12px);
  max-height: calc(100% - 12px);
}

.menu-hero-meta {
  display: grid;
  gap: 8px;
}

.menu-hero-name {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.menu-hero .muted {
  font-size: 0.86rem;
  line-height: 1.35;
}

.menu-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  text-decoration: none;
  color: #d9e9ff;
  border: 1px solid #4969a7;
  background: rgba(44, 67, 108, 0.45);
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #3f5a8d;
  color: var(--text);
  background: #0d1730;
}

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid #3f5a8d;
  background: rgba(9, 18, 37, 0.96);
  backdrop-filter: blur(6px);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}

.search-suggest.hidden {
  display: none;
}

.suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #dfebff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
  cursor: pointer;
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(74, 112, 180, 0.3);
}

.suggest-title {
  display: block;
  font-weight: 700;
}

.suggest-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.weather-main {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow: visible;
  max-height: none;
  flex: 1;
}

.weather-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.weather-temp {
  font-size: 4.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.weather-icon {
  font-size: 4rem;
  line-height: 1;
}

.weather-desc {
  color: #deebff;
  font-weight: 600;
  font-size: 1.45rem;
  margin-top: 6px;
}

.weather-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  line-height: normal;
  color: #adc1e5;
  border-bottom: 1px dashed rgba(140, 166, 214, 0.24);
  padding-bottom: 6px;
}

.weather-row-primary {
  font-size: 1.18rem;
  color: #e7f1ff;
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge.ok {
  background: rgba(73, 211, 154, 0.18);
  color: #8cf2c8;
  border: 1px solid rgba(73, 211, 154, 0.45);
}

.badge.warn {
  background: rgba(255, 183, 79, 0.18);
  color: #ffd699;
  border: 1px solid rgba(255, 183, 79, 0.4);
}

.badge.good {
  background: rgba(73, 211, 154, 0.18);
  color: #97f1cf;
  border: 1px solid rgba(73, 211, 154, 0.45);
}

.badge.normal {
  background: rgba(115, 177, 255, 0.2);
  color: #c9e1ff;
  border: 1px solid rgba(115, 177, 255, 0.45);
}

.badge.bad {
  background: rgba(255, 183, 79, 0.2);
  color: #ffd699;
  border: 1px solid rgba(255, 183, 79, 0.45);
}

.badge.worst {
  background: rgba(255, 106, 106, 0.22);
  color: #ffd6d6;
  border: 1px solid rgba(255, 106, 106, 0.48);
}

.menu-list {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 6px;
  max-height: none;
  margin: 0;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

.menu-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 6px;
  padding: 6px;
  min-height: 0;
  height: 100%;
  border-radius: 14px;
  border: 1px solid #3c5b92;
  background: rgba(20, 33, 58, 0.82);
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.menu-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid rgba(127, 168, 228, 0.22);
  object-position: center;
}

.menu-thumb-text {
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #d8e8ff;
  border: 1px solid #4768a7;
  background:
    radial-gradient(circle at 85% 10%, rgba(126, 180, 255, 0.28) 0%, transparent 45%),
    linear-gradient(180deg, #27416c, #1a2e4f);
  letter-spacing: 0.06em;
}

.menu-item-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.menu-item-address {
  margin: 2px 0 4px;
  font-size: 0.84rem;
  color: #a9bfe3;
  line-height: 1.29;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.menu-item-summary {
  margin: 1px 0 6px;
  font-size: 0.83rem;
  line-height: 1.28;
  color: #d8e7ff;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-links {
  margin-top: 0;
}

@media (max-width: 1150px) {
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "weather"
      "menuHero"
      "menuList";
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .menu-hero-card,
  .weather-card {
    min-height: 0;
    height: auto;
    max-height: none;
  }

  .menu-list-card {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .menu-list {
    max-height: none;
  }
}

@media (min-width: 1600px) {
  .page {
    max-width: 1800px;
  }

  .card {
    padding: 18px;
  }

  .card-head h2 {
    font-size: 1.16rem;
  }

  .menu-hero-name {
    font-size: 1.28rem;
  }

  .menu-text-title {
    font-size: 2.16rem;
  }

  .menu-text-body {
    font-size: 1.26rem;
  }

  .weather-temp {
    font-size: 4.4rem;
  }

  .weather-icon {
    font-size: 4.1rem;
  }

  .menu-item-title {
    font-size: 1.06rem;
  }
}

@media (max-width: 760px) {
  .header { flex-direction: column; align-items: flex-start; }
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "weather"
      "menuHero"
      "menuList";
  }

  .page {
    padding: 14px;
  }

  .card {
    min-height: auto;
    border-radius: 16px;
    padding: 12px;
  }

  .card-head h2 {
    font-size: 0.98rem;
  }

  .menu-list {
    gap: 7px;
  }

  .menu-item {
    grid-template-columns: 70px 1fr;
    gap: 6px;
    padding: 6px;
  }

  .menu-thumb,
  .menu-thumb-text {
    width: 64px;
    height: 64px;
  }

  .menu-item-title {
    font-size: 0.92rem;
  }

  .menu-item-address {
    font-size: 0.79rem;
  }
}
