/* PC right quick menu and bottom consultation bar (all pages). The bar shows from 1024px and the menu from 1380px,
   where the page margin (--side 90px) is wider than the menu, so it never covers text. Below 1024px nothing changes.
   The bar is the brand carrot (--accent) with #111 text: white text on #F37021 is 2.9:1, #111 on the darkest stop is 4.8:1. */
.cn-quick, .cn-cbar { display: none; }

@media (min-width: 1024px) {
  :root { --cn-cbar-h: 88px; --cn-quick-w: 68px; --cn-quick-r: 12px; }
  html { scroll-padding-bottom: var(--cn-cbar-h); }
  body { padding-bottom: var(--cn-cbar-h); }

  /* Quick menu: centred in the space between the 119px header and the bar, never over the bar. */
  .cn-quick { display: none; position: fixed; z-index: 890; top: 119px; right: var(--cn-quick-r); bottom: calc(var(--cn-cbar-h) + 16px); flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
  .cn-quick > * { pointer-events: auto; }
  .cn-quick-nav { width: var(--cn-quick-w); padding: 8px 0; border: 1px solid #333; border-radius: calc(var(--cn-quick-w) / 2); background: #111; }
  .cn-quick-nav li { position: relative; }
  .cn-quick-nav li + li::before { content: ''; position: absolute; top: 0; left: 12px; right: 12px; border-top: 1px solid #2c2c2c; }
  .cn-quick-nav a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 2px; color: #fff; font: 400 11px/1.2 var(--en); letter-spacing: .02em; text-align: center; white-space: nowrap; transition: color .2s ease-out; }
  .cn-quick-nav a:hover, .cn-quick-nav a:focus-visible, .cn-quick-nav a[aria-current="page"] { color: var(--accent); }
  .cn-quick-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 6px; }
  .cn-ico { display: block; width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .cn-quick-top { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #111; font: 400 12px/1 var(--en); letter-spacing: .06em; transition: background .2s ease-out, color .2s ease-out; }
  .cn-quick-top .cn-ico { width: 18px; height: 18px; stroke-width: 2.2; }
  .cn-quick-top:hover, .cn-quick-top:focus-visible { background: #fff; color: #111; }
  .cn-quick-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

  /* Bottom bar: same frame as the reference (headline, two fields, consent over the button), our colours. */
  .cn-cbar { display: block; position: fixed; z-index: 900; left: 0; right: 0; bottom: 0; height: var(--cn-cbar-h); background: linear-gradient(90deg, #DA5A17 0%, #F37021 55%, #F68A40 100%); color: #111; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
  .cn-cbar-form { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(150px, 1fr) minmax(200px, 1fr) minmax(230px, 1.25fr); column-gap: 16px; align-items: end; width: min(1120px, calc(100% - 64px)); height: 100%; margin: 0 auto; padding-bottom: 12px; }
  .cn-cbar-head { align-self: center; margin: 0; font-size: clamp(18px, 1.3vw, 24px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; white-space: nowrap; }
  .cn-cbar.is-typing .cn-cbar-head-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .cn-cbar-type::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; background: currentColor; vertical-align: -.14em; animation: cn-caret 1s steps(1) infinite; }
  @keyframes cn-caret { 50% { opacity: 0; } }
  .cn-cbar-field { min-width: 0; margin: 0; padding: 0; border: 0; }
  .cn-cbar-field > label, .cn-cbar-phone legend { display: block; margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 700; line-height: 20px; }
  #cn-cbar-name, .cn-cbar-tel { width: 100%; height: 42px; border-radius: 8px; background: #fff; }
  #cn-cbar-name { display: block; padding: 0 14px; border: 0; color: #111; font: 400 15px/1 inherit; font-family: inherit; }
  #cn-cbar-name::placeholder, .cn-cbar-tel input::placeholder { color: #767676; opacity: 1; }
  .cn-cbar-tel { display: flex; align-items: center; gap: 2px; padding: 0 10px; }
  .cn-cbar-tel input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: #111; font: 400 15px/1 inherit; font-family: inherit; text-align: center; }
  .cn-cbar-tel input:first-child { flex: 0 0 2.6em; }
  .cn-cbar-tel input:focus { outline: none; }
  .cn-cbar-dash { flex: none; color: #555; font-size: 14px; }
  #cn-cbar-name:focus-visible, .cn-cbar-tel:focus-within { outline: 2px solid #111; outline-offset: 2px; }
  .cn-cbar [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #111; }
  .cn-cbar-action { position: relative; min-width: 0; }
  .cn-cbar-agree { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; line-height: 20px; white-space: nowrap; }
  .cn-cbar-agree label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
  #cn-cbar-agree { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid #111; border-radius: 3px; background: #fff center / 12px no-repeat; cursor: pointer; }
  #cn-cbar-agree:checked { background-color: #111; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  #cn-cbar-agree:focus-visible, .cn-cbar-view:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
  #cn-cbar-agree[aria-invalid="true"] { box-shadow: 0 0 0 2px #fff; }
  .cn-cbar-view { padding: 0; border: 0; background: none; color: #111; font: 700 13px/20px inherit; font-family: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  .cn-cbar-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; padding: 0 16px; border: 0; border-radius: 21px; background: #fff; color: #111; font: 700 16px/1 inherit; font-family: inherit; cursor: pointer; transition: background .2s ease-out, color .2s ease-out; }
  .cn-cbar-submit .cn-ico { width: 18px; height: 18px; stroke-width: 2.2; }
  .cn-cbar-submit:hover, .cn-cbar-submit:focus-visible { background: #111; color: #fff; }
  .cn-cbar-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .cn-cbar-msg { position: absolute; right: 0; bottom: calc(100% + 18px); width: max-content; max-width: 340px; margin: 0; padding: 10px 14px; border-radius: 8px; background: #111; color: #fff; font-size: 14px; line-height: 1.45; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .2s ease-out, transform .2s ease-out, visibility 0s .2s; }
  .cn-cbar-msg::after { content: ''; position: absolute; right: 36px; top: 100%; border: 7px solid transparent; border-top-color: #111; }
  .cn-cbar-msg.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease-out, transform .2s ease-out; }

  /* Consent popup: native modal dialog (Escape, focus trap). */
  .cn-cbar-terms { width: min(460px, calc(100% - 40px)); max-height: calc(100% - 40px); padding: 0; border: 0; border-radius: 10px; background: #fff; color: #111; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
  .cn-cbar-terms::backdrop { background: rgba(0, 0, 0, .6); }
  .cn-cbar-terms-panel { padding: 28px 28px 24px; }
  .cn-cbar-terms h2 { margin: 0 0 14px; font-size: 19px; font-weight: 700; line-height: 1.4; }
  .cn-cbar-terms li { padding: 10px 0; border-top: 1px solid #e6e6e6; font-size: 15px; line-height: 1.6; }
  .cn-cbar-terms form { margin-top: 18px; }
  .cn-cbar-terms button { width: 100%; height: 44px; border: 0; border-radius: 22px; background: #111; color: #fff; font: 700 15px/1 inherit; font-family: inherit; cursor: pointer; }
  .cn-cbar-terms button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  /* The site pointer sits below the top layer; while the popup is open the native cursor returns. */
  html:has(.cn-cbar-terms[open]) .brand-pointer { display: none; }
  html.has-brand-pointer:has(.cn-cbar-terms[open]), html.has-brand-pointer:has(.cn-cbar-terms[open]) * { cursor: auto; }
  html.has-brand-pointer:has(.cn-cbar-terms[open]) .cn-cbar-terms button { cursor: pointer; }
}

@media (min-width: 1380px) {
  .cn-quick { display: flex; }
}
@media (min-width: 1480px) {
  :root { --cn-quick-w: 84px; --cn-quick-r: 24px; }
  .cn-quick-nav a { font-size: 12px; }
}
/* Shorter windows: smaller rows so the menu still fits between the header and the bar. */
@media (min-width: 1024px) and (max-height: 820px) {
  .cn-quick-nav a { gap: 4px; padding: 8px 2px; }
  .cn-quick-nav .cn-ico { width: 22px; height: 22px; }
  .cn-quick-top { width: 46px; height: 46px; }
}
@media (min-width: 1024px) and (max-height: 660px) {
  .cn-quick { top: 24px; gap: 8px; }
  .cn-quick-nav a { gap: 3px; padding: 6px 2px; }
  .cn-quick-nav .cn-ico { width: 20px; height: 20px; }
  .cn-quick-top { width: 42px; height: 42px; font-size: 11px; }
}
@media (min-width: 1380px) and (max-height: 480px) {
  .cn-quick { display: none; }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .cn-cbar-type::after { animation: none; }
  .cn-cbar-msg, .cn-cbar-msg.is-shown { transition: none; transform: none; }
}
@media print {
  .cn-quick, .cn-cbar { display: none !important; }
  body { padding-bottom: 0 !important; }
}
