:root {

  --primary:#00A99D;
  --secondary:#0077B6;

  --success:#22C55E;

  --background:#F4FAFB;

  --card:#FFFFFF;

  --shadow:
  0 5px 15px rgba(0,0,0,0.08);

}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{

  font-family:
  Segoe UI,
  sans-serif;

  background:
  var(--background);

  padding-bottom:90px;
}

.header{

  background:
  linear-gradient(
  135deg,
  var(--primary),
  var(--secondary));

  color:white;

  text-align:center;

  padding:20px;
}

.logo{

  font-size:34px;
  font-weight:700;
}

.title{

  font-size:20px;
}

.page{

  padding:15px;
}

.card{

  background:white;

  border-radius:20px;

  padding:18px;

  box-shadow:
  var(--shadow);

  margin-bottom:15px;
}

.card-title{

  font-size:14px;
  color:#777;
}

.card-value{

  font-size:30px;
  font-weight:700;
}

.grid{

  display:grid;

  grid-template-columns:
  repeat(2,1fr);

  gap:12px;
}

input,
select{

  width:100%;

  padding:14px;

  border-radius:12px;

  border:1px solid #ddd;

  margin-top:10px;
}

button.action{

  width:100%;

  border:none;

  background:var(--primary);

  color:white;

  border-radius:12px;

  padding:15px;

  font-size:16px;

  margin-top:15px;
}

.progress{

  height:20px;

  background:#ddd;

  border-radius:50px;

  overflow:hidden;
}

.progress-bar{

  height:100%;

  width:63%;

  background:
  linear-gradient(
  90deg,
  #22C55E,
  #00A99D
  );
}

.bottom-nav{

  position:fixed;

  bottom:0;

  width:100%;

  background:white;

  display:flex;

  justify-content:space-around;

  padding:10px;

  box-shadow:
  0 -5px 20px rgba(0,0,0,0.08);
}

.bottom-nav button{

  border:none;
  background:none;

  display:flex;
  flex-direction:column;

  align-items:center;

  font-size:14px;
}

.podium{
    display:flex;
    justify-content:center;
    align-items:flex-end;
    gap:10px;

    margin:30px 0;
}
.podium div{

  background:white;

  border-radius:15px;

  padding:10px;

  box-shadow:
  var(--shadow);

  text-align:center;
}

.rank1{

  min-height:150px;
}

.rank2{

  min-height:125px;
}

.rank3{

  min-height:110px;
}

.badges{

  display:flex;

  gap:10px;

  flex-wrap:wrap;
}

.badge{

  background:#f2f2f2;

  border-radius:15px;

  padding:10px;
}
.entry-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:12px 4px;

    border-bottom:1px solid #ececec;

}

.entry-details{

    display:flex;

    flex-direction:column;

    gap:4px;

}

.entry-date{

    font-size:14px;

    color:#666;

}

.entry-steps{

    font-size:18px;

    font-weight:600;

    color:#222;

}

.edit-btn{

    width:40px;

    height:40px;

    border:none;

    border-radius:12px;

    background:#f2f4f7;

    cursor:pointer;

    font-size:18px;

    transition:.2s;
}

.edit-btn:hover{

    background:#e7ebef;

}

.division-user {

    margin-top: 15px;

}

.division-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 6px;

    font-size: 14px;

}

.division-progress {

    height: 12px;

    background: #e5e7eb;

    border-radius: 20px;

    overflow: hidden;

}

.division-progress-fill {

    height: 100%;

    background: linear-gradient(
        90deg,
        #00A99D,
        #00C6A7
    );

    border-radius: 20px;

}

.admin-grid{

    display:grid;

    grid-template-columns:
    repeat(2,1fr);

    gap:10px;

    margin-bottom:15px;

}

/* ===================== Admin panel ===================== */

textarea{

    width:100%;

    padding:14px;

    border-radius:12px;

    border:1px solid #ddd;

    margin-top:10px;

    font-family:inherit;

    font-size:inherit;

    resize:vertical;

}

input[type="checkbox"]{

    width:auto;

    margin:0;

    padding:0;

}

.lbl{

    display:block;

    margin-top:12px;

    font-size:13px;

    color:#777;

}

.check-row{

    display:flex;

    align-items:center;

    gap:10px;

    margin-top:14px;

    font-size:15px;

}

