/*
 * CASINO IN shared component layer.
 *
 * The Company 360 Vega controls are the visual source of truth. This file
 * deliberately contains no font loading or component font declarations so the
 * site's existing typography and per-user font preferences remain untouched.
 */

:root {
  --ui-background: var(--brand-bg);
  --ui-foreground: var(--brand-text-primary);
  --ui-card: var(--brand-surface);
  --ui-popover: var(--brand-surface-elevated, var(--brand-surface));
  --ui-muted: var(--brand-surface-muted);
  --ui-muted-foreground: var(--brand-text-muted);
  --ui-border: var(--brand-border);
  --ui-border-strong: var(--brand-border-strong);
  --ui-primary: var(--brand-accent);
  --ui-primary-foreground: var(--brand-bg);
  --ui-accent: var(--brand-surface-muted);
  --ui-accent-foreground: var(--brand-text-primary);
  --ui-danger: var(--brand-danger);
  --ui-ring: var(--brand-highlight);
  --ui-radius: 7px;
  --ui-option-radius: 5px;
  --ui-control-height: 36px;
  --ui-control-height-mobile: 40px;
  --ui-shadow-xs: 0 1px 2px color-mix(in srgb, var(--brand-text-primary) 6%, transparent);
  --ui-shadow-popover: 0 10px 30px color-mix(in srgb, #000 22%, transparent),
    0 2px 8px color-mix(in srgb, #000 14%, transparent);
  --ui-transition: 120ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Buttons: preserve existing variants and behavior while sharing Vega geometry. */
.btn,
.button {
  min-height: var(--ui-control-height);
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-card);
  box-shadow: var(--ui-shadow-xs);
}

.btn:hover,
.button:hover {
  border-color: var(--ui-border-strong);
  background: var(--ui-accent);
}

.btn-primary,
.button-primary {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
  color: var(--ui-primary-foreground);
}

.btn-primary:hover,
.button-primary:hover {
  border-color: var(--brand-accent-hover);
  background: var(--brand-accent-hover);
  color: var(--ui-primary-foreground);
}

.btn-secondary { border-color: transparent; background: var(--ui-muted); }
.btn-secondary:hover { border-color: var(--ui-border-strong); background: var(--ui-accent); }
.btn-outline { background: transparent; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-icon { border-radius: var(--ui-radius); }

.btn:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--ui-ring);
  outline-offset: 2px;
}

/* A submit in flight (button-pending.js): the clicked button carries its own
   small ring. The page itself stays untouched - no blur, no overlay. */
.is-submit-pending { pointer-events: none; opacity: 0.7; }
.is-submit-pending > .ui-icon { display: none; }
.is-submit-pending::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: none;
  box-sizing: border-box;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: submit-pending-spin 0.7s linear infinite;
}
/* Icon buttons are flex with their own gap - the margin would double it. */
.has-ui-icon.is-submit-pending::before { margin-right: 0; }
@keyframes submit-pending-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .is-submit-pending::before {
    border-right-color: currentColor;
    animation: submit-pending-fade 1.2s ease-in-out infinite;
  }
  @keyframes submit-pending-fade { 50% { opacity: 0.35; } }
}

/* A slow request in flight (loading-progress.js): a 3px line at the very top,
   nothing else. It only appears once the wait is long enough to notice, so
   fast clicks stay silent. Above the topbar and its popovers; below the
   drag ghost, which must stay under the cursor. */
.site-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2100;
  height: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.site-progress.is-active { opacity: 1; }
.site-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brand-highlight);
  box-shadow: 0 0 8px rgba(var(--brand-highlight-rgb), 0.55);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  /* 차오르는 움직임 없이 길이만 바뀐다. */
  .site-progress i { transition: none; }
}

.login-button,
.google-login-button,
.guest-access-button,
.public-login-link,
.login-home-link {
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-xs);
  transition: color var(--ui-transition), background-color var(--ui-transition),
    border-color var(--ui-transition), box-shadow var(--ui-transition);
}

