:root {
  --hvs-bg: #f5f6f8;
  --hvs-card: #ffffff;
  --hvs-text: #121317;
  --hvs-muted: #70747d;
  --hvs-line: #e6e8ec;
  --hvs-dark: #15171c;
  --hvs-blue: #2563eb;
  --hvs-blue-soft: #eef4ff;
  --hvs-green: #15803d;
  --hvs-radius: 18px;
  --hvs-shadow: 0 10px 30px rgba(18, 19, 23, .06);
}

.hvs-shell, .hvs-shell * { box-sizing: border-box; }
.hvs-shell { min-height: 100vh; background: var(--hvs-bg); color: var(--hvs-text); display: grid; grid-template-columns: 250px minmax(0,1fr); font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.hvs-sidebar { background: #fff; border-right: 1px solid var(--hvs-line); padding: 28px 18px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.hvs-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.hvs-brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--hvs-dark); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 21px; }
.hvs-brand strong, .hvs-brand small { display: block; }
.hvs-brand strong { font-size: 18px; letter-spacing: -.3px; }
.hvs-brand small { color: var(--hvs-muted); font-size: 12px; margin-top: 2px; }
.hvs-nav { display: grid; gap: 5px; }
.hvs-nav a { text-decoration: none; color: #4b4f58; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.hvs-nav a:hover { background: #f4f5f7; color: #111; }
.hvs-nav a.is-active { background: var(--hvs-dark); color: #fff; }
.hvs-nav .dashicons { font-size: 19px; width: 19px; height: 19px; }
.hvs-sidebar-help { margin-top: auto; border: 1px solid var(--hvs-line); border-radius: 16px; padding: 16px; background: #fafafa; }
.hvs-sidebar-help strong { font-size: 13px; }
.hvs-sidebar-help p { color: var(--hvs-muted); font-size: 12px; line-height: 1.6; margin: 8px 0; }
.hvs-sidebar-help a { color: #111; font-size: 12px; font-weight: 800; }

.hvs-main { padding: 36px; min-width: 0; }
.hvs-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.hvs-page-head h1 { margin: 5px 0 8px; font-size: 32px; line-height: 1.15; letter-spacing: -.9px; }
.hvs-page-head p { margin: 0; color: var(--hvs-muted); line-height: 1.65; }
.hvs-eyebrow { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: 1.25px; color: #80848c; }
.hvs-card { background: var(--hvs-card); border: 1px solid var(--hvs-line); border-radius: var(--hvs-radius); box-shadow: var(--hvs-shadow); }
.hvs-card-pad { padding: 24px; }
.hvs-grid { display: grid; gap: 16px; }
.hvs-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hvs-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hvs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hvs-gap-lg { margin-top: 22px; }
.hvs-muted { color: var(--hvs-muted); }

.hvs-btn { min-height: 44px; border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; text-decoration: none !important; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.hvs-btn:hover { transform: translateY(-1px); }
.hvs-btn-primary { background: var(--hvs-blue); color: #fff !important; }
.hvs-btn-dark { background: var(--hvs-dark); color: #fff !important; }
.hvs-btn-disabled { background: #eef0f3; color: #999; cursor: not-allowed; }
.hvs-btn-block { width: 100%; }
.hvs-btn-lg { min-height: 50px; padding: 0 24px; }
.hvs-text-link { color: #111; font-size: 13px; font-weight: 800; text-decoration: underline; }

.hvs-stat-card { padding: 20px; display: flex; align-items: center; gap: 14px; }
.hvs-stat-card > .dashicons { width: 42px; height: 42px; border-radius: 13px; background: #f2f3f5; display: grid; place-items: center; font-size: 21px; }
.hvs-stat-card strong, .hvs-stat-card small { display: block; }
.hvs-stat-card strong { font-size: 25px; line-height: 1; }
.hvs-stat-card small { margin-top: 7px; color: var(--hvs-muted); }
.hvs-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hvs-section-head h2, .hvs-card h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.4px; }
.hvs-section-head > a { color: #111; font-size: 13px; font-weight: 800; }
.hvs-step-list { padding: 0; margin: 18px 0 20px; list-style: none; display: grid; gap: 14px; }
.hvs-step-list li { display: flex; gap: 12px; align-items: flex-start; }
.hvs-step-list li > span { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--hvs-dark); color: #fff; font-size: 12px; font-weight: 800; }
.hvs-step-list strong, .hvs-step-list small { display: block; }
.hvs-step-list strong { font-size: 14px; }
.hvs-step-list small { color: var(--hvs-muted); margin-top: 4px; line-height: 1.5; }
.hvs-quality-meter { height: 9px; background: #eceef1; border-radius: 999px; overflow: hidden; margin: 22px 0 20px; }
.hvs-quality-meter span { display: block; height: 100%; border-radius: inherit; background: var(--hvs-blue); }
.hvs-quality-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--hvs-line); font-size: 13px; }
.hvs-quality-row span { color: var(--hvs-muted); text-align: right; }
.hvs-quality-card p { font-size: 12px; margin: 16px 0 0; }

.hvs-builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.hvs-builder-main { display: grid; gap: 16px; min-width: 0; }
.hvs-form-section { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 16px; }
.hvs-section-number { width: 38px; height: 38px; border-radius: 12px; background: var(--hvs-dark); color: #fff; display: grid; place-items: center; font-weight: 800; }
.hvs-form-content > h2 { margin: 2px 0 5px; }
.hvs-form-content > p { margin: 0 0 20px; color: var(--hvs-muted); font-size: 13px; }
.hvs-form-grid { display: grid; gap: 14px; }
.hvs-form-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.hvs-form-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hvs-create-form label > span, .hvs-block-label > span, .hvs-platforms > span { display: block; font-size: 12px; font-weight: 800; margin-bottom: 8px; color: #3e424a; }
.hvs-create-form input[type="text"], .hvs-create-form input[type="url"], .hvs-create-form input[type="number"], .hvs-create-form select, .hvs-create-form textarea { width: 100%; border: 1px solid #dfe2e7; background: #fff; border-radius: 11px; min-height: 44px; padding: 10px 12px; color: #111; font-size: 14px; outline: none; box-shadow: none; }
.hvs-create-form textarea { min-height: 120px; resize: vertical; }
.hvs-create-form input:focus, .hvs-create-form select:focus, .hvs-create-form textarea:focus { border-color: var(--hvs-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.hvs-choice-grid { display: grid; gap: 12px; }
.hvs-choice-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hvs-choice { cursor: pointer; border: 1px solid var(--hvs-line); border-radius: 14px; padding: 16px; min-height: 125px; background: #fff; transition: border .15s ease, background .15s ease, transform .15s ease; }
.hvs-choice:hover { transform: translateY(-1px); }
.hvs-choice.is-selected { border-color: #111; background: #f8f8f8; box-shadow: inset 0 0 0 1px #111; }
.hvs-choice input { position: absolute; opacity: 0; pointer-events: none; }
.hvs-choice .dashicons { display: block; font-size: 24px; width: 24px; height: 24px; margin-bottom: 16px; }
.hvs-choice strong, .hvs-choice small { display: block; }
.hvs-choice strong { font-size: 14px; }
.hvs-choice small { color: var(--hvs-muted); margin-top: 7px; line-height: 1.45; }
.hvs-duration-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.hvs-duration { cursor: pointer; min-height: 60px; padding: 12px; border: 1px solid var(--hvs-line); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; }
.hvs-duration.is-selected { border-color: #111; box-shadow: inset 0 0 0 1px #111; background: #f8f8f8; }
.hvs-duration > input[type="radio"] { position: absolute; opacity: 0; }
.hvs-duration-custom { gap: 8px; grid-column: span 2; }
.hvs-duration-custom input[type="number"] { width: 90px; min-height: 34px; padding: 6px 8px; }
.hvs-upload-zone { min-height: 190px; border: 2px dashed #d5d8de; border-radius: 16px; background: #fafbfc; display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; padding: 28px; }
.hvs-upload-zone:hover { border-color: #9aa0aa; background: #f6f7f8; }
.hvs-upload-zone input { display: none; }
.hvs-upload-zone .dashicons { font-size: 34px; width: 34px; height: 34px; margin-bottom: 12px; }
.hvs-upload-zone strong, .hvs-upload-zone small { display: block; }
.hvs-upload-zone small { margin-top: 7px; color: var(--hvs-muted); }
.hvs-file-summary { margin-top: 10px; padding: 11px 13px; border-radius: 10px; background: #f4f5f7; color: var(--hvs-muted); font-size: 12px; }
.hvs-file-summary.has-files { background: #ecfdf3; color: var(--hvs-green); }
.hvs-existing-assets { margin-top: 16px; }
.hvs-asset-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.hvs-asset-grid img, .hvs-video-file { width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 1px solid var(--hvs-line); border-radius: 10px; }
.hvs-video-file { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; text-align: center; }
.hvs-video-file small { font-size: 10px; line-height: 1.2; overflow: hidden; max-height: 25px; }
.hvs-block-label { display: block; margin-top: 14px; }
.hvs-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.hvs-platforms > span { margin: 0 6px 0 0; }
.hvs-platforms label { font-size: 13px; }
.hvs-submit-bar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border: 1px solid var(--hvs-line); box-shadow: 0 12px 35px rgba(0,0,0,.10); }
.hvs-submit-bar strong, .hvs-submit-bar small { display: block; }
.hvs-submit-bar strong { font-size: 13px; }
.hvs-submit-bar small { color: var(--hvs-muted); font-size: 11px; margin-top: 4px; }
.hvs-sticky-card { position: sticky; top: 24px; }
.hvs-sticky-card > h2 { margin-bottom: 18px; }
.hvs-guide-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.hvs-guide-metrics > div { border: 1px solid var(--hvs-line); border-radius: 13px; padding: 14px; background: #fafafa; }
.hvs-guide-metrics strong, .hvs-guide-metrics small { display: block; }
.hvs-guide-metrics strong { font-size: 18px; }
.hvs-guide-metrics small { color: var(--hvs-muted); font-size: 11px; margin-top: 6px; }
.hvs-guide-quality { margin: 16px 0 20px; }
.hvs-guide-quality span { display: block; height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--hvs-blue) 0 78%, #e9ebef 78%); margin-bottom: 8px; }
.hvs-guide-quality small { color: var(--hvs-muted); line-height: 1.5; }
.hvs-sticky-card h3 { font-size: 14px; margin: 0 0 10px; }
.hvs-mini-steps { margin: 0 0 18px; padding-left: 20px; color: #444851; font-size: 12px; line-height: 1.7; }
.hvs-mini-steps li { margin-bottom: 7px; }

.hvs-table-wrap { overflow-x: auto; }
.hvs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hvs-table th { color: #8a8e96; text-align: left; font-size: 11px; letter-spacing: .3px; padding: 0 10px 12px; border-bottom: 1px solid var(--hvs-line); }
.hvs-table td { padding: 15px 10px; border-bottom: 1px solid var(--hvs-line); vertical-align: middle; }
.hvs-table td strong, .hvs-table td small { display: block; }
.hvs-table td small { color: var(--hvs-muted); margin-top: 4px; }
.hvs-status { display: inline-flex; border-radius: 999px; padding: 6px 9px; background: #f0f1f3; font-size: 11px; font-weight: 800; white-space: nowrap; }
.hvs-status-published { background: #ecfdf3; color: var(--hvs-green); }
.hvs-status-ready, .hvs-status-rendering { background: var(--hvs-blue-soft); color: var(--hvs-blue); }
.hvs-status-failed { background: #fff1f2; color: #be123c; }
.hvs-actions { text-align: right; white-space: nowrap; }
.hvs-actions a { color: #111; font-weight: 800; margin-left: 10px; }
.hvs-actions .hvs-delete-link { color: #b42318; }
.hvs-empty { text-align: center; padding: 46px 20px; }
.hvs-empty .dashicons { width: 42px; height: 42px; font-size: 42px; color: #a7abb2; margin-bottom: 14px; }
.hvs-empty strong, .hvs-empty p { display: block; }
.hvs-empty p { color: var(--hvs-muted); margin: 8px 0 18px; }

.hvs-manual-card { display: flex; flex-direction: column; }
.hvs-manual-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.hvs-manual-top strong { font-size: 23px; }
.hvs-manual-top span { background: #f1f2f4; border-radius: 999px; padding: 6px 9px; font-size: 10px; color: #555b65; }
.hvs-manual-card .hvs-mini-steps { margin-top: 18px; margin-bottom: 0; }
.hvs-tip { border: 1px solid var(--hvs-line); border-radius: 14px; padding: 16px; }
.hvs-tip span { color: #999; font-size: 11px; font-weight: 900; }
.hvs-tip strong { display: block; margin: 10px 0 7px; }
.hvs-tip p { color: var(--hvs-muted); font-size: 12px; line-height: 1.6; margin: 0; }
.hvs-account-card > .dashicons { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #f2f3f5; font-size: 24px; }
.hvs-account-card p { min-height: 64px; color: var(--hvs-muted); line-height: 1.6; }

.hvs-notice { border-radius: 14px; padding: 16px 18px; margin: 0 0 20px; border: 1px solid var(--hvs-line); }
.hvs-notice strong { font-size: 13px; }
.hvs-notice p { margin: 5px 0 0; font-size: 12px; line-height: 1.6; }
.hvs-notice-info { background: #f7f9fc; }
.hvs-notice-success { background: #ecfdf3; border-color: #c7f3d6; color: #146c37; }

.hvs-login { padding: 70px 20px; background: var(--hvs-bg); min-height: 70vh; display: grid; place-items: center; }
.hvs-login-card { max-width: 480px; width: 100%; text-align: center; border: 1px solid var(--hvs-line); background: #fff; border-radius: 22px; padding: 42px; box-shadow: var(--hvs-shadow); }
.hvs-login-card h2 { margin: 8px 0; }
.hvs-login-card p { color: var(--hvs-muted); margin: 0 0 22px; }

.hvs-admin-wrap { max-width: 1150px; margin-top: 25px; }
.hvs-admin-head { padding: 26px; border: 1px solid var(--hvs-line); background: #fff; border-radius: 18px; display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 18px; }
.hvs-admin-head h1 { margin: 5px 0 7px; font-size: 26px; }
.hvs-admin-head p { margin: 0; color: var(--hvs-muted); }
.hvs-link-card { padding: 20px; text-decoration: none; color: #111; display: block; }
.hvs-link-card strong, .hvs-link-card span { display: block; }
.hvs-link-card span { color: var(--hvs-muted); margin-top: 6px; font-size: 12px; }

@media (max-width: 1100px) {
  .hvs-shell { grid-template-columns: 84px minmax(0,1fr); }
  .hvs-sidebar { padding: 22px 10px; }
  .hvs-brand > div, .hvs-nav a span:not(.dashicons), .hvs-sidebar-help { display: none; }
  .hvs-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .hvs-nav a { justify-content: center; padding: 13px; }
  .hvs-builder-grid { grid-template-columns: 1fr; }
  .hvs-sticky-card { position: static; }
  .hvs-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .hvs-shell { display: block; }
  .hvs-sidebar { position: sticky; top: 0; z-index: 20; width: 100%; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--hvs-line); padding: 10px; flex-direction: row; align-items: center; overflow-x: auto; }
  .hvs-brand { padding: 0; flex: 0 0 auto; }
  .hvs-brand-mark { width: 38px; height: 38px; }
  .hvs-nav { display: flex; margin-left: 10px; min-width: max-content; }
  .hvs-nav a { padding: 10px 12px; }
  .hvs-main { padding: 22px 14px 90px; }
  .hvs-page-head { display: block; }
  .hvs-page-head .hvs-btn { margin-top: 16px; width: 100%; }
  .hvs-page-head h1 { font-size: 27px; }
  .hvs-grid-2, .hvs-grid-3, .hvs-grid-4, .hvs-form-grid-2, .hvs-form-grid-3, .hvs-choice-grid-3 { grid-template-columns: 1fr; }
  .hvs-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hvs-form-section { grid-template-columns: 1fr; }
  .hvs-section-number { width: 34px; height: 34px; }
  .hvs-duration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hvs-duration-custom { grid-column: span 2; }
  .hvs-submit-bar { bottom: 8px; display: block; }
  .hvs-submit-bar > div { margin-bottom: 12px; }
  .hvs-submit-bar .hvs-btn { width: 100%; }
  .hvs-asset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hvs-card-pad { padding: 18px; }
}

@media (max-width: 480px) {
  .hvs-main { padding-left: 10px; padding-right: 10px; }
  .hvs-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hvs-stat-card { padding: 14px; gap: 10px; }
  .hvs-stat-card > .dashicons { width: 36px; height: 36px; }
  .hvs-stat-card strong { font-size: 20px; }
  .hvs-choice { min-height: 108px; }
  .hvs-duration-grid { gap: 8px; }
  .hvs-table { min-width: 760px; }
}

/* v0.1.1: media preview/removal and theme underline overrides */
.hvs-shell .hvs-nav a,
.hvs-shell .hvs-nav a:link,
.hvs-shell .hvs-nav a:visited,
.hvs-shell .hvs-nav a:hover,
.hvs-shell .hvs-nav a:focus,
.hvs-shell .hvs-nav a:active,
.hvs-shell .hvs-sidebar-help a,
.hvs-shell .hvs-sidebar-help a:hover {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.hvs-new-asset-preview.is-empty { display: none; }
.hvs-new-asset-preview { margin-top: 12px; }
.hvs-existing-assets.is-empty .hvs-asset-grid,
.hvs-existing-assets.is-empty .hvs-existing-help { display: none; }
.hvs-existing-help { display: block; margin-top: 5px; color: var(--hvs-muted); font-size: 11px; line-height: 1.5; }

.hvs-asset-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hvs-line);
  border-radius: 12px;
  background: #fff;
  aspect-ratio: 1 / 1;
}
.hvs-asset-card > img,
.hvs-asset-card > video,
.hvs-asset-card > .hvs-video-file {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: #101114;
}
.hvs-asset-card > video { object-fit: contain; }
.hvs-asset-card.is-removed { display: none; }
.hvs-remove-asset-input { position: absolute !important; opacity: 0 !important; pointer-events: none !important; }
.hvs-asset-remove {
  position: absolute;
  z-index: 4;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 18, 22, .88);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
}
.hvs-asset-remove:hover,
.hvs-asset-remove:focus { background: #dc2626; color: #fff; outline: none; }
.hvs-asset-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px 7px 6px;
  color: #fff;
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(transparent, rgba(0,0,0,.74));
  pointer-events: none;
}

@media (max-width: 780px) {
  .hvs-asset-remove { width: 30px; height: 30px; top: 5px; right: 5px; }
}
