#feedback {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  border-radius: 14px;
  padding: 12px 20px;
  background: #262035;
  color: white;
  box-shadow: 0 6px 24px #20142f35;
  max-width: min(90vw, 540px);
}
#feedback.bad {
  background: #7d293d;
}
.workspace-form {
  display: grid;
  gap: 18px;
}
.workspace-form label,
.compact-fields label {
  display: grid;
  gap: 6px;
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 600;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
input:not([type='checkbox']),
textarea {
  width: 100%;
}
.compact-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.compact-fields > * {
  flex: 1;
  min-width: 7rem;
}
.offer {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.offer + .offer {
  margin-top: 9px;
}
.offer label:has(input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.offer input[type='checkbox'] {
  accent-color: var(--plum);
  width: 18px;
  height: 18px;
}
.offer .compact-fields {
  margin-top: 12px;
}
.stack {
  display: grid;
  gap: 12px;
}
.panel details {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.card-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.card-line:last-child {
  border-bottom: 0;
}
.panel .minor {
  font-size: 0.9rem;
  color: var(--secondary);
}
.keyline {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.handset {
  background: #272335;
  border-radius: 22px;
  padding: 18px;
  color: #f8f2ff;
  max-width: 370px;
  margin: 12px 0;
}
.handset p {
  color: #d6c6df;
  overflow-wrap: anywhere;
}
.mail-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf8fc;
}
.mail-preview img {
  max-width: 110px;
  max-height: 42px;
}
.navmark {
  width: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 1.2rem;
  color: #c7b1da;
}
#issue-dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  width: min(520px, 94vw);
  max-height: 85vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #17132277;
}
.table-wrap td .subline,
.subline {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 3px;
}
.open-issue {
  border: 0;
  background: transparent;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--plum-deep);
  text-align: left;
}
.qr {
  width: 132px;
  height: 132px;
}
.brand-image {
  object-fit: contain;
}
@media (max-width: 650px) {
  .compact-fields {
    gap: 7px;
  }
  .main {
    padding-top: 22px;
  }
  .page-head {
    margin-bottom: 16px;
  }
  .actions .btn {
    flex-grow: 1;
  }
  .auth-art .brand {
    margin-bottom: 12px;
  }
}

.panel-head > .help[data-tip]:last-child::after {
  right: 0;
  left: auto;
  transform: translateY(3px);
}
.panel-head > .help[data-tip]:last-child:is(:hover, :focus, [aria-expanded='true'])::after {
  transform: translateY(0);
}

#feedback {
  width: max-content;
}
.stack {
  align-content: start;
}
#issue-form > .stack {
  align-self: start;
  gap: 18px;
}
#quote h2 {
  margin-top: 6px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.panel > details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
}
.panel > details + details {
  margin-top: 10px;
}
.panel > details summary {
  padding: 13px 0;
  color: var(--ink);
  line-height: 1.65;
}
.panel > details[open] {
  background: var(--surface-low);
}
.panel > details[open] > p {
  margin: 0 0 12px;
  color: var(--secondary);
}
.panel > details[open] > .table-wrap {
  margin-top: 10px;
}
.panel > details summary:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}
@media (min-width: 821px) {
  #issue-form > .stack {
    position: sticky;
    top: 18px;
  }
}
@media (max-width: 650px) {
  .main > .metrics > .metric:nth-child(3):last-child {
    grid-column: 1 / -1;
  }
  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding-block: 12px 10px;
  }
  .sidebar .account {
    grid-area: 1 / 2;
    justify-self: end;
    text-align: right;
    font-size: 0.86rem;
  }
  .sidebar .account .avatar {
    display: none;
  }
  .sidebar .account small {
    line-height: 1.15;
    font-size: 0.76rem;
  }
  .sidebar nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 2px;
    overflow: visible;
    padding: 0;
  }
  .sidebar nav a {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 0.87rem;
    line-height: 1.32;
  }
  .sidebar .navmark {
    display: none;
  }
}

