:root {
  --wys-sheet-ink: var(--wyl-ink, #102a43);
  --wys-sheet-muted: var(--wyl-muted, #6b7c8f);
  --wys-sheet-line: var(--wyl-line, #d9e0e7);
  --wys-sheet-surface: var(--wyl-surface-raised, #fff);
  --wys-sheet-soft: var(--wyl-surface-soft, #f3f6f5);
  --wys-sheet-accent: var(--wyl-jade, #1d7a63);
}

.wys-app-sheet[hidden] { display: none !important; }
.wys-app-sheet {
  --wys-sheet-drag-y: 0px;
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  align-items: end;
  pointer-events: none;
}
.wys-app-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(11, 24, 37, .48);
  opacity: 0;
  cursor: default;
  transition: opacity .24s ease;
}
.wys-app-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(74dvh, 660px);
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  outline: 0;
  background: var(--wys-sheet-surface);
  color: var(--wys-sheet-ink);
  box-shadow: 0 -18px 54px rgba(11, 24, 37, .2);
  transform: translate3d(0, calc(102% + var(--wys-sheet-drag-y)), 0);
  transition: transform .32s cubic-bezier(.22, .82, .2, 1);
  will-change: transform;
  overscroll-behavior: contain;
}
.wys-app-sheet.is-open { pointer-events: auto; }
.wys-app-sheet.is-closing { pointer-events: none; }
.wys-app-sheet.is-open .wys-app-sheet-backdrop { opacity: 1; }
.wys-app-sheet.is-open .wys-app-sheet-panel { transform: translate3d(0, var(--wys-sheet-drag-y), 0); }
.wys-app-sheet.is-dragging .wys-app-sheet-panel { transition: none; }
.wys-app-sheet.is-dragging .wys-app-sheet-backdrop { transition: none; }
.wys-app-sheet.is-snapping .wys-app-sheet-panel { transition-duration: .38s; transition-timing-function: cubic-bezier(.18, .89, .3, 1.18); }
.wys-app-sheet-drag {
  height: 28px;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: grab;
}
.wys-app-sheet-drag:active { cursor: grabbing; }
.wys-app-sheet-drag > span { width: 36px; height: 4px; border-radius: 999px; background: #c8d0d9; }
.wys-app-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 13px;
}
.wys-app-sheet-heading { min-width: 0; }
.wys-app-sheet-eyebrow { display: block; margin-bottom: 3px; color: var(--wys-sheet-accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.wys-app-sheet-heading h2 { margin: 0; color: var(--wys-sheet-ink); font-size: 21px; line-height: 1.35; letter-spacing: .01em; }
.wys-app-sheet-heading p { margin: 4px 0 0; color: var(--wys-sheet-muted); font-size: 12px; line-height: 1.55; }
.wys-app-sheet-close {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: var(--wys-sheet-soft);
  color: var(--wys-sheet-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.wys-app-sheet-body {
  max-height: calc(min(74dvh, 660px) - 104px);
  overflow: auto;
  padding: 0 18px calc(18px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.wys-app-sheet-form { display: grid; gap: 12px; }
.wys-app-field { display: grid; gap: 6px; }
.wys-app-field > span { color: var(--wys-sheet-muted); font-size: 11px; font-weight: 750; }
.wys-app-field select:not(.wys-app-choice-native) {
  width: 100%;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--wys-sheet-line);
  border-radius: 12px;
  outline: 0;
  background: var(--wys-sheet-soft);
  color: var(--wys-sheet-ink);
  font-size: 14px;
  font-weight: 650;
}
.wys-app-field select:not(.wys-app-choice-native):focus { border-color: var(--wys-sheet-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wys-sheet-accent) 14%, transparent); }
.wys-app-choice-native { display: none !important; }
.wys-app-static-field,
.wys-app-choice-trigger {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--wys-sheet-line);
  border-radius: 12px;
  background: var(--wys-sheet-soft);
  color: var(--wys-sheet-ink);
  text-align: left;
}
.wys-app-static-field strong,
.wys-app-choice-trigger strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.wys-app-static-field small,
.wys-app-choice-trigger small { flex: 0 0 auto; color: var(--wys-sheet-muted); font-size: 10px; font-weight: 700; }
.wys-app-choice { position: relative; }
.wys-app-choice-trigger { cursor: pointer; }
.wys-app-choice-trigger:focus-visible,
.wys-app-choice.is-open .wys-app-choice-trigger { border-color: var(--wys-sheet-accent); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wys-sheet-accent) 14%, transparent); }
.wys-app-choice-menu {
  display: grid;
  gap: 3px;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--wys-sheet-surface);
  opacity: 0;
  transform: translateY(-5px);
  transition: max-height .22s ease, margin .22s ease, padding .22s ease, opacity .18s ease, transform .22s ease, border-color .22s ease;
}
.wys-app-choice-menu[hidden] { display: none; }
.wys-app-choice.is-open .wys-app-choice-menu { max-height: 230px; overflow-y: auto; margin-top: 7px; padding-block: 5px; border-color: var(--wys-sheet-line); opacity: 1; transform: none; }
.wys-app-choice-menu button {
  min-height: 39px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--wys-sheet-ink);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.wys-app-choice-menu button:hover { background: var(--wys-sheet-soft); }
.wys-app-choice-menu button[aria-selected="true"] { background: color-mix(in srgb, var(--wys-sheet-accent) 12%, transparent); color: var(--wys-sheet-accent); }
.wys-app-sheet-actions { display: grid; gap: 7px; margin-top: 2px; }
.wys-app-sheet-actions button {
  min-height: 49px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--wys-sheet-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.wys-app-sheet-actions button:active { transform: scale(.985); }
.wys-app-sheet-actions button:disabled { opacity: .56; cursor: wait; }
.wys-app-sheet-status { min-height: 18px; color: var(--wys-sheet-muted); font-size: 11px; line-height: 1.55; text-align: center; }
body.wys-app-sheet-open { overscroll-behavior: none; }

@media (min-width: 641px) {
  .wys-app-sheet { place-items: center; padding: 24px; }
  .wys-app-sheet-panel { width: min(430px, 100%); max-height: min(680px, calc(100dvh - 48px)); border-radius: 18px; opacity: 0; transform: translate3d(0, 14px, 0) scale(.985); transition: transform .22s ease, opacity .22s ease; }
  .wys-app-sheet.is-open .wys-app-sheet-panel { opacity: 1; transform: none; }
  .wys-app-sheet-drag { display: none; }
  .wys-app-sheet-head { padding: 20px 20px 14px; }
  .wys-app-sheet-body { max-height: calc(100dvh - 170px); padding: 0 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .wys-app-sheet-backdrop,
  .wys-app-sheet-panel,
  .wys-app-sheet-actions button { transition: none !important; }
}