.login-button { border-color: var(--ui-primary); background: var(--ui-primary); color: var(--ui-primary-foreground); }
.login-button:hover { border-color: var(--brand-accent-hover); background: var(--brand-accent-hover); }
.google-login-button,
.guest-access-button,
.public-login-link { border-color: var(--ui-border); background: var(--ui-card); }
.google-login-button:hover,
.guest-access-button:hover,
.public-login-link:hover { border-color: var(--ui-border-strong); background: var(--ui-accent); text-decoration: none; }
.login-button:focus-visible,
.google-login-button:focus-visible,
.guest-access-button:focus-visible,
.public-login-link:focus-visible,
.login-home-link:focus-visible { outline: 2px solid var(--ui-ring); outline-offset: 2px; }

/* Text-like form fields. Checkbox/radio and hidden controls are handled below. */
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select,
textarea {
  max-width: 100%;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-background);
  color: var(--ui-foreground);
  box-shadow: var(--ui-shadow-xs);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  transition: color var(--ui-transition), background-color var(--ui-transition),
    border-color var(--ui-transition), box-shadow var(--ui-transition);
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select {
  min-height: var(--ui-control-height);
  padding: 0 11px;
}

textarea { padding: 9px 11px; resize: vertical; }

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):hover,
select:hover,
textarea:hover { border-color: var(--ui-border-strong); }

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ui-ring);
  outline-offset: 2px;
  border-color: var(--ui-border-strong);
}

input::placeholder,
textarea::placeholder { color: var(--ui-muted-foreground); opacity: 0.82; }

input:disabled,
select:disabled,
textarea:disabled,
input[readonly],
textarea[readonly] {
  opacity: 0.58;
  cursor: not-allowed;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--ui-danger); }

:where(input[type="checkbox"]),
:where(input[type="radio"]) {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  min-height: 0;
  margin: 0;
  place-content: center;
  appearance: none;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-background);
  color: var(--ui-primary-foreground);
  cursor: pointer;
  transition: background-color var(--ui-transition), border-color var(--ui-transition), box-shadow var(--ui-transition);
}

:where(input[type="checkbox"]) { border-radius: 4px; }
:where(input[type="radio"]) { border-radius: 50%; }
:where(input[type="checkbox"])::before {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg) scale(0);
  transition: transform var(--ui-transition);
}
:where(input[type="radio"])::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: scale(0);
  transition: transform var(--ui-transition);
}
:where(input[type="checkbox"]):checked,
:where(input[type="radio"]):checked { border-color: var(--ui-primary); background: var(--ui-primary); }
:where(input[type="checkbox"]):checked::before,
:where(input[type="radio"]):checked::before { transform: rotate(-45deg) scale(1); }
:where(input[type="radio"]):checked::before { transform: scale(1); }
:where(input[type="checkbox"]):focus-visible,
:where(input[type="radio"]):focus-visible { outline: 2px solid var(--ui-ring); outline-offset: 2px; }
:where(input[type="checkbox"]):disabled,
:where(input[type="radio"]):disabled { opacity: 0.5; cursor: not-allowed; }

/* Custom Select. The original native select remains the submitted form field. */
.vega-select {
  position: relative;
  display: inline-flex;
  min-width: min(164px, 100%);
  max-width: 100%;
  vertical-align: middle;
}

label > .vega-select,
.vega-select.is-fluid { width: 100%; }

.vega-select > select {
  min-width: 164px;
  height: var(--ui-control-height);
  padding: 0 32px 0 11px;
}

.vega-select.is-enhanced > select {
  position: absolute !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.vega-select-trigger {
  display: inline-flex;
  width: 100%;
  min-width: 164px;
  height: var(--ui-control-height);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-background);
  color: var(--ui-foreground);
  box-shadow: var(--ui-shadow-xs);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--ui-transition), background-color var(--ui-transition),
    border-color var(--ui-transition), box-shadow var(--ui-transition);
}

