/* ORVELLE · the fortune-cookie consent panel, stage 2: the panel, the static plate (baked sprites), the statuses, the buttons, the phone sheet. Sizes are custom properties; each layout retunes only those. */
.fc { --w: 452px; --stage: 184px; --pad: 22px;
  position: fixed; right: 24px; bottom: 24px; z-index: 50; width: var(--w); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain;
  display: none; flex-direction: column; gap: 0; padding: var(--pad) var(--pad) 16px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(59, 42, 32, .35), 0 8px 24px rgba(59, 42, 32, .1);
  scrollbar-width: thin; }
.js .fc { display: flex; }
.fc[data-state="closed"] { opacity: 0; pointer-events: none; }
.fc-head { position: relative; padding-right: 44px; }
.fc-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.fc-eyebrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fc h2 { font: 600 32px/1 var(--serif); letter-spacing: -0.01em; }
#fc-desc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.fc-x { position: absolute; right: -8px; top: -8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.fc-x:hover { background: rgba(28, 25, 23, .06); color: var(--ink); }
.fc-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* stage: the canvas draws the plate and cookies; the buttons are a 4-column grid over it and set where the cookies sit */
.fc-stage { position: relative; height: var(--stage); margin: 14px calc(var(--pad) * -.5) 0; flex: none; }
.fc-plate { display: none; position: absolute; left: 4%; right: 4%; top: 30%; height: 44%; border-radius: 40px / 30px;
  background: radial-gradient(120% 140% at 50% 30%, #FBF8F2 0%, #F1ECE2 60%, #E2D9CB 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .9), inset 0 -6px 14px rgba(120, 95, 70, .12), 0 14px 26px -12px rgba(80, 55, 35, .35); }
.fc-cookies { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0 6px; }
.fc-cookies li { display: flex; min-width: 0; contain: size layout style; }   /* status text changes re-lay only this column */
.fc [data-live] { contain: strict; }
.fc-cookie { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  padding: 0 2px 6px; border: 0; background: transparent; border-radius: 16px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.fc-cookie:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.fc-cookie::after { content: ''; position: absolute; inset: 4px; border-radius: 14px; background: rgba(161, 98, 7, .06); opacity: 0; transition: opacity .2s; pointer-events: none; }
.fc-cookie:hover::after { opacity: .7; }
.fc-name .short { display: none; }
.fc-name { font: 600 12.5px/1.2 var(--sans); color: var(--ink); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fc-status { display: inline-flex; align-items: center; gap: 5px; font: 600 10px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.fc-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.fc-cookie[data-status="on"] .fc-status { color: #3F6212; }
.fc-cookie[data-status="on"] .fc-status::before, .fc-cookie[data-status="locked"] .fc-status::before { background: #65A30D; }
.fc-cookie[data-status="locked"] .fc-status { color: var(--gold); }
.fc-cookie[data-status="off"] .fc-status { color: var(--red); }
.fc-cookie[data-status="off"] .fc-status::before { background: var(--red); }

/* static sprites: the plate itself until stage 4 draws it in 3D (the cookie art is the same studio render) */
.fc-sprite { display: none; position: absolute; left: 50%; top: 14%; width: 118%; max-width: 150px; aspect-ratio: 26 / 18; transform: translateX(-50%); pointer-events: none; }
.fc-sprite img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .45s var(--ease); }
.fc-sprite [data-open] { opacity: 0; }
.fc-cookie.cracked .fc-sprite [data-open] { opacity: 1; }
.fc-cookie.cracked .fc-sprite [data-whole] { opacity: 0; }
.fc.static .fc-sprite, .fc.static .fc-plate { display: block; }

/* actions: reject and accept carry equal weight (same size, same style) */
.fc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; flex: none; }
.fc-btn { min-height: 46px; padding: 0 12px; border-radius: 999px; font: 600 13px/1.1 var(--sans); transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.fc-btn { border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); }
.fc-btn:hover { background: var(--ink); color: var(--paper); }
.fc-policy { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.fc-policy a { color: var(--ink-2); text-underline-offset: 2px; display: inline-block; padding: 15px 4px; margin: -15px -4px; min-width: 44px; }

/* ---------------------------------------------------------- layouts */
@media (min-width: 1800px) { .fc { --w: 500px; --stage: 220px; } }
@media (max-height: 760px) and (min-width: 641px) { .fc { --stage: 170px; } .fc h2 { font-size: 28px; } #fc-desc { font-size: 13px; } }
/* phone: a bottom sheet, cookies in a row */
@media (max-width: 640px) {
  .fc { --w: 100%; --stage: 148px; --pad: 16px; right: 0; left: 0; bottom: 0; border-radius: 22px 22px 0 0; border-bottom: 0;
    max-height: min(86dvh, 640px); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .fc h2 { font-size: 26px; }
  #fc-desc { font-size: 12.5px; }
  #fc-desc .more { display: none; }
  .fc-stage { margin-top: 8px; }
  .fc-name { font-size: 11px; }
  .fc-status { font-size: 9px; letter-spacing: .06em; }
  .fc-actions { margin-top: 10px; }
  .fc-btn { font-size: 12.5px; }
  .fc-policy { margin-top: 8px; }
}
@media (max-width: 420px) { .fc-name .short { display: inline; } .fc-name .full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@media (max-width: 360px) { .fc-name { font-size: 10px; } .fc-status { font-size: 8.5px; } .fc-btn { font-size: 12px; padding: 0 8px; } }
/* phones on their side and short tablets: stage left, copy and buttons right */
@media (max-height: 500px) and (min-width: 641px) {
  .fc { --w: min(760px, calc(100vw - 32px)); --stage: 150px; right: 16px; bottom: 12px; max-height: calc(100dvh - 24px); display: grid;
    grid-template-columns: 1.05fr 1fr; grid-template-areas: "head head" "stage slip" "stage actions" "policy policy"; column-gap: 16px; padding: 14px 16px 10px; }
  .fc-head { grid-area: head; } .fc-stage { grid-area: stage; margin: 6px 0 0; }
  .fc-actions { grid-area: actions; align-self: end; margin-top: 8px; } .fc-policy { grid-area: policy; margin-top: 6px; }
  .fc h2 { font-size: 24px; } #fc-desc { font-size: 12px; margin-top: 4px; } .fc-eyebrow { margin-bottom: 6px; }
  .fc-btn { min-height: 44px; }
  .js .fc[data-state] { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .fc-sprite img { transition: opacity .3s linear !important; } }
