:root{
  --bg:#0b0708;
  --panel:#ffffff;
  --panel-soft:#f7f7f7;
  --border:#e3e3e3;
  --text:#0b0708;
  --muted:#5b5556;

  --brand:#c92724;
  --brand-dark:#981e1c;
  --danger:#b91f1d;
  --ok:#13824f;

  --shadow: 0 14px 40px rgba(0,0,0,.18);
  --radius: 18px;
  --max: 1120px;

  --mono: ui-monospace, Menlo, Consolas, monospace;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --container-pt:18px;
  --container-pb:26px;
}

*{box-sizing:border-box}
html,body{height:100%}
html{background:#c92724}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    linear-gradient(to bottom, #c92724 0 132px, transparent 132px),
    radial-gradient(900px 380px at 20% -8%, rgba(201,39,36,.18), transparent 60%),
    radial-gradient(860px 420px at 85% -6%, rgba(11,7,8,.3), transparent 65%),
    #f4f2f2;
}
a{color:inherit; text-decoration:none}
code{font-family:var(--mono); font-size:.95em}
.muted{color:var(--muted)}
.hidden{display:none !important}
.quick-btn > span:last-child{
  display:block;
  width:100%;
  text-align:center;
  line-height:1.2;
  text-wrap:balance;
}

.container{max-width:var(--max); margin:0 auto; padding:var(--container-pt) 16px var(--container-pb)}
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.p16{padding:16px}
.p20{padding:20px}