.vega-select-trigger:hover,
.vega-select-trigger[aria-expanded="true"] {
  border-color: var(--ui-border-strong);
  background: var(--ui-accent);
}

.vega-select-trigger:focus-visible {
  outline: 2px solid var(--ui-ring);
  outline-offset: 2px;
}

.vega-select-trigger[aria-invalid="true"] { border-color: var(--ui-danger); }
.vega-select-trigger:disabled { opacity: 0.5; pointer-events: none; }
.vega-select-trigger .ui-icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--ui-muted-foreground); transition: transform var(--ui-transition); }
.vega-select-trigger[aria-expanded="true"] .ui-icon-chevron-down { transform: rotate(180deg); }
.vega-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.vega-select-content {
  position: fixed;
  z-index: 1600;
  display: grid;
  gap: 2px;
  min-width: 164px;
  max-height: min(288px, calc(100dvh - 16px));
  margin: 0;
  padding: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-popover);
  color: var(--ui-foreground);
  box-shadow: var(--ui-shadow-popover);
  opacity: 0;
  transform: translateY(-3px) scale(0.985);
  transform-origin: var(--vega-transform-origin, top center);
  transition: opacity var(--ui-transition), transform var(--ui-transition);
}

.vega-select-content[data-side="top"] { transform: translateY(3px) scale(0.985); }
.vega-select-content[data-state="open"] { opacity: 1; transform: translateY(0) scale(1); }
.vega-select-content[hidden] { display: none; }

.vega-select-option {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 9px 7px 30px;
  border: 0;
  border-radius: var(--ui-option-radius);
  color: var(--ui-foreground);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  cursor: default;
  user-select: none;
  outline: none;
}

.vega-select-option:hover,
.vega-select-option.is-active,
.vega-select-option:focus-visible { background: var(--ui-accent); color: var(--ui-accent-foreground); }
.vega-select-option[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.vega-select-option .ui-icon-check { position: absolute; left: 9px; width: 14px; height: 14px; opacity: 0; }
.vega-select-option[aria-selected="true"] .ui-icon-check { opacity: 1; }
/* Category glyph declared by <option data-icon>. Greyscale by design; it only
   borrows the row's text colour when the row itself is highlighted. */
.vega-select-option .vega-option-icon { width: 15px; height: 15px; margin-right: 8px; flex: none; color: var(--ui-muted-foreground); }
.vega-select-option:hover .vega-option-icon,
.vega-select-option.is-active .vega-option-icon,
.vega-select-option:focus-visible .vega-option-icon { color: inherit; }

/* Status, navigation and compact interactive surfaces. */
.badge,
.status-badge,
.impact-badge,
.membership-badge {
  border-color: var(--ui-border);
  border-radius: var(--ui-option-radius);
  box-shadow: var(--ui-shadow-xs);
}

.news-pagination,
.pagination,
.legislation-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.news-pagination > span,
.pagination > span,
.legislation-pagination > span {
  min-width: 58px;
  color: var(--ui-muted-foreground);
  font-size: 11px;
  text-align: center;
}

.company-expert-tabs,
.holiday-year-tabs,
.fund-scenario-tabs {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
}

.company-expert-tabs a,
.holiday-year-tabs a,
.fund-scenario-tabs a { transition: color var(--ui-transition), background-color var(--ui-transition), border-color var(--ui-transition); }
.company-expert-tabs a:hover,
.holiday-year-tabs a:hover,
.fund-scenario-tabs a:hover { background: var(--ui-accent); text-decoration: none; }
.company-expert-tabs a:focus-visible,
.holiday-year-tabs a:focus-visible,
.fund-scenario-tabs a:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ui-ring); outline-offset: -2px; }

.panel,
.kpi-card,
.login-card,
.news-card,
.insight-card { border-color: var(--ui-border); border-radius: var(--ui-radius); }

:where([class$="-card"], [class*="-card "]) {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
}