button.action.secondary{

    background:#e9eef2;

    color:#333;

    margin-top:10px;

}

.admin-grid{

    grid-template-columns:
    repeat(3,1fr);

}

.tab-btn{

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:4px;

    padding:10px 4px;

    border:1px solid #e3e8ec;

    border-radius:14px;

    background:white;

    font-size:20px;

    cursor:pointer;

}

.tab-btn span{

    font-size:12px;

    color:#555;

}

.tab-btn.active{

    background:var(--primary);

    border-color:var(--primary);

}

.tab-btn.active span{

    color:white;

}

.tab-btn.logout{

    background:#fff5f5;

    border-color:#f3d4d4;

}

.admin-msg{

    border-radius:12px;

    padding:0;

    margin-bottom:0;

    font-weight:600;

}

.admin-msg.ok,
.admin-msg.err{

    padding:12px 14px;

    margin-bottom:15px;

}

.admin-msg.ok{

    background:#e8f8ee;

    color:#17803d;

}

.admin-msg.err{

    background:#fdeaea;

    color:#b42318;

}

.admin-item{

    padding:12px 4px;

    border-bottom:1px solid #ececec;

}

.admin-item:last-child{

    border-bottom:none;

}

.admin-item-title{

    font-size:16px;

    font-weight:600;

    color:#222;

}

.admin-item-sub{

    font-size:13px;

    color:#777;

    margin-top:4px;

    line-height:1.5;

}

.badge-pill{

    display:inline-block;

    margin-left:6px;

    padding:2px 8px;

    border-radius:20px;

    font-size:11px;

    font-weight:600;

    vertical-align:middle;

}

.badge-pill.on{

    background:#e8f8ee;

    color:#17803d;

}

.badge-pill.off{

    background:#eee;

    color:#777;

}

.row-actions{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

    margin-top:10px;

}

.btn-sm{

    border:none;

    border-radius:10px;

    background:#f2f4f7;

    padding:8px 12px;

    font-size:13px;

    cursor:pointer;

}

.btn-sm:hover{

    background:#e7ebef;

}

.btn-sm.danger{

    background:#fdeaea;

    color:#b42318;

}


/* ===================== Engagement features ===================== */

/* five items in the bottom nav */
.bottom-nav{
    padding:8px 4px;
    z-index:50;
}

.bottom-nav button{
    font-size:18px;
    flex:1;
    padding:2px 0;
    cursor:pointer;
}

.bottom-nav button span{
    font-size:11px;
    color:#444;
}

/* announcement banner */
#banner{
    padding:0 15px;
}

.notice{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin-top:12px;
    padding:12px 14px;
    border-radius:14px;
    background:linear-gradient(135deg,#fff7e0,#ffeec2);
    border:1px solid #f6d889;
    color:#6b4a00;
    font-size:14px;
    line-height:1.4;
    box-shadow:var(--shadow);
}

.notice-icon{
    font-size:18px;
}

.notice-text{
    flex:1;
    font-weight:600;
}

.notice-x{
    border:none;
    background:none;
    color:#6b4a00;
    font-size:16px;
    cursor:pointer;
    padding:0 2px;
}

/* tip of the day */
.tip-card{
    background:linear-gradient(135deg,#e6f7f5,#e8f3fb);
    border:1px solid #cbe9e5;
}

.tip-title{
    font-size:13px;
    font-weight:700;
    color:#0b6f66;
    margin-bottom:6px;
}

#tipText{
    font-size:15px;
    line-height:1.45;
    color:#234;
}

/* toast + confetti */
.toast{
    position:fixed;
    left:50%;
    bottom:100px;
    transform:translateX(-50%);
    max-width:90%;
    background:#1f2d3a;
    color:white;
    padding:12px 18px;
    border-radius:30px;
    font-size:14px;
    font-weight:600;
    box-shadow:0 6px 20px rgba(0,0,0,0.25);
    z-index:2000;
    transition:opacity .5s;
}

.toast.hide{
    opacity:0;
}

.confetti-canvas{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    pointer-events:none;
    z-index:1500;
}

.celebrate{
    margin-top:6px;
    color:#0b6f66;
    font-weight:700;
}

/* journey route + chart */
.route-svg{
    display:block;
    width:100%;
    height:auto;
    margin-top:8px;
}

.route-next{
    margin-top:6px;
    font-size:14px;
    color:#355;
}

.chart-wrap{
    position:relative;
    height:230px;
    margin-top:10px;
}

/* badges and stickers */
.sticker-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin-top:14px;
}