.topbar{
  position:sticky; top:0; z-index:50;
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, #c92724, #b7201e);
  border-bottom: 0;
  box-shadow: 0 10px 28px rgba(116, 17, 15, .18);
}
.topbar-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:8px 16px;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:10px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar-left{display:flex; align-items:center; justify-content:flex-start}
.topbar-center{justify-self:center}
.topbar-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  justify-self:end;
}
.topbar-tools{
  display:flex;
  align-items:center;
  gap:8px;
}
.home-icon-btn{
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.08);
  color:#fff;
  width:34px;
  height:34px;
  border-radius:999px;
  font-size:16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.home-icon-btn:hover{
  background:rgba(255,255,255,.14);
}
.home-bell{
  width:34px;
  height:34px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:rgba(255,255,255,.08);
  position:relative;
  cursor:pointer;
}
.home-badge-count{
  position:absolute;
  top:-7px;
  right:-8px;
  min-width:17px;
  height:17px;
  border-radius:999px;
  background:#e11d48;
  color:#fff;
  font-size:10px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
  border:1px solid rgba(255,255,255,.6);
}
.home-icon-btn[data-unread]:not([data-unread="0"])::after{
  content: attr(data-unread);
  position:absolute;
  top:-7px;
  right:-8px;
  min-width:17px;
  height:17px;
  border-radius:999px;
  background:#e11d48;
  color:#fff;
  font-size:10px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
  border:1px solid rgba(255,255,255,.6);
}
.home-notif-panel{
  position:fixed;
  right:12px;
  top:84px;
  width:min(420px, calc(100vw - 24px));
  max-height:min(70vh, 620px);
  overflow:auto;
  background:#fff;
  border:1px solid #ddd4d5;
  border-radius:14px;
  box-shadow:0 18px 38px rgba(0,0,0,.22);
  z-index:130;
  display:none;
}
.home-notif-panel.show{ display:block; }
.home-notif-item{
  padding:10px 12px;
  border-bottom:1px solid #eee7e8;
}
.home-notif-item:last-child{ border-bottom:none; }
.home-notif-item .small{ font-size:.82rem; color:#6a6062; }
.home-notif-actions{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.home-chip{
  font-size:11px;
  border-radius:999px;
  padding:4px 8px;
  border:1px solid transparent;
}
.home-chip.pending{ background:rgba(184,122,2,.12); border-color:rgba(184,122,2,.35); color:#7a5000; }
.home-chip.accepted{ background:rgba(27,143,88,.12); border-color:rgba(27,143,88,.35); color:#0f6a3f; }
.home-chip.rejected{ background:rgba(185,31,29,.12); border-color:rgba(185,31,29,.35); color:#8b1816; }
.home-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.52);
  z-index:140;
  display:none;
  align-items:center;
  justify-content:center;
  padding:14px;
}
.home-overlay.show{display:flex;}
.home-modal-card{
  width:min(560px, 96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #ddd;
  border-radius:14px;
  box-shadow:0 18px 38px rgba(0,0,0,.24);
  padding:14px;
}
.profile-photo-row{
  align-items:center !important;
}
.profile-photo-trigger{
  width:96px;
  height:96px;
  border:none;
  background:transparent;
  padding:4px;
  border-radius:999px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.profile-photo-trigger:hover{
  background:rgba(201,39,36,.08);
}
.profile-photo-trigger img{
  width:88px !important;
  height:88px !important;
  display:block;
}
.profile-form-actions{
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.profile-form-actions .btn{
  min-width:148px;
  justify-content:center;
}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
  transform:none !important;
}
.profile-crop-card{
  width:min(520px, 96vw);
}
.profile-crop-stage{
  width:min(100%, 320px);
  aspect-ratio:1 / 1;
  margin:14px auto 0;
  border-radius:28px;
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(45deg, #f0ebec 25%, transparent 25%, transparent 75%, #f0ebec 75%, #f0ebec),
    linear-gradient(45deg, #f0ebec 25%, transparent 25%, transparent 75%, #f0ebec 75%, #f0ebec);
  background-size:24px 24px;
  background-position:0 0, 12px 12px;
  touch-action:none;
  user-select:none;
}
.profile-crop-image{
  position:absolute;
  top:0;
  left:0;
  max-width:none;
  will-change:transform;
  transform-origin:top left;
  cursor:grab;
}
.profile-crop-stage.dragging .profile-crop-image{
  cursor:grabbing;
}
.profile-crop-mask{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.profile-crop-mask::before{
  content:"";
  position:absolute;
  inset:16px;
  border-radius:999px;
  box-shadow:0 0 0 999px rgba(11,7,8,.34);
  border:2px solid rgba(255,255,255,.95);
}
.profile-crop-zoom{
  width:100%;
  margin-top:8px;
  accent-color:var(--brand);
}
.profile-crop-zoom::-webkit-slider-thumb{
  cursor:pointer;
}
.profile-crop-zoom::-moz-range-thumb{
  cursor:pointer;
}
.shared-back-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  min-width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--card2, rgba(255,255,255,.08));
  color:var(--text);
  text-decoration:none;
  font-weight:900;
}
.pwa-guide-card{
  max-width:560px;
}
.pwa-steps{
  margin:6px 0 0;
  padding-left:20px;
  color:#2b2224;
}
.pwa-steps li{
  margin:4px 0;
}
.pwa-ios-hint{
  margin-top:10px;
  border:1px solid #ebdfd9;
  border-radius:12px;
  padding:10px;
  background:#fff8f4;
}
.pwa-guide-video{
  display:block;
  width:min(100%, 360px);
  aspect-ratio:9 / 16;
  height:auto;
  max-height:68vh;
  margin:0 auto;
  border-radius:12px;
  border:1px solid #ded8d9;
  background:#000;
  object-fit:contain;
}
body.pwa-locked .topbar,
body.pwa-locked .container,
body.pwa-locked #homeNotifPanel{
  pointer-events:none;
  user-select:none;
}
body.pwa-locked #pwaTutorialOverlay{
  pointer-events:auto;
}
.friend-result{
  border:1px solid #e8e0e1;
  border-radius:12px;
  padding:10px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
  background:#fff;
}
.friend-result .meta{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.friend-result .avatar{
  width:42px;
  height:42px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid #ddd;
}
.friend-result .actions{
  width:100%;
  display:flex;
  justify-content:flex-start;
  gap:8px;
}
.chat-overlay{
  position:fixed;
  inset:0;
  z-index:150;
  background:#f4f2f2;
  display:none;
  height:var(--chat-vh, 100dvh);
}
.chat-overlay.show{display:block;}
.chat-shell{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:340px 1fr;
}
.chat-left{
  border-right:1px solid #ddd3d4;
  background:#fff;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.chat-header{
  padding:10px;
  border-bottom:1px solid #eee3e4;
  display:flex;
  align-items:center;
  gap:10px;
}
.chat-friends-strip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:10px;
  border-bottom:1px solid #eee3e4;
}
.chat-friend-pill{
  min-width:72px;
  max-width:86px;
  text-align:center;
  cursor:pointer;
}
.chat-friend-pill img{
  width:54px;
  height:54px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid #ddd;
}
.chat-friend-pill div{
  margin-top:4px;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chat-threads-list{
  overflow:auto;
  min-height:0;
}
.chat-thread-item{
  padding:10px;
  border-bottom:1px solid #f0e8e9;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}
.chat-thread-item:hover{background:#fcf8f8;}
.chat-thread-item img{
  width:44px;
  height:44px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid #ddd;
}
.chat-thread-item .preview{
  color:#6f6466;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chat-right{
  display:flex;
  flex-direction:column;
  min-height:0;
  background:#faf8f8;
}
.chat-conversation-header{
  padding:12px;
  border-bottom:1px solid #e7ddde;
  background:#fff;
  font-weight:800;
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  gap:8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.chat-peer-head{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.chat-peer-head img{
  width:30px;
  height:30px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid #ddd;
}
#chatConversationTitle{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chat-back-list{
  display:none;
}
.chat-messages{
  flex:1;
  overflow:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.msg-bubble{
  max-width:min(78%, 620px);
  padding:8px 10px;
  border-radius:12px;
  line-height:1.35;
  font-size:14px;
}
.msg-bubble.me{
  align-self:flex-end;
  background:#c92724;
  color:#fff;
  box-shadow: 0 8px 18px rgba(201,39,36,.25);
}
.msg-bubble.them{
  align-self:flex-start;
  background:#fff;
  border:1px solid #eadedf;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}
.chat-compose{
  display:flex;
  gap:8px;
  padding:10px;
  border-top:1px solid #e7ddde;
  background:#fff;
  position:sticky;
  bottom:0;
  z-index:2;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.unread-dot{
  display:inline-flex;
  min-width:18px;
  height:18px;
  border-radius:999px;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:900;
  color:#fff;
  background:#e11d48;
  padding:0 5px;
}
@media (max-width: 900px){
  .chat-shell{
    height:100%;
    position:relative;
    overflow:hidden;
    display:block;
    background:#fff;
  }
  .chat-left{
    border-right:none;
    position:absolute;
    inset:0;
    height:100%;
    max-height:none;
    transition: transform .28s ease, opacity .22s ease;
    will-change: transform;
    transform: translateX(0);
    opacity:1;
    z-index:1;
  }
  .chat-right{
    position:absolute;
    inset:0;
    height:100%;
    transition: transform .28s ease, opacity .22s ease;
    will-change: transform;
    transform: translateX(100%);
    opacity:1;
    z-index:2;
  }
  .chat-overlay.mobile-list .chat-left{
    transform: translateX(0);
    opacity:1;
    pointer-events:auto;
  }
  .chat-overlay.mobile-list .chat-right{
    transform: translateX(100%);
    opacity:1;
    pointer-events:none;
  }
  .chat-overlay.mobile-conv .chat-left{
    transform: translateX(-24%);
    opacity:.35;
    pointer-events:none;
  }
  .chat-overlay.mobile-conv .chat-right{
    transform: translateX(0);
    opacity:1;
    pointer-events:auto;
  }
  .chat-back-list{
    display:inline-flex;
  }
  .chat-conversation-header{
    padding:10px;
  }
  .chat-messages{
    padding:10px;
  }
  .msg-bubble{
    max-width:86%;
    font-size:13px;
  }
}
.logo-img{
  width:40px;
  height:40px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.2);
}
.brand .title{font-weight:900; letter-spacing:.2px; color:#fff}
.brand .sub{font-size:.86rem; color:#d8d8d8; margin-top:2px}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.grow{flex:1 1 auto}

.btn{
  border:1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color:#fff;
  font-weight:900;
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  box-shadow: 0 8px 24px rgba(201,39,36,.25);
}
.btn:active{transform: translateY(1px)}
.btn.ghost{
  background: #fff;
  color: var(--text);
  border-color:#cfcfcf;
  box-shadow:none;
}
.btn.danger{
  background: linear-gradient(135deg, var(--danger), #801110);
  color:#fff;
}
.btn.success{
  background: linear-gradient(135deg, #16a34a, #15803d);
  color:#fff;
}
.btn.small{padding:8px 10px; border-radius:12px; font-weight:800}

.input{
  width:100%;
  padding:12px 12px;
  font-size:16px;
  border-radius:14px;
  border:1px solid #d7d4d5;
  background: #fff;
  color:var(--text);
  outline:none;
}
.input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(201,39,36,.12);
}
.input::placeholder{color: #9b9496}
.label{font-size:.9rem; color:var(--muted); margin:10px 0 6px}

.auth-wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  justify-items:center;
}
.auth-main{
  width:min(520px, 100%);
  margin-inline:auto;
  background: linear-gradient(180deg, #ffffff, #faf8f8);
  text-align:center;
}
.auth-logo{
  display:block;
  width:118px;
  height:118px;
  margin:0 auto 12px;
  object-fit:contain;
  border:none;
  border-radius:0;
  box-shadow:none;
}
.social-list{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:14px;
}
.social-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
}
.social-icon-btn{
  width:58px;
  height:58px;
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
}
.social-icon-btn img{
  width:58px;
  height:58px;
  object-fit:contain;
  display:block;
}
.social-btn{
  width:min(330px, 100%);
  justify-content:center;
}
.auth-mode-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:10px auto 0;
  width:min(360px, 100%);
}
.auth-tab{width:100%}
.auth-tab.active{
  border-color:var(--brand);
  box-shadow: 0 10px 26px rgba(201,39,36,.25);
}
.auth-form-panel{
  margin:12px auto 0;
  border:1px solid #ded8d9;
  border-radius:14px;
  padding:14px;
  background:#fff;
  text-align:left;
  width:min(420px, calc(100% - 4px));
  max-width:420px;
  margin-inline:auto;
}
.auth-actions{
  justify-content:center;
}
.auth-actions .btn{
  flex:1 1 170px;
  max-width:205px;
}
.auth-msg{
  min-height:20px;
  text-align:center;
}

.quick-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  margin:0 0 16px;
}
.gm-embed .app-home{
  margin-bottom:0 !important;
}
.gm-embed html{
  background:#f4f2f2;
}
.gm-embed body{
  background:#f4f2f2;
}
.gm-embed .topbar{
  margin-top:12px;
}
.gm-embed .home-bg{
  min-height:0 !important;
  background:#f4f2f2;
  background-image:none !important;
  padding:12px 14px 16px;
}
.app-home{
  padding:0;
  width:100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: calc(-1 * var(--container-pt));
  margin-bottom: calc(-1 * var(--container-pb));
}
.home-bg{
  width:100vw;
  min-height: calc(100vh - 60px);
  border-radius: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.08) 45%, rgba(0,0,0,.18)),
    url("./fondo.webp") center center / cover no-repeat;
  background-color:#0b0708;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:14px;
}
.quick-actions-overlay{
  width:min(1160px, calc(100% - 24px));
  margin:0;
}
.quick-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  flex:1 1 calc(33.333% - 12px);
  max-width:340px;
  min-width:190px;
  gap:6px;
  min-height:70px;
  padding:10px 14px;
  border-radius:14px;
  background:#fff;
  border:1px solid #dfd6d7;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  font-weight:800;
  font-size:.92rem;
  color:#2c2223;
}
.quick-btn:hover{
  border-color:#c92724;
}
.quick-ico{
  font-size:1.08rem;
  line-height:1;
}

@media (min-width: 901px){
  .gm-embed .topbar{
    margin-top:10px;
  }
  .gm-embed .home-bg{
    min-height:0 !important;
    background-image:none !important;
    padding:12px 18px 18px;
  }
  .gm-embed .quick-actions-overlay{
    width:min(1220px, calc(100% - 32px));
  }
  .gm-embed .quick-btn{
    max-width:none;
  }
  .home-bg{
    min-height: calc(100vh - 60px + 260px);
    background-image:
      linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.08) 45%, rgba(0,0,0,.18)),
      url("./fondoweb.webp");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }
}

@media (min-width: 561px) and (max-width: 900px){
  .gm-embed .topbar{
    margin-top:10px;
  }
  .gm-embed .home-bg{
    padding:10px 12px 14px;
  }
  .gm-embed .quick-actions-overlay{
    width:min(980px, calc(100% - 20px));
  }
  .gm-embed .quick-btn{
    min-width:160px;
    max-width:none;
    min-height:64px;
    font-size:.82rem;
  }
}

@media (max-width: 900px){
  .auth-logo{width:100px; height:100px}
  .gm-embed .topbar{
    margin-top:8px;
  }
  .gm-embed .home-bg{
    min-height:0 !important;
    background-image:none !important;
    padding:10px 10px 12px;
  }
  .home-bg{
    background-image:
      linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.08) 45%, rgba(0,0,0,.18)),
      url("./fondo.webp");
    min-height: calc(100vh - 56px);
    background-size: cover;
    background-position:center center;
    padding:12px;
  }
}
@media (max-width: 560px){
  :root{
    --container-pt:12px;
    --container-pb:20px;
  }
  .container{padding:var(--container-pt) 12px var(--container-pb)}
  .topbar-inner{padding:8px 12px}
  .brand .title{font-size:.9rem}
  .topbar-inner{
    grid-template-columns: auto 1fr auto;
  }
  .topbar-center{
    justify-self:center;
  }
  .topbar-right .badge{
    padding:5px 8px;
    font-size:.72rem;
  }
  .badge{font-size:.76rem}
  .auth-main h2{font-size:1.18rem}
  .auth-actions .btn{flex:1 1 100%}
  .social-btn{width:min(310px, 100%)}
  .gm-embed .container{
    padding-left:0;
    padding-right:0;
  }
  .gm-embed .home-bg{
    padding:8px 6px;
  }
  .gm-embed .quick-btn{
    min-width:0;
  }
  .gm-embed .quick-actions-overlay{
    width:min(100%, calc(100% - 8px));
  }
  .quick-btn{
    flex:1 1 calc(33.333% - 8px);
    min-width:92px;
    min-height:56px;
    font-size:.72rem;
    gap:4px;
  }
  .home-bg{min-height: calc(100vh - 54px);}
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap:14px;
}
.modcard{
  padding:16px;
  min-height:160px;
  display:flex;
  flex-direction:column;
  gap:10px;
  transition: transform .12s ease, border-color .12s ease;
  border:1px solid var(--border);
}
.modcard:hover{transform: translateY(-2px); border-color: rgba(201,39,36,.45)}
.modcard .icon{font-size:1.8rem}
.modcard .t{font-weight:950; font-size:1.06rem}
.modcard .d{color:var(--muted); line-height:1.45}

.burger{
  width:38px; height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}
.drawer-backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  z-index:80;
}
.drawer{
  position:fixed; top:0; left:0;
  width:320px; max-width:85vw;
  height:100%;
  overflow-y:auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
  padding-right:14px;
  padding-bottom:18px;
  padding-left:14px;
  background: rgba(11,7,8,.97);
  border-right:1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform .18s ease;
  z-index:90;
  color:#fff;
}
.drawer .muted{color:#cac7c8}
.drawer.open{transform: translateX(0)}
.drawer-backdrop.open{display:block}
.drawer .dtop{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:6px 4px 10px;
  border-bottom:1px solid rgba(255,255,255,.2);
}
.drawer .nav{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav a{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  color:#fff;
}
.nav a:hover{border-color: rgba(201,39,36,.7)}
.drawer-inline-settings{
  border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  border-radius:14px;
  padding:10px 12px;
  margin-top:-2px;
}
.drawer-inline-settings .label{
  color:#fff;
  margin:8px 0 6px;
  font-size:.92rem;
}
.drawer-inline-settings .input{
  border:1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.08);
  color:#fff;
}
.drawer-inline-settings .input option{
  color:#111;
}
.hr{height:1px; background: var(--border); margin:10px 0}
.badge{
  display:inline-flex;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  color:#fff;
  opacity:.95;
  background: rgba(255,255,255,.06);
}

.menu-settings .label{ margin:10px 0 6px; }
.menu-settings .input{ width:100%; }
.settings-modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: rgba(0,0,0,.65); z-index:120;
}
.settings-modal.show{ display:flex; }
.settings-card{ width:min(520px, 92vw); }

/* Ajuste fino iPhone (notch / Dynamic Island) */
@supports (-webkit-touch-callout: none) {
  .drawer{
    padding-top: calc(env(safe-area-inset-top, 0px) + 26px);
  }
}