:where(.panel, .kpi-card, .login-card, .news-card, .insight-card, [class$="-card"], [class*="-card "]) {
  box-shadow: var(--ui-shadow-xs);
}

.news-filter-form,
.legislation-filter-panel,
.search-console,
.community-compose-panel,
.official-filter {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-xs);
}

.table-scroll,
.table-scroll-wrap,
.community-table-wrap,
.source-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
}

table.data-table thead,
.community-table thead,
.official-table thead,
.source-data-table thead { background: var(--ui-muted); }

table.data-table th,
table.data-table td,
.community-table th,
.community-table td,
.official-table th,
.official-table td,
.source-data-table th,
.source-data-table td { border-color: var(--ui-border); }

table.data-table tbody tr:hover,
.community-table tbody tr:hover,
.official-table tbody tr:hover,
.source-data-table tbody tr:hover { background: color-mix(in srgb, var(--ui-muted) 72%, transparent); }

.item-list li,
.compact-feed li,
.community-list-item { border-radius: var(--ui-option-radius); }

.empty-state,
.news-empty,
.community-empty { border-radius: var(--ui-radius); }

/* Shared file picker: the original input retains its name, validation and form
   ownership while a label-driven control replaces the browser chrome. */
.account-picture-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-picture-picker,
.file-upload-control,
.file-upload-display {
  min-width: 0;
}

.file-upload-control {
  position: relative;
  display: block;
  width: 100%;
  color: var(--ui-foreground);
  cursor: pointer;
}

.file-upload-control > .file-upload-input {
  position: absolute;
  width: 1px !important;
  min-width: 0 !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.file-upload-display {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: var(--ui-control-height, 42px);
  align-items: center;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-background);
  overflow: hidden;
  transition: border-color var(--ui-transition), box-shadow var(--ui-transition), background var(--ui-transition);
}

.file-upload-button.btn {
  flex: 0 0 auto;
  width: auto !important;
  max-width: 55%;
  height: 100%;
  min-height: 0;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
  background: var(--ui-muted);
  color: var(--ui-foreground);
  font-size: var(--text-xs);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.file-upload-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  color: var(--ui-muted-foreground);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-name.has-file { color: var(--ui-foreground); }
.file-upload-control:hover .file-upload-display { border-color: var(--ui-border-strong); }
.file-upload-control:hover .file-upload-button { background: var(--ui-accent); }
.file-upload-input:focus-visible + .file-upload-display {
  border-color: var(--ui-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-ring) 20%, transparent);
}
.file-upload-input:disabled + .file-upload-display {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .account-picture-form { grid-template-columns: 1fr; }
  .file-upload-button.btn { padding: 0 12px; }
  .file-upload-name { padding: 0 10px; }
}

/* 카지노인 관리자 작업 공간 레일(.admin-global-sidebar · .admin-runtime-*) 규칙은
   MyDesk 템플릿 어디서도 쓰지 않아 2026-10-24 에 지웠다. */


.recruitment-filter {
  grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
}

.source-download-disclosure {
  min-width: 0;
}

.source-download-summary {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
}

.source-download-summary::-webkit-details-marker { display: none; }
.source-download-summary > span:first-child { display: grid; gap: 4px; }
.source-download-summary small { color: var(--ui-muted-foreground); font-size: var(--text-xs); font-weight: 450; }
.source-download-summary-state { color: var(--ui-muted-foreground); font-size: var(--text-xs); }
.source-download-disclosure[open] .source-download-summary-state::before { content: "접기"; }
.source-download-disclosure[open] .source-download-summary-state { font-size: 0; }
.source-download-disclosure[open] .source-download-summary-state::before { font-size: var(--text-xs); }
.source-download-disclosure-body {
  /* minmax(0,1fr), not the implicit auto track: an auto track grows to the
     widest item's max-content, and the results table is far wider than the
     viewport - it stretched this grid to ~2215px inside a 709px page and
     dragged the filter and chart panels out with it. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  margin-top: 14px;
}

/* Review/archive calendar: native date input remains the no-JS fallback, while
   the enhanced state uses an in-site caption-dropdown calendar. */
.diary-date-picker.is-calendar-enhanced {
  display: block;
  position: relative;
}

.diary-date-picker.is-calendar-enhanced > input[data-diary-date] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.diary-date-picker.is-calendar-enhanced .diary-date-button {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  padding-inline: 11px;
  background: var(--ui-background);
  color: var(--ui-foreground);
  text-align: left;
}

.diary-date-button .ui-icon { color: var(--ui-muted-foreground); }

.diary-calendar-popover {
  position: fixed;
  z-index: 1700;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-popover);
  color: var(--ui-foreground);
  box-shadow: var(--ui-shadow-popover);
  opacity: 0;
  transform: translateY(-4px) scale(.985);
  transform-origin: top center;
  transition: opacity var(--ui-transition), transform var(--ui-transition);
}

