/* Khung và bố cục dùng chung — màu sắc, kiểu dáng do từng giao diện tự định nghĩa */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--outer); }

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Trên desktop vẫn hiển thị đúng một cột kích thước điện thoại */
.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 20px 28px;
  background: var(--bg);
  overflow: hidden;
}
.phone > * { position: relative; }

@media (min-width: 500px) {
  body { padding: 24px 0; }
  .phone {
    min-height: calc(100dvh - 48px);
    border-radius: 36px;
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .65);
  }
}

.top { display: flex; justify-content: center; padding: 30px 0 22px; }
.logo { display: block; height: 44px; width: auto; max-width: 70%; }

.intro { text-align: center; margin-bottom: 26px; }
.intro h1 { font-size: 22px; line-height: 1.25; text-wrap: balance; }
.intro p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

#groups { display: flex; flex-direction: column; gap: 16px; flex: 1; }

.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; }
.group-icon svg { width: 22px; height: 22px; }
.group-titles { flex: 1; min-width: 0; }
.group-titles h2 { font-size: 17px; line-height: 1.3; }
.group-titles p { margin-top: 2px; font-size: 13px; color: var(--muted); }

.badge { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

.links { display: flex; flex-direction: column; gap: 10px; }
.link { display: flex; gap: 8px; }
.link-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  transition: transform .12s, filter .12s, background-color .12s;
}
.link-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-label { font-size: 15px; font-weight: 600; }
.link-host { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-go { flex: none; }
.link-go svg { display: block; width: 20px; height: 20px; }

.link-copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform .12s, color .12s, background-color .12s;
}
.link-copy svg { width: 20px; height: 20px; }

.link-main:active, .link-copy:active { transform: scale(.97); }
.link-main:focus-visible, .link-copy:focus-visible { outline: 2px solid var(--focus, #fff); outline-offset: 2px; }

.state { padding: 28px 0; text-align: center; font-size: 14px; color: var(--muted); }

footer { margin-top: 28px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
