html.cvv-open, html.cvv-open body { overflow: hidden !important; }
#cvv-app, #cvv-app * { box-sizing: border-box; }
#cvv-app {
  position: fixed; inset: 0; z-index: 2147483000; background: #f3f4f6; color: #111827;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex; flex-direction: column; overflow: hidden; -webkit-text-size-adjust: 100%;
}
#cvv-app button, #cvv-app input, #cvv-app textarea { font: inherit; }
.cvv-splash { margin: auto; color: #6b7280; text-align: center; padding: 20px; }

.cvv-head {
  background: #1d4ed8; color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
}
.cvv-head h1 { margin: 0; font-size: 18px; font-weight: 700; flex: 1; color: #fff; line-height: 1.2; }
.cvv-head .cvv-back { background: transparent; border: 0; color: #fff; font-size: 26px; padding: 0 8px 0 0; cursor: pointer; line-height: 1; }
.cvv-main { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; }
.cvv-nav {
  flex: 0 0 auto; display: flex; background: #fff; border-top: 1px solid #e5e7eb;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cvv-nav button {
  flex: 1; background: none; border: 0; padding: 8px 4px 7px; color: #6b7280; font-size: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative;
}
.cvv-nav button span.ico { font-size: 22px; line-height: 1; }
.cvv-nav button.on { color: #1d4ed8; font-weight: 600; }
.cvv-badge { position: absolute; top: 3px; left: calc(50% + 6px); background: #dc2626; color: #fff; border-radius: 10px; font-size: 11px; min-width: 18px; padding: 0 5px; line-height: 18px; }

.cvv-card { background: #fff; border-radius: 14px; padding: 14px; margin: 0 0 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cvv-auth { max-width: 460px; width: 100%; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px 24px; overflow-y: auto; }
.cvv-auth h1 { text-align: center; font-size: 22px; margin: 6px 0 2px; }
.cvv-auth .sub { text-align: center; color: #6b7280; margin: 0 0 16px; }
.cvv-logo { display: block; width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 8px; }
.cvv-tabs { display: flex; background: #e5e7eb; border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.cvv-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; cursor: pointer; color: #374151; }
.cvv-tabs button.on { background: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.1); }

.cvv-field { margin: 0 0 12px; }
.cvv-field label { display: block; font-size: 13px; color: #374151; margin-bottom: 4px; font-weight: 600; }
.cvv-field input[type=text], .cvv-field input[type=email], .cvv-field input[type=password], .cvv-field input[type=tel], .cvv-field input[type=search], .cvv-field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; font-size: 16px; color: #111827;
}
.cvv-field textarea { min-height: 90px; resize: vertical; }
.cvv-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0 0 10px; color: #374151; }
.cvv-check input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }
.cvv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cvv-btn { display: block; width: 100%; padding: 12px 14px; border: 0; border-radius: 10px; background: #1d4ed8; color: #fff; font-weight: 600; cursor: pointer; font-size: 16px; }
.cvv-btn:disabled { opacity: .55; cursor: default; }
.cvv-btn.sec { background: #e5e7eb; color: #111827; }
.cvv-btn.danger { background: #fee2e2; color: #991b1b; }
.cvv-btn.small { width: auto; display: inline-block; padding: 8px 12px; font-size: 14px; }
.cvv-row { display: flex; gap: 8px; margin-top: 8px; }
.cvv-row > * { flex: 1; }

.cvv-msg { padding: 10px 12px; border-radius: 10px; margin: 0 0 12px; font-size: 14px; }
.cvv-msg.err { background: #fee2e2; color: #991b1b; }
.cvv-msg.ok { background: #dcfce7; color: #166534; }
.cvv-msg.info { background: #dbeafe; color: #1e3a8a; }

.cvv-item { display: flex; gap: 10px; cursor: pointer; }
.cvv-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: transparent; }
.cvv-item.unread .cvv-dot { background: #1d4ed8; }
.cvv-item.unread .t { font-weight: 700; }
.cvv-item .t { font-size: 16px; margin: 0 0 2px; }
.cvv-item .d { font-size: 12px; color: #6b7280; margin: 0 0 4px; }
.cvv-item .x { font-size: 14px; color: #4b5563; margin: 0; }
.cvv-empty { text-align: center; color: #6b7280; padding: 40px 16px; }

.cvv-detail h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
.cvv-detail .d { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.cvv-detail .body { font-size: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.cvv-detail .body a { color: #1d4ed8; }
.cvv-like { background: #f3f4f6; border: 0; border-radius: 20px; padding: 8px 14px; cursor: pointer; font-size: 15px; }
.cvv-like.on { background: #fee2e2; color: #b91c1c; }

.cvv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cvv-person { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-align: center; }
.cvv-person .ph { aspect-ratio: 4/5; background: #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #6b7280; font-weight: 700; }
.cvv-person img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvv-person .ph { overflow: hidden; }
.cvv-person .n { font-weight: 700; font-size: 14px; padding: 6px 6px 0; }
.cvv-person .f { font-size: 12px; color: #6b7280; padding: 0 6px 8px; min-height: 18px; }

.cvv-avatar { width: 110px; height: 137px; border-radius: 12px; background: #d1d5db; margin: 0 auto 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 700; color: #6b7280; }
.cvv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cvv-h3 { font-size: 15px; margin: 0 0 8px; }
.cvv-small { font-size: 13px; color: #6b7280; }
.cvv-ol { margin: 6px 0 0 18px; padding: 0; font-size: 14px; }