.sticker{
    text-align:center;
    padding:12px 6px;
    border-radius:16px;
    background:#f4fafb;
    border:2px solid #d5ecea;
}

.sticker.earned{
    background:linear-gradient(160deg,#fffbe8,#e9fbf4);
    border-color:#f2cf5b;
    box-shadow:0 3px 10px rgba(242,207,91,0.35);
}

.sticker-icon{
    font-size:30px;
    line-height:1.1;
}

.sticker-name{
    margin-top:6px;
    font-size:12px;
    font-weight:700;
    color:#234;
}

.sticker-desc{
    margin-top:3px;
    font-size:10px;
    color:#7a868d;
    line-height:1.25;
}

.sticker.locked{
    background:#f3f4f5;
    border-color:#e1e4e6;
}

.sticker.locked .sticker-icon{
    filter:grayscale(1);
    opacity:0.35;
}

.sticker.locked .sticker-name{
    color:#8d979d;
}

/* division battle */
.battle-pick{
    display:flex;
    align-items:center;
    gap:8px;
}

.battle-pick span{
    margin-top:10px;
    font-weight:800;
    color:#c2410c;
}

.battle-pick select{
    flex:1;
    min-width:0;
}

.battle-names{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:16px;
    font-weight:700;
    font-size:15px;
}

.battle-bar{
    display:flex;
    height:26px;
    margin:8px 0 14px;
    border-radius:30px;
    overflow:hidden;
    background:#e5e7eb;
}

.battle-a,
.battle-b{
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-size:12px;
    font-weight:700;
    transition:width .5s;
}

.battle-a{
    background:linear-gradient(90deg,#00A99D,#00c6a7);
}

.battle-b{
    background:linear-gradient(90deg,#0077B6,#0a8fd6);
}

.battle-row{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:8px;
    padding:8px 0;
    border-bottom:1px solid #ececec;
    font-weight:700;
}

.battle-row span:first-child{
    text-align:left;
}

.battle-row span:last-child{
    text-align:right;
}

.battle-label{
    font-weight:500;
    font-size:12px;
    color:#777;
    text-align:center;
}

.battle-result{
    margin:14px 0 6px;
    text-align:center;
    font-size:16px;
    font-weight:800;
    color:#0b6f66;
}

/* winners */
.section-title{
    margin:18px 4px 10px;
    font-size:17px;
}

.winner-card{
    border-left:6px solid #f2cf5b;
}

.winner-card.live{
    border-left-color:#00A99D;
}

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

.winner-div{
    margin-top:6px;
    padding:10px 12px;
    border-radius:12px;
    background:#f4fafb;
    font-size:14px;
}

/* hidden game */
.game-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,30,40,0.72);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:3000;
    touch-action:manipulation;
}

.game-box{
    width:min(92vw,420px);
    background:white;
    border-radius:22px;
    padding:14px;
    box-shadow:0 12px 40px rgba(0,0,0,0.4);
}

.game-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:10px;
    font-size:15px;
}

.game-close{
    border:none;
    background:#f2f4f7;
    width:34px;
    height:34px;
    border-radius:10px;
    font-size:16px;
    cursor:pointer;
}

#gameCanvas{
    display:block;
    width:100%;
    height:auto;
    border-radius:14px;
    background:#eefaf9;
    touch-action:none;
}

.game-hint{
    margin-top:10px;
    font-size:12px;
    color:#777;
    text-align:center;
    line-height:1.4;
}


/* division shown under a podium employee */
.podium-div{
    display:inline-block;
    margin-top:6px;
    padding:2px 9px;
    border-radius:12px;
    background:#e6f7f5;
    color:#0b6f66;
    font-size:11px;
    font-weight:600;
}


/* badge board (admin) */
.bb-chips{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}

.bb-chip{
    background:#fff7e0;
    border:1px solid #f6d889;
    color:#6b4a00;
    border-radius:12px;
    padding:3px 9px;
    font-size:12px;
    font-weight:600;
}

/* ---------- Add-yourself popup ---------- */
.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
    z-index:4000;
}

.modal-card{
    background:var(--card);
    width:100%;
    max-width:420px;
    max-height:90vh;
    overflow-y:auto;
    border-radius:18px;
    padding:20px;
    box-shadow:0 10px 40px rgba(0,0,0,.3);
}