.diary-calendar-popover[hidden] { display: none; }
.diary-calendar-popover[data-state="open"] { opacity: 1; transform: translateY(0) scale(1); }

.diary-calendar-caption {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  padding-bottom: 9px;
}

.diary-calendar-caption-selects {
  display: grid;
  grid-template-columns: 1fr .82fr;
  gap: 5px;
}

.diary-calendar-caption select {
  width: 100%;
  min-height: 32px;
  padding-inline: 8px;
  font-size: 12px;
  font-weight: 650;
}

.diary-calendar-nav,
.diary-calendar-footer-button,
.diary-calendar-day {
  border: 0;
  background: transparent;
  color: inherit;
}

.diary-calendar-nav {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--ui-option-radius);
  font-size: 20px;
  line-height: 1;
}

.diary-calendar-nav:hover,
.diary-calendar-footer-button:hover,
.diary-calendar-day:hover,
.diary-calendar-day:focus-visible { background: var(--ui-accent); }

.diary-calendar-nav:focus-visible,
.diary-calendar-footer-button:focus-visible,
.diary-calendar-day:focus-visible {
  outline: 2px solid var(--ui-ring);
  outline-offset: 1px;
}

.diary-calendar-weekdays,
.diary-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.diary-calendar-weekdays { margin-bottom: 3px; }
.diary-calendar-weekdays span {
  display: grid;
  height: 28px;
  place-items: center;
  color: var(--ui-muted-foreground);
  font-size: 10px;
  font-weight: 650;
}

.diary-calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  height: 36px;
  place-items: center;
  border-radius: var(--ui-option-radius);
  font-size: 12px;
  font-weight: 550;
}

.diary-calendar-day.is-outside { color: var(--ui-muted-foreground); opacity: .46; }
.diary-calendar-day.is-today::after {
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.diary-calendar-day.is-selected {
  background: var(--ui-primary);
  color: var(--ui-primary-foreground);
}
.diary-calendar-day.is-selected:hover,
.diary-calendar-day.is-selected:focus-visible { background: var(--ui-primary); }

.diary-calendar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--ui-border);
}

.diary-calendar-footer-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: var(--ui-option-radius);
  color: var(--ui-muted-foreground);
  font-size: 11px;
  font-weight: 650;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.review-tags span,
.review-tags i {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-muted);
  color: var(--ui-muted-foreground);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}