.email-status { margin: -10px 0 0; min-height: 1.3em; font-size: .88rem; color: var(--good); }
.email-status.occupied { color: var(--bad); }
input[aria-invalid="true"] { border-color: var(--bad); }
.brand-layout { align-items: start; }
.workspace-form .brand-toggle { display: flex; align-items: center; gap: .75rem; color: var(--ink); }
.brand-toggle input { width: 20px; height: 20px; accent-color: var(--plum); }
.brand-toggle small { display: block; font-weight: normal; color: var(--secondary); }
.brand-layout .mail-preview img, .brand-layout .mail-preview canvas { display: block; max-width: 90px; max-height: 55px; object-fit: contain; }
.brand-layout [hidden] { display: none !important; }
.profile-studio { min-width: 0; display: grid; gap: 14px; }
.studio-head, .device-header, .device-status, .point-current, .device-profile-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.studio-head h2, .profile-studio p { margin: 0; }
.demo-label { color: var(--plum-deep); background: var(--lilac); padding: 4px 10px; border-radius: 30px; font-size: .8rem; }
.app-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 4px; background: var(--surface-low); border: 1px solid var(--line); border-radius: 14px; }
.app-picker button { background: transparent; color: var(--secondary); border: 0; border-radius: 10px; padding: 9px 3px; font: inherit; font-weight: 650; cursor: pointer; }
.app-picker button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.preview-stage { padding: clamp(12px,2.2vw,28px); border-radius: 18px; background: radial-gradient(ellipse at 48% 20%,#fff 0%,#f1ecf5 62%,#e4dce9 100%); }
.device-shell { --screen:#0b1413; --tile:#172925; --copy:#f1faf3; --hint:#a5c2b5; --accent:#7ae4ab; --tint:#244a38;
 position: relative; margin: auto; width: min(100%,328px); padding: 10px clamp(13px,3%,22px) 8px; border: 5px solid #252631; border-radius: 36px;
 background: var(--screen); color: var(--copy); box-shadow: 0 14px 26px #31273926,inset 0 0 0 1px #ffffff18;
 }
.device-shell[data-phone="Happ"] { --screen:#f5f2fb; --tile:#e5ddf3; --copy:#35254c; --hint:#5d506f; --accent:#5d3b88; --tint:#dfd3f0; }
.device-shell[data-phone="v2rayTun"] { --screen:#10121b; --tile:#1c2332; --copy:#f4f6ff; --hint:#b6c4df; --accent:#88b9ff; --tint:#244266; }
.device-status { font: 650 11px/1.2 system-ui,sans-serif; padding: 3px 4px 13px; }
.device-status i { border-radius: 10px; background: #07090c; width: 60px; height: 15px; }
.device-header b { font-size: 1.16rem; }
.device-header > span, .device-connect small, .point-current small, #site-preview { color: var(--hint); font-size: .72rem; }
.device-connect { display: grid; justify-items: center; gap: 2px; padding: 18px 0 14px; }
.demo-power { display: grid; place-items: center; width: 67px; height: 67px; margin-bottom: 6px; border-radius: 50%; border: 1px solid var(--accent);
 color: var(--accent); background: var(--tint); box-shadow: 0 0 0 5px var(--screen),0 0 0 6px var(--tint); cursor: pointer; }
.demo-power span { font: 38px/1 system-ui,sans-serif; }
.is-connected .demo-power { color: var(--screen); background: var(--accent); }
[data-phone="Happ"] .demo-power { width: 75px; height: 75px; box-shadow: 0 0 0 5px #f4effb,0 0 0 7px #d5c6e7,0 0 0 11px #e9e1f3; }
[data-phone="v2rayTun"] .device-profile { background: #1b4e9a; --hint: #d3e2ff; }
.point-current, .point-list button { width: 100%; text-align: left; cursor: pointer; border: 0; font: inherit; color: var(--copy); background: var(--tile); }
.point-current { border-radius: 14px; padding: 9px 13px; }
.point-current small, .point-current b { display: block; }
.point-current b { margin-top: 2px; font-size: .91rem; }
.point-current i { color: var(--accent); font-style: normal; }
.point-list { margin-top: 4px; max-height: 150px; overflow: auto; border-radius: 12px; }
.point-list button { padding: 8px 13px; display: block; font-size: .85rem; }
.point-list button[aria-pressed="true"] { background: var(--tint); font-weight: 700; }
.device-profile { margin-bottom: 8px; border-radius: 14px; padding: 11px 13px; background: var(--tile); overflow-wrap: anywhere; }
.device-profile-title { justify-content: flex-start; }
.device-profile-title strong { font-size: .9rem; }
.profile-glyph { display: grid; place-items: center; border-radius: 7px; color: var(--screen); background: var(--accent); font: 750 12px/1 system-ui; width: 21px; height: 21px; flex: none; }
.device-profile #annotation-preview { margin: 8px 0; font: 400 .79rem/1.48 system-ui,sans-serif; }
[data-phone="Happ"] .device-profile { color: #faf6ff; background: #312e40; --hint: #d3cadf; }
[data-phone="Happ"] .profile-glyph { color: #33293e; background: #d6c6eb; }
.home-bar { width: 62px; height: 3px; border-radius: 4px; margin: 13px auto 0; background: var(--hint); }
.profile-studio .wire-text { margin-top: 10px; overflow-wrap: anywhere; font: .83rem/1.5 ui-monospace,monospace; }
@media (min-width:1000px) { .profile-studio { position: sticky; top: 16px; } }

.route-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.route-strip button { border: 1px solid var(--tint); background: transparent; color: var(--hint); border-radius: 20px; font: 600 .68rem/1.2 system-ui,sans-serif; padding: 6px 9px; cursor: pointer; }
.route-strip [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.device-shell #session-time { display: none; }
[data-phone="v2rayTun"] .device-caption { display: none; }
[data-phone="v2rayTun"] #session-time { display: block; color: var(--hint); font: .78rem/1.5 ui-monospace,monospace; }
[data-phone="v2rayTun"] .device-connect { grid-template-columns: 1fr auto; justify-items: start; padding: 14px; margin: 10px 0; border-radius: 15px; background: var(--tile); }
[data-phone="v2rayTun"] .demo-power { grid-column: 2; grid-row: 1 / 3; width: 43px; height: 43px; margin: 0; border-radius: 13px; box-shadow: none; }
[data-phone="v2rayTun"] .demo-power span { font-size: 24px; }
.preview-jump { display:none; }
@media (max-width: 999px) {
  .preview-jump { display: inline-flex; border: 0; background: transparent; color: var(--plum-deep); text-decoration: underline; font-family: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
}

.annotation-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; }
.text-action { color: var(--plum-deep); text-decoration: underline; text-underline-offset: .15em; font: inherit; font-size: .83rem; padding: 3px 0; border: 0; background: transparent; cursor: pointer; }
