:root {
  --primary-color: #02343f;
  --primary-light: #0a4a5a;
  --bg-primary: #edede5;
  --bg-white: #edede5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  --success: #10b981;
  --error: #dc3545;
  --warning: #f59e0b;
  --border-light: #e5e7eb;
  --border: #ddd;
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 20px;
  --radius: 3px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-lockup--center {
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.brand-mark {
  display: inline-block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: var(--primary-color);
  -webkit-mask: url("/img/logo-mark.png") center / contain no-repeat;
  mask: url("/img/logo-mark.png") center / contain no-repeat;
}

.brand-mark--lg {
  width: 42px;
  height: 42px;
}

.brand-name {
  /* Latin wordmark: fixed stack so KO/JA/EN page lang does not swap glyphs */
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--primary-color);
  line-height: 1;
}

* {
  box-sizing: border-box;
  /* 평소엔 썸만 투명 — 스크롤 시에만 보임 (.is-scrolling) */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

*::-webkit-scrollbar-button {
  display: none !important;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.is-scrolling {
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.14);
}

.is-scrolling::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움",
    sans-serif;
  font-size: var(--font-md);
  line-height: 1.5;
}

button {
  height: 30px;
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: var(--font-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  color: var(--text-primary);
}

input:focus,
textarea:focus,
input:focus-visible,
textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--border);
}

textarea {
  resize: none;
  overflow-y: hidden;
}

.icon {
  display: block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  overflow: visible;
}

.btn-primary .icon,
.btn-secondary .icon,
.tab-btn .icon,
.view-toggle-btn .icon,
.view-swap-btn .icon,
.btn-icon .icon,
.date-picker-nav .icon,
.profile-link .icon,
.style-dd-trigger .icon {
  width: 18px;
  height: 18px;
}

.tab-btn .icon {
  width: 22px;
  height: 22px;
}

.view-toggle-btn .icon {
  width: 20px;
  height: 20px;
}

.logout-btn .icon,
.home-btn .icon {
  width: 18px;
  height: 18px;
}

.style-dd-caret {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-color);
  color: var(--text-white);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: var(--font-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10050;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--error);
}

.toast.success {
  background: var(--success);
}
