/* CONCEPT ONLY (removed at launch): the "Try a look" panel. */
.opt-open {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70;
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 12px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: 700 .9375rem/1 var(--font-body); cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.opt-dots { display: inline-flex; }
.opt-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); margin-left: -5px; }
.opt-dots i:first-child { margin-left: 0; background: #2F4A3A; }
.opt-dots i:nth-child(2) { background: #A3305B; }
.opt-dots i:nth-child(3) { background: #C9A57B; }
@media (max-width: 899px) {
  .opt-open { bottom: calc(86px + env(safe-area-inset-bottom)); left: auto; right: 12px; width: 48px; height: 48px; min-height: 0; padding: 0; justify-content: center; }
  .opt-open > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.opt-panel {
  position: fixed; left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 71;
  width: min(380px, calc(100vw - 32px)); max-height: min(78vh, 720px);
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .45);
  font-family: var(--font-body);
}
.opt-panel[hidden] { display: none; }
@media (max-width: 899px) { .opt-panel { left: 12px; right: 12px; width: auto; bottom: calc(142px + env(safe-area-inset-bottom)); max-height: 68vh; } }
.opt-head { display: flex; gap: 12px; justify-content: space-between; align-items: start; padding: 18px 18px 10px; border-bottom: 1px solid var(--line); }
.opt-head h2 { font-size: 1.35rem; }
.opt-head p { margin: 4px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--ink-soft); }
.opt-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.opt-body { overflow-y: auto; padding: 6px 18px 12px; overscroll-behavior: contain; }
.opt-group { border: 0; margin: 0; padding: 12px 0 4px; }
.opt-group legend, .opt-label { display: block; padding: 0; margin-bottom: 8px; font-size: .8125rem; font-weight: 800; color: var(--ink-soft); }
.opt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-row-swatch { display: grid; grid-template-columns: 1fr 1fr; }
.opt-choice { position: relative; display: block; }
.opt-choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt-face { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 12px; border: 1.5px solid var(--line); font-size: .875rem; font-weight: 700; line-height: 1.2; transition: border-color .15s, background-color .15s; }
.opt-choice input:checked + .opt-face { border-color: var(--ink); background: var(--bg-alt); }
.opt-choice input:focus-visible + .opt-face { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt-sw { display: inline-flex; flex: none; }
.opt-sw i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); margin-left: -5px; }
.opt-sw i:first-child { margin-left: 0; }
.opt-body textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 500 .875rem/1.45 var(--font-body); resize: vertical; }
.opt-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.opt-copy, .opt-reset { min-height: 42px; padding: 0 16px; border-radius: 999px; font: 700 .875rem var(--font-body); cursor: pointer; }
.opt-copy { border: 0; background: var(--accent); color: var(--on-accent); }
.opt-reset { border: 1.5px solid var(--line); background: transparent; color: var(--ink); }
.opt-msg { flex-basis: 100%; margin: 0; font-size: .8125rem; color: var(--ink-soft); white-space: pre-wrap; }
.opt-msg:empty { display: none; }

.opt-hint {
  position: fixed; left: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 70;
  max-width: 220px; padding: 10px 14px; border-radius: 14px 14px 14px 4px;
  background: #FFF4C9; color: #3B3320; font: 700 .8125rem/1.35 var(--font-body);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none;
}
.opt-hint.is-on { opacity: 1; transform: none; }
@media (max-width: 899px) { .opt-hint { left: auto; right: 12px; bottom: calc(142px + env(safe-area-inset-bottom)); border-radius: 14px 14px 4px 14px; } }

/* Big screens: a slim tab on the left edge, out of the way of the page */
@media (min-width: 900px) {
  .opt-open {
    left: 0; top: 50%; bottom: auto; min-height: 0; padding: 16px 10px 14px;
    flex-direction: column; gap: 10px; border-radius: 0 14px 14px 0;
    transform: translateY(-50%);
  }
  .opt-open > span:last-child { writing-mode: vertical-rl; transform: rotate(180deg); }
  .opt-open .opt-dots { flex-direction: column; }
  .opt-open .opt-dots i { margin: -5px 0 0; }
  .opt-open .opt-dots i:first-child { margin-top: 0; }
  .opt-panel { left: 60px; top: 50%; bottom: auto; transform: translateY(-50%); }
  .opt-hint { left: 60px; top: 50%; bottom: auto; transform: translateY(-50%) translateX(-6px); border-radius: 4px 14px 14px 14px; }
  .opt-hint.is-on { transform: translateY(-50%); }
}