.modal-card h3{ margin:0 0 6px; }

.modal-sub{
    margin:0 0 8px;
    color:#555;
    font-size:14px;
}

.modal-label{
    display:block;
    margin-top:12px;
    font-size:13px;
    font-weight:600;
    color:#333;
}

.modal-card input,
.modal-card select{ margin-top:6px; }

.modal-msg{
    min-height:18px;
    margin-top:10px;
    color:#c0392b;
    font-size:13px;
}

/* ---------- Join-then-submit flow ---------- */
.enrol-note{
    margin-top:12px;
    font-size:14px;
    color:#555;
}

.enrol-status{
    margin-top:12px;
    padding:10px 12px;
    background:#E6F6F5;
    border-radius:12px;
    font-size:14px;
    line-height:1.5;
}

.enrol-dates{
    display:block;
    color:#666;
    font-size:12px;
}

.link-btn{
    display:block;
    margin-top:4px;
    padding:0;
    border:none;
    background:none;
    color:var(--secondary);
    font-size:13px;
    text-decoration:underline;
    cursor:pointer;
}


/* =====================================================================
   HEAL App: Home, Mental Health, Physical Health, new header
   ===================================================================== */

:root {
  --mind: #6D5BD0;
  --mind-soft: #EFECFB;
  --phys: #2A9658;
  --phys-soft: #E5F5EB;
  --steps: #0077B6;
  --steps-soft: #E2F0F8;
  --ink: #1d2b36;
  --muted: #5f6f7a;
  --line: #e1e8ec;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  padding-bottom: 40px;
}

body[data-view="steps"] {
  padding-bottom: 90px;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid #0b6f66;
  outline-offset: 2px;
}

/* ----- header (every page except Home) ----- */

.header {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 40;
}

body[data-view="home"] .header { display: none; }

.back-btn {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 28px;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
}

.back-btn[hidden] { display: none; }

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
}

.header .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  flex: 1;
}

/* the steps bottom bar only exists inside Step Challenge */
.bottom-nav { display: none; }
body[data-view="steps"] .bottom-nav { display: flex; }

.bottom-nav button { position: relative; }

.bottom-nav button.active span {
  color: var(--steps);
  font-weight: 700;
}

.bottom-nav button.active::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 28%;
  right: 28%;
  height: 3px;
  border-radius: 3px;
  background: var(--steps);
}

/* ----- Home hero ----- */

.hero {
  background: linear-gradient(150deg, var(--primary), var(--secondary));
  color: #fff;
  text-align: center;
  padding: 34px 20px 0;
  position: relative;
  overflow: hidden;
}

.hero-logo {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  user-select: none;
  -webkit-user-select: none;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.01em;
  margin-top: 14px;
  line-height: 1.1;
}

.hero-tag {
  font-size: 16px;
  opacity: 0.95;
  margin: 8px auto 0;
  max-width: 28ch;
  line-height: 1.4;
}

.pulse {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 18px;
}

.pulse-line {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-line {
    animation: pulse-draw 1.6s ease-out 0.2s both;
  }
}

@keyframes pulse-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* ----- Home tiles ----- */

.home-page { padding-top: 18px; }

.tiles {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 84px;
}