@media (max-width: 1080px) {
  .recruitment-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recruitment-filter input { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .recruitment-filter { grid-template-columns: 1fr; }
  .recruitment-filter input { grid-column: auto; }
  .recruitment-filter .btn { width: 100%; }
}

.topbar-nav a,
.data-subnav a,
.official-subnav a,
.tips-subnav a { border-radius: var(--ui-option-radius); }

.topbar-nav a:hover,
.data-subnav a:hover,
.official-subnav a:hover,
.tips-subnav a:hover { background: var(--ui-accent); text-decoration: none; }

/* Keep the top navigation flat: active/hover state is conveyed by color, not a heavy underline. */
.topbar-nav > a:hover,
.topbar-nav > a.active { border-bottom-color: transparent; }

/* Language options sit inside .topbar-nav, but must not inherit its link underline or margins. */
.topbar-nav .global-language-switch a,
.topbar-nav .global-language-switch a:hover,
.topbar-nav .global-language-switch a.active { margin: 0; border: 0; }

.global-language-switch summary,
.global-language-switch nav,
.topbar-profile-popover,
.topbar-private-menu > div {
  border-radius: var(--ui-radius);
}

.global-language-switch nav,
.topbar-profile-popover,
.topbar-private-menu > div { border-color: var(--ui-border); box-shadow: var(--ui-shadow-popover); }

/* The primary navigation and language control stay flat against the top bar. */
.topbar,
.topbar-nav,
.topbar-nav a,
.global-language-switch,
.global-language-switch summary { box-shadow: none; }
.global-language-switch nav { box-shadow: none; }
.global-language-switch { backdrop-filter: none; }
.topbar-profile-popover,
.topbar-private-menu > div { box-shadow: none; }

.casino-chart-tooltip,
[role="tooltip"] { border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-popover); }

/* Timeline entries stay scannable while preserving the complete rendered
   Markdown as a progressive-enhancement fallback. */
.diary-timeline-excerpt {
  --diary-timeline-collapse-height: 360px;
  position: relative;
  min-width: 0;
}

.diary-timeline-excerpt > .community-markdown {
  color: var(--brand-text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.diary-timeline-excerpt > .community-markdown img {
  max-height: 520px;
  object-fit: contain;
}

.diary-timeline-excerpt.is-collapsible:not(.is-expanded) {
  box-sizing: content-box;
  max-height: var(--diary-timeline-collapse-height);
  padding-bottom: 54px;
  overflow: hidden;
}

.diary-timeline-excerpt.is-collapsible:not(.is-expanded)::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 108px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--ui-card) 84%, transparent) 48%,
    var(--ui-card) 82%
  );
  content: "";
  pointer-events: none;
}

.diary-timeline-expand.btn {
  display: none;
  min-height: 34px;
  padding-inline: 13px;
  border-color: var(--ui-border);
  background: var(--ui-card);
  font-size: 11px;
}

.diary-timeline-excerpt.is-collapsible .diary-timeline-expand {
  display: inline-flex;
  z-index: 2;
}

