/* Shared native-dialog surface for mobile navigation and applications. */
body.ic-sheet-open {
  position: fixed; top: var(--ic-locked-top); left: 0; right: 0;
  width: 100%; overflow: hidden; padding-right: var(--ic-scrollbar-gap, 0px);
}
.ic-sheet::backdrop { background: #242331aa; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ic-mobile-menu { display: none; }
.ic-sheet-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; flex: 0 0 auto; z-index: 2;
  padding: 24px 38px 18px; border-bottom: 1px solid var(--ic-line); background: #fff;
}
.ic-sheet .ic-sheet-header h2 { margin: 0; }
.ic-sheet .ic-sheet-header .ic-dialog-close {
  position: static; display: flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  padding: 0; border: 0; border-radius: 50%; background: #f4f0f7; cursor: pointer;
}
.ic-sheet .ic-sheet-header .ic-dialog-close .ic-icon { width: 17px; height: 17px; }
.ic-sheet-handle { display: none; }
.ic-sheet-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ic-application.ic-sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
.ic-application.ic-sheet > .ic-sheet-content { flex: 1 1 auto; }
/* The action bar is outside the scrolling content and fills the dialog's bottom edge. */
.ic-application.ic-sheet > .ic-form-actions {
  position: relative; flex: 0 0 auto; z-index: 2;
  margin: 0; padding: 18px 38px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ic-line); background: #fff;
  box-shadow: 0 -5px 16px #372c4e0a;
}
.ic-application.ic-sheet > .ic-form-actions[hidden] { display: none; }

@keyframes ic-sheet-backdrop-in { from { background-color: #24233100; backdrop-filter: blur(0); } }
@keyframes ic-sheet-backdrop-out { to { background-color: #24233100; backdrop-filter: blur(0); } }

@media (max-width: 900px) {
  .ic-sheet[open] {
    display: flex; flex-direction: column; position: fixed;
    inset: auto 0 var(--ic-sheet-viewport-bottom, 0px); margin: 0;
    width: 100%; max-width: none;
    max-height: calc(var(--ic-sheet-viewport-height, 100dvh) - max(12px, env(safe-area-inset-top)));
    padding: 0; border: 1px solid #ffffffad; border-bottom: 0;
    border-radius: 26px 26px 0 0; overflow: hidden; color: var(--ic-ink);
    background: linear-gradient(135deg, #fffffff5, #f4eff8ed 65%, #faf8f2f2);
    backdrop-filter: blur(26px) saturate(1.15); -webkit-backdrop-filter: blur(26px) saturate(1.15);
    box-shadow: 0 -18px 70px #3d315a26;
  }
  .ic-sheet.ic-application[open] {
    --ic-application-top-gap: clamp(72px, calc(var(--ic-sheet-viewport-height, 100dvh) * .14), 136px);
    height: calc(var(--ic-sheet-viewport-height, 100dvh) - var(--ic-application-top-gap));
    max-height: calc(var(--ic-sheet-viewport-height, 100dvh) - var(--ic-application-top-gap));
    background: linear-gradient(150deg, #fcfbff, #f4f0f7 60%, #fcf8f2);
  }
  .ic-sheet::backdrop { background: #24233180; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
  .ic-sheet.is-opening::backdrop { animation: ic-sheet-backdrop-in 300ms ease-out; }
  .ic-sheet.is-closing::backdrop { animation: ic-sheet-backdrop-out 240ms ease-in forwards; }
  .ic-sheet .ic-sheet-header {
    min-height: 94px; padding: 28px 24px 16px;
    background: linear-gradient(115deg, #ffffffed, #f4eff8ed); border-bottom-color: #ded8e7;
  }
  .ic-sheet .ic-sheet-header h2 { font-size: 26px; line-height: 1.2; padding-right: 8px; }
  .ic-sheet-handle {
    display: block; position: absolute; width: 40px; height: 4px; top: 10px; left: calc(50% - 20px);
    border-radius: 4px; background: #aaa0ba;
  }
  .ic-menu-logo img { display: block; width: 84px; height: 47px; object-fit: contain; }
  .ic-sheet .ic-sheet-content { padding: 18px 24px max(24px, env(safe-area-inset-bottom)); }
  .ic-application.ic-sheet > .ic-form-actions { padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .ic-mobile-menu .ic-main-nav {
    display: flex; flex-direction: column; position: static; gap: 0;
    padding: 0; max-height: none; overflow: visible; background: none; backdrop-filter: none;
    -webkit-backdrop-filter: none; box-shadow: none; align-items: stretch;
  }
  .ic-mobile-menu .ic-main-nav > a {
    display: flex; align-items: center; min-height: 58px; padding: 15px 0;
    border-bottom: 1px solid #ded8e7; font-size: 19px; text-transform: none;
  }
  .ic-mobile-menu .ic-main-nav > a[aria-current] { color: var(--ic-purple-dark); text-underline-offset: 6px; }
  .ic-mobile-menu .ic-socials { gap: 14px; margin: 22px 0 0; }
  .ic-mobile-menu .ic-socials a { width: 44px; height: 44px; border: 1px solid #ded8e7; border-radius: 50%; background: #ffffff80; }
}
@media (max-width: 380px) {
  .ic-sheet .ic-sheet-header { padding-inline: 20px; }
  .ic-sheet .ic-sheet-content { padding-inline: 20px; }
  .ic-application.ic-sheet > .ic-form-actions { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ic-sheet.is-opening::backdrop, .ic-sheet.is-closing::backdrop { animation: none; }
}