.tile-mind { background: var(--mind-soft); border-color: #dcd6f6; }
.tile-body { background: var(--phys-soft); border-color: #cfe9d9; }
.tile-steps { background: var(--steps-soft); border-color: #cbe2f0; }

.tile-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: #fff;
  flex: none;
}

.tile-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.tile-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

.tile-mind .tile-name { color: #4b3bb0; }
.tile-body .tile-name { color: #1d7040; }
.tile-steps .tile-name { color: #00598a; }

.tile-sub { font-size: 14px; color: var(--muted); line-height: 1.35; }

.tile-go { font-size: 28px; color: var(--muted); }

.tile:active { transform: scale(0.99); }

.list-title {
  font-family: var(--display);
  font-size: 20px;
  margin: 22px 2px 10px;
}

.home-foot { text-align: center; margin-top: 26px; }

.admin-link {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 14px;
  display: inline-block;
}

/* ----- section heads ----- */

.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 14px;
}

.sec-mind { background: var(--mind-soft); }
.sec-body { background: var(--phys-soft); }

.sec-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: #fff;
  flex: none;
}

.sec-title {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.15;
}

.sec-mind .sec-title { color: #4b3bb0; }
.sec-body .sec-title { color: #1d7040; }

.sec-sub { font-size: 14px; color: var(--muted); margin-top: 3px; }

/* notices on section pages stay put, so give them room */
#banner:empty { display: none; }

/* ----- posts ----- */

.post-list { display: grid; gap: 12px; }

.post-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  text-decoration: none;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--line);
}

.post-mind { border-left-color: var(--mind); }
.post-body { border-left-color: var(--phys); }

.post-thumb {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  background: #eef3f5;
}

.post-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }

.post-date { color: var(--muted); font-size: 12px; }

.post-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.post-sum { font-size: 14px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  background: #eef3f5;
  color: #41525e;
  font-size: 12px;
  font-weight: 600;
}

.chip-mind { background: var(--mind-soft); color: #4b3bb0; }
.chip-body { background: var(--phys-soft); color: #1d7040; }

.topic-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}

.topic-chips::-webkit-scrollbar { display: none; }

.chip-btn {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.chip-btn.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ----- tabs (Physical Health: Posts / Info) ----- */

.seg {
  display: flex;
  background: #e6edf0;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 14px;
}

.seg button {
  flex: 1;
  border: none;
  background: none;
  padding: 11px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.seg button.on {
  background: #fff;
  color: #1d7040;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ----- cards used in the health sections ----- */

.cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: var(--steps-soft);
  border: 1px solid #cbe2f0;
  box-shadow: none;
}

.cta-ico { font-size: 28px; }
.cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cta-title { font-family: var(--display); font-weight: 700; font-size: 18px; color: #00598a; }
.cta-sub { font-size: 14px; color: var(--muted); }

.card-h { font-family: var(--display); font-size: 19px; margin-bottom: 4px; }

.support-card { border: 1px solid #dcd6f6; box-shadow: none; background: #fbfaff; }

.support-sub { font-size: 14px; color: var(--muted); margin-bottom: 8px; }

.support-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #ebe8f8;
}

.support-text { flex: 1; min-width: 0; }
.support-name { font-weight: 700; font-size: 15px; }
.support-desc { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

.call-btn {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.fac-card { padding: 0; overflow: hidden; }
.fac-card > *:not(.fac-img) { margin-left: 16px; margin-right: 16px; }
.fac-card > .fac-top { margin-top: 14px; }
.fac-card > .call-btn { margin-bottom: 16px; margin-top: 4px; }
.fac-card > .fac-facts:empty, .fac-card > .fac-facts { margin-bottom: 12px; }

.fac-img { width: 100%; height: 150px; object-fit: cover; display: block; background: #eef3f5; }

.fac-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fac-name { font-family: var(--display); font-size: 19px; }
.fac-desc { font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 6px; }

.fac-facts { display: grid; gap: 4px; margin-top: 10px; font-size: 14px; }
.fac-facts div { display: flex; gap: 10px; }
.fac-facts dt { color: var(--muted); width: 52px; flex: none; }
.fac-facts dd { flex: 1; }

.empty-card { text-align: center; }
.empty-title { font-family: var(--display); font-weight: 700; font-size: 18px; }
.empty-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.link-action { display: block; text-align: center; text-decoration: none; }

/* ----- article ----- */

.article { max-width: 680px; margin: 0 auto; }

.article-cover {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
  display: block;
}

.article-title {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.2;
  margin: 10px 0 14px;
  overflow-wrap: anywhere;
}

.preview-note {
  background: #fff7e0;
  border: 1px solid #f6d889;
  color: #6b4a00;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

.rt { font-size: 17px; line-height: 1.65; max-width: 62ch; }
.rt p { margin: 0 0 14px; overflow-wrap: anywhere; }
.rt h3 { font-family: var(--display); font-size: 21px; margin: 22px 0 8px; line-height: 1.25; }
.rt ul { margin: 0 0 14px 22px; }
.rt li { margin-bottom: 6px; }
.rt a { color: var(--steps); text-decoration: underline; }
.rt figure { margin: 16px 0; }
.rt img { max-width: 100%; border-radius: 12px; display: block; }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

.btn-share {
  flex: 1;
  min-width: 150px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ----- admin additions ----- */

.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.admin-sub { font-size: 14px; color: var(--muted); }

#banner { padding-bottom: 2px; }
body[data-view="home"] #banner { padding-top: 2px; }

.admin-group-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 14px 2px 8px; }

.admin-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }

.admin-thumb { width: 100%; max-height: 120px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; display: block; }

.img-field { display: grid; gap: 8px; margin-top: 6px; }
.img-field input { margin-top: 0; }
.img-preview { max-width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #f4f7f8; justify-self: start; }
.img-status { font-size: 13px; color: #1d7040; min-height: 0; }
.img-status.err { color: #b3261e; }
.img-field .btn-sm { justify-self: start; }

.md-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.md-toolbar button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 11px; font-size: 14px; cursor: pointer; }

.editor-preview { margin-top: 12px; padding: 14px; border: 1px dashed #b9c7cf; border-radius: 14px; background: #fcfdfd; }
.editor-preview .article-title { font-size: 22px; margin-top: 0; }

.hint { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

@media (min-width: 720px) {
  .page { max-width: 720px; margin: 0 auto; }
  .tiles { grid-template-columns: 1fr; }
}


/* =====================================================================
   Round 2: compact Home hero, admin ribbon
   ===================================================================== */

.hero {
  text-align: left;
  padding: 14px 16px 0;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 84px;
  min-height: 64px;
}

.hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  flex: none;
}

.hero-text { min-width: 0; }

.hero-title {
  font-size: 30px;
  margin-top: 0;
  line-height: 1.05;
}

.hero-tag {
  font-size: 14px;
  margin: 4px 0 0;
  max-width: none;
  line-height: 1.3;
}

.hero-admin {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.hero-admin:active { background: rgba(255, 255, 255, 0.32); }

.pulse { height: 26px; margin-top: 10px; }

.home-page { padding-top: 14px; }

/* ----- admin ribbon: one scrolling row, sticky under the header ----- */

.admin-page { padding-top: 10px; }

.admin-ribbon {
  position: sticky;
  top: 60px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -15px 12px;
  padding: 10px 15px;
  background: var(--background);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.admin-ribbon::-webkit-scrollbar { display: none; }

.admin-ribbon .tab-btn {
  flex: none;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  font-size: 16px;
  border-radius: 22px;
  white-space: nowrap;
}

.admin-ribbon .tab-btn .tab-label {
  font-size: 14px;
  font-weight: 600;
  color: #33454f;
}

.admin-ribbon .tab-btn.active .tab-label { color: #fff; }

.ribbon-sep {
  flex: none;
  display: flex;
  align-items: center;
  align-self: stretch;
  margin: 0 2px 0 6px;
  padding-left: 12px;
  border-left: 2px solid #cfdae0;
}

.ribbon-sep span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.admin-ribbon .tab-btn .tab-ico { font-size: 18px; color: inherit; line-height: 1; }

@media (max-width: 350px) {
  .hero-row { gap: 10px; padding-right: 78px; }
  .hero-logo { width: 54px; height: 54px; border-radius: 15px; }
  .hero-title { font-size: 24px; white-space: nowrap; }
  .hero-tag { font-size: 13px; }
}

/* =====================================================================
   Round 3: Mental Health support options, first aiders
   ===================================================================== */

.support-card .card-h { font-size: 21px; }

.support-sub { font-size: 15px; color: #4b3bb0; font-weight: 600; margin-bottom: 12px; }

.opt-list { display: grid; gap: 10px; }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dcd6f6;
  text-decoration: none;
  min-height: 68px;
}

.opt:active { transform: scale(0.99); }

.opt-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--mind-soft);
  flex: none;
}

.opt-sms { background: #dff6e6; }

.opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.opt-name { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }

.opt-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }

.opt-go { font-size: 24px; color: var(--muted); }

/* first aiders */

.person-list { display: grid; gap: 12px; }

.person-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding: 14px;
}

.avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-initials {
  display: grid;
  place-items: center;
  background: var(--mind-soft);
  color: #4b3bb0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}

.avatar-img { position: absolute; inset: 0; background: #fff; }

.avatar-small, .avatar-small .avatar { width: 48px; height: 48px; }
.avatar-small .avatar-initials { font-size: 17px; }

.person-text { flex: 1; min-width: 0; }

.person-name { font-family: var(--display); font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }

.person-note { font-size: 14px; color: var(--muted); margin-top: 2px; }

.admin-person { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.support-card > .support-row:first-child { border-top: none; padding-top: 4px; }
