:root{
  --bg:#080b1a;
  --bg2:#10142a;
  --panel:#141a34;
  --panel2:#1a2141;
  --text:#f7f8ff;
  --muted:#aeb6d0;
  --cyan:#35c7ee;
  --violet:#7652d6;
  --violet2:#4f3da7;
  --yellow:#ffd34f;
  --gold:#ffb52f;
  --danger:#ff6473;
  --ok:#4bd98f;
  --line:#2f3b68;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{background:var(--bg)}
body{
  padding:16px;
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Yu Gothic",sans-serif;
  background:
    radial-gradient(circle at 18% -8%, rgba(118,82,214,.28), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(53,199,238,.15), transparent 30%),
    linear-gradient(180deg,#0b1023 0%,#080b1a 100%);
}

.shell{max-width:760px;margin:0 auto}

.card{
  background:linear-gradient(180deg,rgba(20,26,52,.97),rgba(14,20,41,.97));
  border:1px solid rgba(94,112,178,.42);
  border-radius:28px;
  padding:26px;
  margin-bottom:18px;
  box-shadow:
    0 22px 60px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.hero{
  text-align:center;
  padding:38px 28px 30px;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background:linear-gradient(90deg,var(--violet),var(--cyan),var(--yellow));
  opacity:.9;
}
.hero::after{
  content:"";
  position:absolute;
  width:280px;height:280px;
  right:-160px;top:-160px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(53,199,238,.12),transparent 65%);
  pointer-events:none;
}

.eyebrow{
  font-size:12px;
  letter-spacing:.24em;
  font-weight:900;
  color:var(--cyan);
}

h1{
  margin:12px 0 14px;
  font-size:clamp(36px,8vw,58px);
  letter-spacing:.025em;
  line-height:1.03;
}

h2{
  margin:0 0 16px;
  font-size:22px;
}

.lead{
  margin:0 auto 20px;
  max-width:560px;
  color:var(--muted);
  line-height:1.8;
  font-size:16px;
}

.status{
  background:#0c1127;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 16px;
  margin:20px 0 12px;
  color:var(--muted);
  font-size:14px;
}

.status.ok{color:var(--ok);border-color:rgba(75,217,143,.4)}
.status.warn{color:#ffe27e;border-color:rgba(255,211,79,.35)}
.status.bad{color:#ff9ca7;border-color:rgba(255,100,115,.4)}

button{font:inherit;cursor:pointer}

.primary,.secondary{
  width:100%;
  border-radius:17px;
  padding:16px 18px;
  font-weight:900;
  border:0;
  margin-top:10px;
  transition:transform .12s ease,opacity .12s ease;
}
.primary:active,.secondary:active{transform:scale(.985)}

.primary{
  background:linear-gradient(135deg,var(--yellow),var(--gold));
  color:#171827;
  box-shadow:0 12px 28px rgba(255,181,47,.18);
}

.secondary{
  color:var(--text);
  border:1px solid rgba(53,199,238,.34);
  background:linear-gradient(135deg,rgba(118,82,214,.26),rgba(53,199,238,.12));
}

.primary:disabled{opacity:.45;cursor:not-allowed}

.steps{display:grid;gap:11px}
.steps>div{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  background:linear-gradient(135deg,var(--panel2),rgba(27,35,73,.86));
  border:1px solid rgba(94,112,178,.2);
  border-radius:16px;
}
.steps > div > span:first-child{
  width:34px;height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  flex:none;
  color:white;
  font-weight:900;
  background:linear-gradient(135deg,var(--cyan),var(--violet));
  box-shadow:0 8px 20px rgba(53,199,238,.15);
}

/* Text inserted by i18n must behave like normal inline text, not a number badge */
.steps p span[data-i18n]{
  width:auto !important;
  height:auto !important;
  display:inline !important;
  color:inherit !important;
  font-weight:inherit !important;
  background:none !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
.steps p{margin:0;line-height:1.5}

.note,.muted{font-size:13px;color:var(--muted)}
.note{margin:14px 2px 0}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.live-dot{
  font-size:11px;
  font-weight:900;
  color:#ff91a0;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(255,100,115,.28);
  background:rgba(255,100,115,.07);
}

footer{
  display:flex;
  justify-content:space-between;
  padding:10px 8px 30px;
  color:#75809f;
  font-size:12px;
}
footer a{color:#8d9abe;text-decoration:none}

dialog{
  border:0;
  border-radius:24px;
  max-width:560px;
  width:calc(100% - 28px);
  padding:0;
  background:var(--panel);
  color:var(--text);
}
dialog::backdrop{
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(5px);
}
.dialog-body{padding:28px;position:relative}
.dialog-body p{line-height:1.7;color:var(--muted)}
.close{
  position:absolute;
  right:14px;top:10px;
  border:0;
  background:transparent;
  color:white;
  font-size:30px;
}

/* Group-preference UI injected by latest app.js */
#pushPrefsCard{
  border-color:rgba(118,82,214,.42);
}
#pushPrefsCard input[type="checkbox"]{
  accent-color:var(--cyan);
}

/* Admin page: the functional PHP injects its own inline CSS;
   these rules only harmonize the shared visual language. */
.quick{
  transition:transform .12s ease,border-color .12s ease,background .12s ease;
}
.quick:active{transform:scale(.98)}
.quick:hover{border-color:rgba(53,199,238,.5)}

input,textarea,select{
  font:inherit;
}

@media(max-width:520px){
  body{padding:10px}
  .card{padding:20px;border-radius:22px}
  .hero{padding:32px 20px 24px}
  h1{font-size:38px}
  .lead{font-size:15px}
}


/* v7 member network */
.member-link{
  display:block;
  text-align:center;
  text-decoration:none;
  margin-top:14px;
}
.member-link:visited{color:var(--text)}
.member-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(53,199,238,.10);
  border:1px solid rgba(53,199,238,.26);
  color:var(--cyan);
  font-size:12px;
  font-weight:800;
}
.member-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}
.member-choice{
  border:1px solid rgba(94,112,178,.32);
  background:linear-gradient(135deg,var(--panel2),rgba(27,35,73,.86));
  color:var(--text);
  border-radius:16px;
  padding:16px 12px;
  font-weight:900;
  text-align:center;
}
.member-choice.active{
  border-color:rgba(53,199,238,.65);
  box-shadow:0 0 0 2px rgba(53,199,238,.10) inset;
}
.member-form input,.member-form select,.member-form textarea{
  width:100%;
  padding:13px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0c1127;
  color:white;
  margin:6px 0 14px;
}
.member-form textarea{min-height:100px;resize:vertical}
.member-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 16px;
}
@media(max-width:520px){
  .member-grid{grid-template-columns:1fr 1fr}
}


/* v7.3 language switcher */
.htu-language-switcher{
  position:fixed;
  top:max(10px, env(safe-area-inset-top));
  right:12px;
  z-index:9999;
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(9,14,31,.90);
  border:1px solid rgba(53,199,238,.34);
  box-shadow:0 10px 30px rgba(0,0,0,.28);
  backdrop-filter:blur(10px);
}
.htu-language-switcher select{
  width:auto;
  max-width:145px;
  margin:0;
  padding:5px 7px;
  color:#fff;
  background:transparent;
  border:0;
  font-size:13px;
  font-weight:700;
}
@media(max-width:520px){
  .htu-language-switcher{
    top:max(8px, env(safe-area-inset-top));
    right:8px;
    padding:7px 8px;
  }
  .htu-language-switcher select{max-width:115px;font-size:12px}
}


/* v7.3.1 layout stabilization */
.steps > div{
  min-height:64px;
}
.steps > div p{
  flex:1;
  min-width:0;
  word-break:normal;
  overflow-wrap:anywhere;
}

.htu-language-switcher{
  top:calc(env(safe-area-inset-top) + 8px) !important;
  right:10px !important;
  padding:6px 8px !important;
  border-radius:12px !important;
  gap:5px !important;
}
.htu-language-switcher > span{
  font-size:18px;
  line-height:1;
}
.htu-language-switcher select{
  max-width:105px !important;
  padding:3px 2px !important;
  font-size:12px !important;
}

@media(max-width:520px){
  .htu-language-switcher{
    right:8px !important;
    padding:5px 7px !important;
  }
  .htu-language-switcher select{
    max-width:92px !important;
    font-size:11px !important;
  }
}

/* v8 notice center */
.unread-badge{min-width:24px;height:24px;padding:0 7px;border-radius:999px;align-items:center;justify-content:center;font-size:12px;background:#ff4667;color:white;vertical-align:middle}
.notice-list{display:grid;gap:10px}
.notice-row{display:flex;gap:12px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.035);text-decoration:none;color:inherit}
.notice-row.is-unread{border-color:rgba(53,199,238,.45);background:rgba(53,199,238,.08)}
.notice-dot{width:9px;height:9px;border-radius:50%;background:transparent;margin-top:7px;flex:none}.is-unread .notice-dot{background:#35c7ee;box-shadow:0 0 12px #35c7ee}
.notice-copy{min-width:0}.notice-copy strong{display:block}.notice-copy p{margin:5px 0;color:#d8deea;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notice-copy small{color:#8f9bb1}
.upload-preview{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:8px 0}.upload-preview img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}
.notice-body{font-size:18px;line-height:1.8;white-space:pre-wrap;margin:22px 0}
.notice-images{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.notice-images img{width:100%;border-radius:14px;cursor:zoom-in}
.image-viewer{width:100vw;max-width:none;height:100vh;max-height:none;border:0;background:rgba(0,0,0,.94);padding:20px}.image-viewer::backdrop{background:#000}.image-viewer img{width:100%;height:100%;object-fit:contain}.image-viewer button{position:fixed;right:16px;top:calc(env(safe-area-inset-top) + 12px);z-index:2;width:44px;height:44px;border-radius:50%;font-size:28px}
.install-guide{max-width:560px;padding:4px}.install-step{display:flex;gap:13px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.08)}.install-step>b{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,var(--cyan),var(--violet));color:white}.install-step p{margin:5px 0 0;color:#a8b3c7}.install-note{padding:12px;border-radius:12px;background:rgba(53,199,238,.08);font-size:13px}.dialog-close{float:right;width:38px;height:38px;border-radius:50%}
@media(max-width:520px){.notice-images{grid-template-columns:1fr}.upload-preview{grid-template-columns:repeat(3,1fr)}}

/* v8.1 complete i18n */
html.i18n-loading body{visibility:hidden}
html[dir="rtl"] .section-head{direction:rtl}
html[dir="rtl"] .steps>div,html[dir="rtl"] .install-step{direction:rtl}
html[dir="rtl"] .htu-language-switcher{left:10px;right:auto}
html[dir="rtl"] .notice-row{direction:rtl}