.diary-timeline-excerpt.is-collapsible:not(.is-expanded) .diary-timeline-expand {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.diary-timeline-excerpt.is-expanded .diary-timeline-expand {
  width: max-content;
  margin: 12px auto 0;
}

.diary-timeline-excerpt.is-expanded .diary-timeline-expand .ui-icon {
  transform: rotate(180deg);
}

.diary-timeline-expanded-actions {
  display: none;
  align-items: center;
  margin-top: 12px;
}

.diary-timeline-excerpt.is-expanded .diary-timeline-expanded-actions {
  display: flex;
}

.diary-timeline-expanded-actions form { margin: 0; }
.diary-timeline-expanded-actions .btn { min-height: 34px; font-size: 11px; }

@media (max-width: 620px) {
  .diary-timeline-excerpt { --diary-timeline-collapse-height: 280px; }
  .diary-timeline-excerpt > .community-markdown { font-size: 12px; }
}

@media (max-width: 760px) {
  .btn,
  .button,
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  .vega-select-trigger { min-height: var(--ui-control-height-mobile); }

  label > .vega-select,
  .form-inline > .vega-select,
  .news-filter-form .vega-select,
  .legislation-filter-form .vega-select { width: 100%; }

  .vega-select-option { min-height: 40px; padding-top: 9px; padding-bottom: 9px; }
  .news-pagination,
  .pagination,
  .legislation-pagination { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .vega-select-trigger,
  .vega-select-trigger .ui-icon,
  .vega-select-content { transition: none; }
}

.source-download-disclosure-body > * { min-width: 0; }

/* 첨부파일 종류 카드 (_file_card.html).
   목록에서 파일 이름을 읽기 전에 종류가 먼저 보이게 하는 장식이다.
   안쪽 무늬는 CSS 로만 그린다 - 이미지도 아이콘 폰트도 쓰지 않는다. */
.file-card {
  --file-accent: #71717a;
  position: relative;
  display: inline-block;
  width: 46px;
  height: 58px;
  flex: none;
}
.file-card[data-kind="pdf"] { --file-accent: #d4483b; }
.file-card[data-kind="word"] { --file-accent: #2f6fe4; }
.file-card[data-kind="text"] { --file-accent: #71717a; }
.file-card[data-kind="sheet"] { --file-accent: #16794a; }
.file-card[data-kind="slide"] { --file-accent: #d97706; }
.file-card[data-kind="image"] { --file-accent: #b8399e; }
.file-card[data-kind="video"] { --file-accent: #0f766e; }
.file-card[data-kind="archive"] { --file-accent: #7c5cd6; }
.file-card[data-kind="app"] { --file-accent: #2f6fe4; }
.file-card[data-kind="code"] { --file-accent: #ca8a04; }

.file-card-page {
  display: flex;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  gap: 4px;
  padding: 8px 7px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: var(--brand-surface);
}
.file-card-line {
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--brand-text-primary) 16%, transparent);
}
.file-card-line:first-child { background: color-mix(in srgb, var(--brand-text-primary) 30%, transparent); }
.file-card-badge {
  position: absolute;
  right: -5px;
  bottom: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--file-accent);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* 표: 머리행만 진하게 */
.file-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.file-card-grid i { height: 5px; background: color-mix(in srgb, var(--brand-text-primary) 8%, transparent); }
.file-card-grid i:nth-child(-n+3) { background: color-mix(in srgb, var(--file-accent) 45%, transparent); }

/* 이미지·동영상: 액자 */
.file-card-frame {
  position: relative;
  display: grid;
  height: 26px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-text-primary) 14%, transparent);
  border-radius: 3px;
  overflow: hidden;
}
.file-card-sun { position: absolute; top: 4px; left: 5px; width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--file-accent) 60%, transparent); }
.file-card-hill { position: absolute; right: -2px; bottom: -6px; width: 24px; height: 12px; border-radius: 50% 50% 0 0; background: color-mix(in srgb, var(--file-accent) 30%, transparent); }
.file-card-play {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid color-mix(in srgb, var(--file-accent) 70%, transparent);
}

/* 압축: 지퍼 */
.file-card-zip { display: grid; justify-items: center; gap: 2px; margin-top: 4px; }
.file-card-zip i { display: flex; width: 10px; height: 4px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--brand-text-primary) 10%, transparent); }
.file-card-zip i:nth-child(odd) { background: color-mix(in srgb, var(--file-accent) 40%, transparent); }

/* 실행 파일: 창 + 버튼 */
.file-card-app { display: grid; justify-items: center; gap: 4px; margin-top: 6px; }
.file-card-app i:first-child { width: 20px; height: 14px; border: 1.5px solid color-mix(in srgb, var(--file-accent) 55%, transparent); border-radius: 3px; }
.file-card-app i:last-child { width: 12px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--brand-text-primary) 16%, transparent); }

/* 코드: 들여쓴 줄 */
.file-card-code { display: grid; gap: 4px; margin-top: 2px; }
.file-card-code i { height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--file-accent) 45%, transparent); }
.file-card-code i:nth-child(2) { width: 70%; margin-left: 5px; }
.file-card-code i:nth-child(3) { width: 55%; margin-left: 5px; }
.file-card-code i:nth-child(4) { width: 40%; }

/* 슬라이드: 화면 한 장 */
.file-card-slide { height: 20px; border: 1px solid color-mix(in srgb, var(--file-accent) 45%, transparent); border-radius: 3px; background: color-mix(in srgb, var(--file-accent) 12%, transparent); }
