:root {
  --card: #fff;
  --mute: #4b6a73;
  --zoom: 1;
  --teal: #0f4c5c;
  --deep: #0a3641;
  --yellow: #f4b400;
  --cream: #fff8e7;
  --coral: #ff7a59;
  --blue: #3aa7d9;
  --green: #43b581;
  --purple: #8e6bd8;
  --ink: #14323b;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Cairo, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
  max-width: 100%;
}
a {
  color: inherit;
}
.bubbles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bubbles i {
  position: absolute;
  border-radius: 50%;
  opacity: 0.16;
}
.bubbles i:nth-child(1) {
  width: 260px;
  height: 260px;
  background: var(--yellow);
  top: -60px;
  left: -70px;
}
.bubbles i:nth-child(2) {
  width: 180px;
  height: 180px;
  background: var(--coral);
  bottom: 80px;
  right: -60px;
}
.bubbles i:nth-child(3) {
  width: 140px;
  height: 140px;
  background: var(--blue);
  bottom: -40px;
  left: 20%;
}
.bubbles i:nth-child(4) {
  width: 90px;
  height: 90px;
  background: var(--green);
  top: 30%;
  right: 8%;
}
header.top {
  background: var(--teal);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 18px #0f4c5c33;
}
header.top .logo {
  font-weight: 800;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
header.top .logo b {
  background: var(--yellow);
  color: var(--deep);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
header.top .sp {
  flex: 1;
}
.pill {
  background: #fff2;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.pill.y {
  background: var(--yellow);
  color: var(--deep);
}
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 90px;
}
h1 {
  font-size: 26px;
  margin: 8px 0 4px;
  color: var(--teal);
}
h2 {
  font-size: 20px;
  color: var(--teal);
  margin: 22px 0 10px;
}
.sub {
  color: var(--mute);
  margin: 0 0 14px;
}
.hero {
  background: linear-gradient(135deg, var(--teal), #17707f);
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  margin-bottom: 20px;
}
.hero div {
  padding: 22px;
}
.hero h1 {
  color: #fff;
  font-size: 30px;
}
.hero p {
  margin: 6px 0 0;
  opacity: 0.92;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 170px;
}
@media (max-width: 620px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero img {
    order: -1;
    height: 170px;
  }
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 8px 22px #0f4c5c1a;
  border: 3px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s;
}
.card:active {
  transform: scale(0.98);
}
.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.card .b {
  padding: 12px 16px 16px;
}
.card h3 {
  margin: 0 0 2px;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--mute);
  font-size: 14px;
}
.card.teal {
  border-color: var(--teal);
}
.card.yellow {
  border-color: var(--yellow);
}
.card.coral {
  border-color: var(--coral);
}
.card.blue {
  border-color: var(--blue);
}
.card.green {
  border-color: var(--green);
}
.card.purple {
  border-color: var(--purple);
}
.card.soon {
  cursor: default;
}
.card.soon img {
  filter: grayscale(0.75) brightness(0.9);
}
.lock {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--deep);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
}
.lock.open {
  background: var(--green);
}
.box {
  background: var(--card);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 8px 22px #0f4c5c1a;
  max-width: 460px;
  margin: 24px auto;
}
label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}
input.in {
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  border: 2px solid #cfe0e3;
  font: inherit;
  font-size: 16px;
  background: #fbfeff;
}
input.in:focus {
  outline: 0;
  border-color: var(--teal);
}
.btn {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 18px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  margin-top: 16px;
}
.btn.y {
  background: var(--yellow);
  color: var(--deep);
}
.btn.s {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 14px;
}
.btn.r {
  background: var(--coral);
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--card);
  color: var(--teal);
  box-shadow: 0 3px 10px #0f4c5c14;
}
.tab.on {
  background: var(--teal);
  color: #fff;
}
.tab:disabled {
  opacity: 0.4;
  cursor: default;
}
.err {
  color: #c0392b;
  font-weight: 600;
  margin-top: 10px;
  min-height: 20px;
}
.ok {
  color: var(--green);
}
.msg {
  background: #fff3cd;
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  font-weight: 600;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  background: var(--card);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 14px #0f4c5c12;
  cursor: pointer;
}
.row .ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  font-size: 20px;
  flex: none;
}
.row .t {
  flex: 1;
  font-weight: 700;
}
.row small {
  display: block;
  color: var(--mute);
  font-weight: 400;
}
.chips span {
  display: inline-block;
  background: #e4f2f4;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  margin-inline-end: 4px;
  color: var(--teal);
}
.viewer {
  position: relative;
  background: var(--card);
  border-radius: 22px;
  padding: 8px;
  margin: 0 0 14px;
  box-shadow: 0 6px 18px #0f4c5c1a;
}
.viewer canvas,
.viewer video {
  width: 100%;
  display: block;
  border-radius: 14px;
  background: #f2f2f2;
}
.viewer audio {
  width: 100%;
}
.wm {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  opacity: 0.09;
}
.wm span {
  transform: rotate(-24deg);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  color: #000;
  padding: 40px 20px;
}
.vt {
  font-weight: 700;
  margin: 4px 8px 8px;
}
.back {
  background: none;
  border: 0;
  color: var(--teal);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
}
table.t {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
table.t td,
table.t th {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #e6eef0;
  font-size: 14px;
}
.badge {
  position: fixed;
  bottom: 10px;
  inset-inline-start: 10px;
  background: var(--deep);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  z-index: 15;
  opacity: 0.92;
}
.badge b {
  color: var(--yellow);
}
.shield {
  position: fixed;
  inset: 0;
  background: var(--deep);
  color: #fff;
  display: none;
  place-items: center;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  z-index: 100;
  padding: 30px;
}
body.hidden-content .shield {
  display: grid;
}
@media print {
  body {
    display: none !important;
  }
}
.center {
  text-align: center;
}
.auth-hero {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 8px;
  height: 150px;
  object-fit: cover;
}
.opt {
  display: block;
  padding: 8px 10px;
  margin-top: 6px;
  border-radius: 10px;
  background: #0000000a;
  cursor: pointer;
}
.opt input {
  margin-left: 8px;
}
.viewer {
  overflow: hidden;
}
.viewer canvas {
  max-width: 100%;
}
html,
body {
  overflow-x: hidden;
}
details.stu {
  background: var(--card);
  border-radius: 14px;
  margin: 8px 0;
  padding: 10px 14px;
  box-shadow: 0 2px 8px #0000000f;
}
details.stu summary {
  cursor: pointer;
  font-size: 16px;
}
header.top .lpill {
  background: #fff8e7;
  border-radius: 999px;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 8px #0003;
}
header.top .lpill img {
  height: 34px;
  width: auto;
  display: block;
}
.auth-logo {
  display: block;
  margin: 6px auto 4px;
  height: 54px;
  width: auto;
  max-width: 90%;
}
.codesel {
  -webkit-user-select: text;
  user-select: text;
  font-size: 22px;
  letter-spacing: 3px;
  direction: ltr;
  unicode-bidi: embed;
}
.support {
  max-width: 560px;
  margin: 28px auto 90px;
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 20px #00000012;
}
.support h2 {
  margin: 0 0 6px;
  color: var(--teal, #0f4c5c);
}
.support p {
  margin: 0 0 12px;
  color: #5b6b70;
}
.sup-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #0f4c5c;
  text-decoration: none;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.sup-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.sup-btns .btn {
  text-decoration: none;
  display: inline-block;
}
.btn.wa {
  background: #25a06a;
  color: #fff;
}
main {
  zoom: var(--zoom);
}
body.th-calm {
  --cream: #f1ece0;
  --card: #faf6ec;
  --mute: #5c6b60;
  --ink: #26332d;
}
body.th-dark {
  --cream: #162024;
  --card: #202d32;
  --mute: #a9bbb5;
  --ink: #e6eeea;
  --teal: #8fd1c2;
}
body.th-dark h1,
body.th-dark h2 {
  color: #bfe6dc;
}
body.th-dark .in {
  background: #17242a;
  color: #e6eeea;
  border-color: #3b5058;
}
body.th-dark .sup-num {
  color: #bfe6dc;
}
.dopt {
  position: fixed;
  top: 60px;
  left: 8px;
  right: 8px;
  max-width: 380px;
  background: var(--card);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 34px #00000047;
  z-index: 9999;
  padding: 14px 16px;
  direction: rtl;
  zoom: 1;
}
.dopt h3 {
  margin: 0 0 8px;
}
.dopt .g {
  margin: 12px 0 4px;
  font-weight: 700;
  font-size: 14px;
}
.dopt .seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dopt .seg button {
  flex: 1;
  min-width: 64px;
  border: 2px solid #c9d6d1;
  background: transparent;
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 6px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.dopt .seg button.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
body.th-dark .dopt .seg button.on {
  color: #102;
  background: #8fd1c2;
}
.dopt .note {
  font-size: 12px;
  color: var(--mute);
  margin: 8px 0 0;
}
header.top .lpill {
  flex: none;
}
header.top .pill {
  flex: none;
  padding: 8px 11px;
}
body.lay-hor .grid,
body.lay-hor .list {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
body.lay-hor .grid > .card {
  flex: 0 0 78%;
  max-width: 300px;
  scroll-snap-align: start;
}
body.lay-hor .list > .row {
  flex: 0 0 78%;
  max-width: 300px;
  scroll-snap-align: start;
  align-items: flex-start;
}
body.lay-bub .grid,
body.lay-bub .list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
body.lay-bub .grid > .card {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border-width: 3px;
}
body.lay-bub .card img {
  height: 100%;
}
body.lay-bub .card .b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 8px 14px;
  background: linear-gradient(transparent, #000a);
  color: #fff;
  text-align: center;
}
body.lay-bub .card .b h3 {
  font-size: 14px;
  margin: 0;
  color: #fff;
}
body.lay-bub .card .b p {
  display: none;
}
body.lay-bub .card .lock {
  top: 6px;
  right: 50%;
  transform: translate(50%);
  font-size: 11px;
  padding: 2px 8px;
  white-space: nowrap;
}
body.lay-bub .list > .row {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 10px;
  gap: 4px;
}
body.lay-bub .row .ic {
  width: 34px;
  height: 34px;
  font-size: 17px;
}
body.lay-bub .row .t {
  flex: none;
  font-size: 13px;
  line-height: 1.3;
}
body.lay-bub .row small,
body.lay-bub .row .chips,
body.lay-bub .row > div:last-child:not(.t) {
  display: none;
}
.learn {
  margin: 14px 0 6px;
  background: var(--card);
  border-radius: 22px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px #0f4c5c12;
}
.learn h3 {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 17px;
}
.learn .row {
  box-shadow: none;
  border: 1px solid #0f4c5c1f;
}
body.lay-bub .learn .list > .row {
  border: 1px solid #0f4c5c1f;
}
.fmt-tab.on,
.fmt-row.on {
  outline: 3px solid var(--teal);
  background: #0f4c5c10;
}
body.th-dark .fmt-tab.on {
  outline-color: #8fd1c2;
}
.hero .hero-row {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.hero .hero-row h1 {
  margin: 0;
}
.neon {
  display: inline-block;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 999px;
  color: #bff5e4;
  background: #0a2b33a8;
  border: 2px solid #7fe3c4;
  text-shadow:
    0 0 4px currentColor,
    0 0 12px currentColor,
    0 0 26px currentColor;
  box-shadow:
    0 0 10px #7fe3c466,
    inset 0 0 10px #7fe3c433;
  animation: neonlamp 9s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes neonlamp {
  0%,
  to {
    color: #bff5e4;
    border-color: #7fe3c4;
    box-shadow:
      0 0 10px #7fe3c466,
      inset 0 0 10px #7fe3c433;
  }
  25% {
    color: #bfe3ff;
    border-color: #7cc4f5;
    box-shadow:
      0 0 14px #7cc4f588,
      inset 0 0 12px #7cc4f544;
  }
  50% {
    color: #e0d2ff;
    border-color: #b79cf2;
    box-shadow:
      0 0 18px #b79cf288,
      inset 0 0 14px #b79cf244;
  }
  75% {
    color: #ffe0c2;
    border-color: #f5b98a;
    box-shadow:
      0 0 14px #f5b98a88,
      inset 0 0 12px #f5b98a44;
  }
}
@media (prefers-reduced-motion: reduce) {
  .neon {
    animation: none;
  }
}
.prog {
  background: var(--card);
  border-radius: 22px;
  padding: 14px 16px;
  margin: 0 0 16px;
  box-shadow: 0 4px 14px #0f4c5c12;
}
.prog h3 {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 17px;
}
.prog .bar {
  height: 14px;
  border-radius: 999px;
  background: #0f4c5c1a;
  overflow: hidden;
}
.prog .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7fc8b2, #8fb8e8);
  transition: width 0.6s;
}
.prog .list {
  margin-top: 10px;
}
.prog .row {
  box-shadow: none;
  border: 1px solid #0f4c5c1f;
}
.medals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.medal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #0f4c5c10;
  color: var(--teal);
  opacity: 0.45;
  filter: grayscale(1);
}
.medal b {
  font-size: 18px;
}
.medal.on {
  opacity: 1;
  filter: none;
  background: #e7f3ee;
  border: 1px solid #9fd2bf;
}
.fc {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  box-shadow: 0 6px 20px #0f4c5c1a;
  cursor: pointer;
  border: 2px solid #9fd2bf;
  margin: 14px 0 8px;
}
.fc.back {
  background: #e7f3ee;
  border-color: #8fb8e8;
}
.fc small {
  display: block;
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 8px;
}
.fc-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.done-btn {
  margin: 6px 0 10px;
  background: #e7f3ee;
  color: #1f5a4a;
  border: 1px solid #9fd2bf;
}
.done-btn.on {
  background: #9fd2bf;
}
.hero h1.neon-h {
  font-size: 32px;
  line-height: 1.6;
  font-weight: 800;
  margin: 0;
  color: #bff5e4;
  text-shadow:
    0 0 5px currentColor,
    0 0 14px currentColor,
    0 0 30px currentColor;
  animation: neonh 4s ease-in-out infinite;
  overflow-wrap: anywhere;
}
@keyframes neonh {
  0%,
  to {
    color: #bff5e4;
  }
  25% {
    color: #bfe3ff;
  }
  50% {
    color: #e6d6ff;
  }
  75% {
    color: #ffe0c2;
  }
}
@media (max-width: 380px) {
  .hero h1.neon-h {
    font-size: 27px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1.neon-h {
    animation: none;
  }
}
.h2row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.h2row .gp {
  margin-inline-start: auto;
  font-size: 12px;
  opacity: 0.8;
  background: #e7f3ee;
  border: 1px solid #9fd2bf;
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--teal);
  white-space: nowrap;
}
.adm-learn {
  margin: 8px 0;
  font-size: 13px;
}
.adm-learn summary {
  cursor: pointer;
  opacity: 0.7;
}
.open-one {
  margin: 6px 0;
}
.badge {
  inset-inline-start: auto;
  left: 10px;
  right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  opacity: 1;
  font-size: 13px;
  background: #0a2b33d9;
  border: 1.5px solid #7fe3c4;
  color: #bff5e4;
  text-shadow:
    0 0 4px currentColor,
    0 0 12px currentColor;
  animation: neonb 4s ease-in-out infinite;
  pointer-events: none;
}
.badge b {
  color: inherit;
}
body {
  padding-bottom: 56px;
}
@keyframes neonb {
  0%,
  to {
    color: #bff5e4;
    border-color: #7fe3c4;
  }
  25% {
    color: #bfe3ff;
    border-color: #7cc4f5;
  }
  50% {
    color: #e6d6ff;
    border-color: #b79cf2;
  }
  75% {
    color: #ffe0c2;
    border-color: #f5b98a;
  }
}
@media (prefers-reduced-motion: reduce) {
  .badge {
    animation: none;
  }
}
.qfl-wrap {
  margin-top: 12px;
  max-width: 300px;
}
.qfl-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.qfl-w {
  transform-box: fill-box;
  animation: qflwave 3.2s ease-in-out infinite;
}
.qfl-wl {
  transform-origin: 0 50%;
}
.qfl-wr {
  transform-origin: 100% 50%;
  animation-delay: -1.1s;
}
@keyframes qflwave {
  0%,
  to {
    transform: skewY(-2.2deg) scaleX(0.985);
  }
  50% {
    transform: skewY(2.2deg) scaleX(1);
  }
}
.qfl-pole {
  animation: qflbeat 1.3s ease-in-out infinite;
  filter: drop-shadow(0 0 2px #ff8fa3);
}
@keyframes qflbeat {
  0%,
  to {
    opacity: 0.85;
  }
  12% {
    opacity: 1;
    filter: drop-shadow(0 0 6px #ff8fa3);
  }
  24% {
    opacity: 0.85;
  }
  36% {
    opacity: 1;
    filter: drop-shadow(0 0 5px #ff8fa3);
  }
  50% {
    opacity: 0.85;
  }
}
.qfl-heart {
  transform-box: fill-box;
  transform-origin: center;
  animation: qflheart 1.3s ease-in-out infinite;
}
@keyframes qflheart {
  0%,
  50%,
  to {
    transform: scale(1);
  }
  12% {
    transform: scale(1.22);
  }
  36% {
    transform: scale(1.15);
  }
}
.qfl-ecg {
  stroke-dasharray: 18 82;
  animation: qflecg 2.6s linear infinite;
}
@keyframes qflecg {
  0% {
    stroke-dashoffset: 18;
  }
  to {
    stroke-dashoffset: -82;
  }
}
@media (prefers-reduced-motion: reduce) {
  .qfl-w,
  .qfl-pole,
  .qfl-heart,
  .qfl-ecg {
    animation: none;
  }
  .qfl-ecg {
    stroke-dasharray: none;
  }
}
.hero .qfl-wrap {
  padding: 0;
  margin-top: 12px;
}
.hero .qfl-wrap {
  max-width: 170px;
}
.hero .qfl-wrap {
  float: left;
  width: 118px;
  max-width: 118px;
  margin: 2px 0 8px 8px;
  padding: 0;
}
@media (max-width: 480px) {
  .hero h1.neon-h {
    font-size: 28px;
  }
}
.qtick {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  z-index: 70;
  background: #0e3f4a;
  border-top: 1.5px solid #7fe3c4;
  color: #d8f7ec;
  overflow: hidden;
  direction: ltr;
  display: flex;
  align-items: center;
}
.qtick-in {
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%;
  animation: qtickmove 38s linear infinite;
  will-change: transform;
}
.qtick-in span {
  direction: rtl;
  unicode-bidi: isolate;
  font-size: 14px;
  font-weight: 700;
  padding-right: 60px;
}
@keyframes qtickmove {
  0% {
    transform: translate(0);
  }
  to {
    transform: translate(-100%);
  }
}
.badge {
  bottom: calc(44px + env(safe-area-inset-bottom)) !important;
}
body {
  padding-bottom: 96px !important;
}
@media (prefers-reduced-motion: reduce) {
  .qtick {
    height: auto;
    min-height: 34px;
    padding: 4px 8px;
  }
  .qtick-in {
    animation: none;
    white-space: normal;
    padding-left: 0;
    text-align: center;
    display: block;
  }
  .qtick-in span {
    padding: 0;
  }
}
.hero .qfl-wrap {
  width: 100px;
  max-width: 100px;
  margin: 4px 0 6px 6px;
}
@media (max-width: 480px) {
  .hero h1.neon-h {
    font-size: 26px;
    line-height: 1.55;
  }
}
.qtick-in {
  padding-left: 0;
  animation: qtickltr 36s linear infinite;
}
.qtick-in span {
  padding: 0 40px;
}
@keyframes qtickltr {
  0% {
    transform: translate(-100%);
  }
  to {
    transform: translate(100vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  .qtick-in {
    animation: none;
  }
}
body.no-tick {
  padding-bottom: 56px !important;
}
body.no-tick .badge {
  bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}
.qset {
  background: #fff;
  border: 2px solid #7fb9c4;
  border-radius: 20px;
  margin: 0 0 14px;
  overflow: hidden;
}
.qset summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 19px;
  color: var(--teal, #0f4c5c);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.qset summary::-webkit-details-marker {
  display: none;
}
.qset summary:after {
  content: "▾";
  transition: transform 0.2s;
}
.qset[open] summary:after {
  transform: rotate(180deg);
}
.qset-body {
  padding: 4px 18px 16px;
  border-top: 1px dashed #c9dde2;
}
.qs-d {
  border: 1.5px solid #cfe0e4;
  border-radius: 14px;
  margin: 10px 0;
  background: #fbfdfd;
}
.qs-d > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--teal, #0f4c5c);
}
.qs-b {
  padding: 4px 12px 14px;
}
.qs-b h4 {
  margin: 14px 0 6px;
  color: var(--teal, #0f4c5c);
}
.qs-b .in {
  width: 100%;
  margin: 5px 0;
  box-sizing: border-box;
}
.qs-edit {
  margin: 8px 0;
  padding: 8px;
  border: 1px dashed #c9dde2;
  border-radius: 12px;
}
.qs-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.qs-line .in {
  flex: 1;
  min-width: 120px;
}
.qs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #d6e5e8;
  border-radius: 12px;
  padding: 8px 10px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.qs-ic {
  font-size: 20px;
  opacity: 0.8;
}
.qs-t {
  flex: 1;
  min-width: 0;
}
.qs-t b {
  display: block;
  overflow-wrap: anywhere;
}
.qs-t small {
  opacity: 0.7;
}
.qs-bar {
  height: 12px;
  background: #e8eee9;
  border-radius: 8px;
  overflow: hidden;
}
.qs-bar i {
  display: block;
  height: 100%;
}
.qdrag {
  outline: 3px solid #f4b400;
  box-shadow: 0 10px 26px #0006;
  transform: scale(1.02);
  position: relative;
  z-index: 5;
  opacity: 0.95;
}
body.qdragging {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.qpend {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(40px + env(safe-area-inset-bottom));
  z-index: 80;
  background: #0e3f4a;
  color: #fff;
  border: 2px solid #f4b400;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  font-weight: 700;
}
.qgh {
  margin: 14px 0 8px;
  color: var(--teal, #0f4c5c);
}
details.qg {
  border: 2px solid #7fb9c4;
  border-radius: 18px;
  margin: 10px 0;
  background: #fff;
  overflow: hidden;
}
details.qg > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 18px;
  color: var(--teal, #0f4c5c);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.qg > summary::-webkit-details-marker {
  display: none;
}
details.qg > summary:after {
  content: "▾";
  transition: transform 0.2s;
}
details.qg[open] > summary:after {
  transform: rotate(180deg);
}
.qg-b {
  padding: 6px 12px 16px;
  border-top: 1px dashed #c9dde2;
}
.qg-b .box {
  box-shadow: none;
  border: 1px solid #e3ece9;
  margin: 10px 0;
}
#qs-root > details.qs-d {
  margin: 10px 0;
}
.qb-box {
  border: 1px solid #cfe3e6;
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
  background: #fff;
}
.qb-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.qb-box .in {
  width: 100%;
  margin: 6px 0;
  box-sizing: border-box;
}
.qb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qb-row label {
  flex: 1;
  min-width: 110px;
  font-size: 13px;
}
.qb-sw {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.qb-m {
  min-height: 18px;
  font-size: 13px;
  margin-top: 6px;
}
.qb-ar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
}
.qb-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f4c5c;
  color: #fff;
  text-align: center;
  padding: 24px;
}
.qb-fb {
  max-width: 360px;
}
.qb-fi {
  font-size: 56px;
}
.qb-fb h1 {
  margin: 10px 0;
}
.qb-fb p {
  opacity: 0.9;
  line-height: 1.7;
}
.qb-pin {
  background: #fff6d6;
  border: 1px solid #e8d48a;
  color: #5a4a00;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-weight: 600;
}
.qb-sp {
  position: fixed;
  top: 56px;
  left: 8px;
  right: 8px;
  max-width: 420px;
  max-height: 70vh;
  overflow: auto;
  background: #fffdf8;
  border: 1px solid #d8d2c4;
  border-radius: 14px;
  box-shadow: 0 8px 30px #0003;
  z-index: 9999;
  padding: 10px;
  direction: rtl;
}
.qb-sph {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.qb-spi {
  padding: 8px 4px;
  border-top: 1px solid #eee;
}
.qb-spi.new {
  background: #eaf6f1;
}
.qb-spi small {
  color: #777;
}
.qw-crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-weight: 700;
}
.qw-back {
  border: 0;
  background: #0f4c5c;
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  min-height: 48px;
}
.qw-path {
  color: #456;
  font-size: 14px;
  margin-bottom: 8px;
}
.qw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qw-b {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 2px solid #9cc7cf;
  border-radius: 16px;
  background: #fff;
  color: #0f4c5c;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.qw-b span {
  font-size: 30px;
}
.qw-b small {
  font-weight: 400;
  color: #678;
}
.qw-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  border: 2px dashed #3f9b6e;
  border-radius: 16px;
  background: #eaf6f1;
  color: #17603f;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.qw-prog {
  height: 14px;
  background: #e3eef0;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.qw-prog i {
  display: block;
  height: 100%;
  width: 0;
  background: #3f9b6e;
  transition: width 0.3s;
}
.qw-link {
  margin: 10px 0;
}
.qw-link summary {
  padding: 12px;
  min-height: 44px;
}
.qc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin: 0 0 14px;
  border-radius: 16px;
  background: #c8a96b;
  color: #2f3d36;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}
.qc-wrap {
  container-type: inline-size;
  margin: 10px 0;
}
.qc {
  aspect-ratio: 1275/901;
  background: #f5f0e4;
  border: 0.6cqw solid #7a9a86;
  border-radius: 1.2cqw;
  padding: 1.2cqw;
  box-sizing: border-box;
  color: #2f4a40;
}
.qc-in {
  height: 100%;
  border: 0.15cqw solid #b9c9bd;
  border-radius: 0.8cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.3cqw;
  padding: 2cqw;
  box-sizing: border-box;
}
.qc-seal {
  display: block;
  width: auto;
  height: 11cqw;
  max-width: 78%;
  margin: 0 auto;
  flex-shrink: 0;
}
.qc-org {
  font-size: 2.6cqw;
  font-weight: 700;
  color: #5f8a76;
}
.qc-in h1 {
  font-size: 7cqw;
  margin: 0;
  color: #2f4a40;
}
.qc-sub {
  font-size: 2.3cqw;
  color: #6d7d74;
}
.qc-name {
  font-size: 6cqw;
  font-weight: 700;
  color: #3c6a58;
}
.qc-line {
  width: 36cqw;
  height: 0.25cqw;
  background: #c8a96b;
}
.qc-txt {
  font-size: 2.5cqw;
  line-height: 1.8;
  color: #3a5248;
}
.qc-meta {
  display: flex;
  gap: 4cqw;
  justify-content: center;
  font-size: 2cqw;
  color: #6d7d74;
  flex-wrap: wrap;
}
.qc-meta b {
  color: #2f4a40;
}
.qc-by {
  font-size: 1.7cqw;
  color: #8a9a90;
}
@media print {
  body > *:not(#app) {
    display: none;
  }
  .top,
  .back,
  .badge,
  .qtick,
  .bubbles,
  #qc-p {
    display: none !important;
  }
}
@media (max-width: 420px) {
  .top {
    gap: 6px;
  }
  .top .pill {
    padding: 8px 10px;
    font-size: 13px;
  }
  .top .lpill {
    max-width: 96px;
  }
}
#bellp,
#bellp *:not(button):not(.btn),
.qb-sp,
.qb-sp *:not(button) {
  color: #1c2a30 !important;
}
#bellp small,
#bellp [style*="color:#777"],
.qb-spi small {
  color: #55656b !important;
}
#bellp button.bdis {
  color: #0f4c5c !important;
}
#bellp,
.qb-sp {
  background: #fffdf8 !important;
}
#bellp .btn.y {
  color: #1c2a30 !important;
}
.th-dark .qb-box {
  background: #202d32;
  border-color: #3a4c52;
}
.th-dark .qw-b {
  background: #202d32;
  border-color: #3f6a73;
  color: #d6efe9;
}
.th-dark .qw-b small {
  color: #a9bbb5;
}
.th-dark .qw-pick {
  background: #1d3a30;
  color: #bfe6d6;
}
.th-dark .qb-pin {
  background: #3a3516;
  border-color: #6b5f22;
  color: #f1e3a2;
}
.th-dark .qb-sw,
.th-dark .qb-m {
  color: inherit;
}
.th-dark details.qg {
  background: #1b272c;
  border-color: #3f6a73;
}
.th-dark details.qg > summary {
  color: #bfe6dc;
}
.th-dark .qs-edit,
.th-dark .qs-row {
  background: #202d32;
  color: #e6eeea;
}

/* qc: support chat */
.qx-bdg { position:absolute; top:-6px; left:-6px; background:#d9534f; color:#fff; border-radius:10px; min-width:18px; height:18px; font-size:11px; line-height:18px; text-align:center; padding:0 4px; }
.qx-panel { position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column; background:var(--cream,#fff8e7); color:var(--ink,#14323b); }
.qx-h { display:flex; align-items:center; gap:10px; padding:12px 14px; background:#0f4c5c; color:#fff; }
.qx-h b { flex:1; font-size:17px; }
.qx-back, .qx-close { background:#fff; color:#0f4c5c; border:0; border-radius:20px; padding:8px 14px; font:inherit; font-weight:700; cursor:pointer; }
.qx-body { flex:1; display:flex; flex-direction:column; min-height:0; padding:10px; }
.qx-list { flex:1; overflow:auto; display:flex; flex-direction:column; gap:8px; padding:4px 2px; }
.qx-m { display:flex; }
.qx-m.me { justify-content:flex-start; }
.qx-m.ot { justify-content:flex-end; }
.qx-w { max-width:82%; padding:9px 12px; border-radius:14px; line-height:1.6; word-break:break-word; }
.qx-m.me .qx-w { background:#d8efe8; color:#14323b; }
.qx-m.ot .qx-w { background:#fff; color:#14323b; border:1px solid #d8d2c4; }
.qx-w small { display:block; opacity:.7; font-size:11px; margin-top:3px; }
.qx-img { display:block; max-width:100%; max-height:240px; border-radius:10px; margin-bottom:6px; cursor:pointer; }
.qx-prev { align-items:center; gap:10px; padding:6px 0; }
.qx-prev img { width:64px; height:64px; object-fit:cover; border-radius:10px; }
.qx-x { background:#fff; border:1px solid #d9534f; color:#b94a3b; border-radius:16px; padding:6px 10px; font:inherit; cursor:pointer; }
.qx-in { display:flex; gap:8px; align-items:flex-end; padding-top:8px; }
.qx-in textarea { flex:1; border:1px solid #b8c9c4; border-radius:14px; padding:10px; font:inherit; font-size:16px; resize:none; background:#fff; color:#14323b; }
.qx-cam { width:46px; height:46px; display:flex; align-items:center; justify-content:center; font-size:22px; background:#fff; border:1px solid #b8c9c4; border-radius:50%; cursor:pointer; }
.qx-send { background:#0f4c5c; color:#fff; border:0; border-radius:22px; padding:12px 18px; font:inherit; font-weight:700; cursor:pointer; }
.qx-send:disabled { opacity:.5; }
.qx-err { color:#b94a3b; min-height:18px; font-size:13px; padding-top:4px; }
.qx-conv { display:flex; flex-direction:column; gap:8px; overflow:auto; }
.qx-c { display:flex; justify-content:space-between; align-items:center; gap:10px; background:#fff; color:#14323b; border:1px solid #d8d2c4; border-radius:14px; padding:12px 14px; font:inherit; text-align:right; cursor:pointer; }
.qx-c span { display:flex; flex-direction:column; gap:2px; min-width:0; }
.qx-c small { opacity:.7; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qx-n { background:#d9534f; color:#fff; border-radius:12px; min-width:24px; height:24px; line-height:24px; text-align:center; font-style:normal; font-size:13px; padding:0 6px; }
.qs-line select.in { min-height: 46px; font-size: 16px; padding: 8px 10px; }
.qd-pr { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:8px 0; }
.qd-p { display:flex; flex-direction:column; align-items:center; gap:6px; background:#fff; color:#14323b; border:2px solid #cfe0db; border-radius:14px; padding:12px 8px; font:inherit; font-weight:700; cursor:pointer; }
.qd-p i { display:inline-block; width:100%; height:12px; border-radius:6px; }
.qd-cu { display:flex; flex-direction:column; gap:10px; margin:8px 0; }
.qd-cu label { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.qd-cu input[type=color] { width:70px; height:44px; border:1px solid #b8c9c4; border-radius:10px; padding:2px; background:#fff; }

/* qk: visible buttons in every mode */
:root { color-scheme: only light; }
body.th-dark { color-scheme: dark; }
.qk-btn { background:#f4b400 !important; color:#0a3641 !important; border:2px solid #0a3641 !important; box-shadow:0 4px 0 #0a3641; font-weight:800; min-height:54px; font-size:18px; }
.qk-btn:active { transform:translateY(2px); box-shadow:0 2px 0 #0a3641; }
.qk-btn:disabled { opacity:.9; cursor:wait; }
.qk-load::before { content:""; display:inline-block; width:16px; height:16px; margin-inline-end:8px; vertical-align:-3px; border:3px solid #0a364155; border-top-color:#0a3641; border-radius:50%; animation:qkspin .8s linear infinite; }
@keyframes qkspin { to { transform:rotate(360deg); } }
body.th-dark .qk-btn { border-color:#fff3c4 !important; box-shadow:0 4px 0 #fff3c4; }
body.th-dark .btn:not(.y):not(.r) { color:#0a2a30; }
body.th-dark .btn.y { background:#f4b400; color:#0a3641; }
body.th-dark header.top { background:#0f4c5c; }
body.th-dark .hero { background:linear-gradient(135deg,#0f4c5c,#17707f); }
body.th-dark .tab.on, body.th-dark .dopt .seg button.on { background:#8fd1c2; color:#0a2a30; border-color:#8fd1c2; }
/* ticker always scrolls in one line, even with reduced-motion / remove-animations */
.qtick { height:34px !important; min-height:34px !important; padding:0 !important; }
.qtick-in, .qtick-in span { white-space:nowrap !important; text-align:start !important; text-decoration:none !important; }
.qtick-in { display:inline-block !important; animation:qtickltr 36s linear infinite !important; }
@media (prefers-reduced-motion: reduce) {
  .qtick-in { animation:qtickltr 36s linear infinite !important; }
}
/* view-only images for non-owners: no long-press menu, no drag, no selection */
body:not(.qx-own) img, body:not(.qx-own) canvas, body:not(.qx-own) svg {
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.qe-item{background:#fff;border:1px solid #e4e7ee;border-radius:12px;padding:10px;margin:8px 0;color:#222}
.qe-o{padding:3px 0;font-size:14px}.qe-ok{color:#1d7a4a;font-weight:700}
.qe-bt{margin-top:8px;display:flex;gap:8px}
.qe-form{margin-top:14px;border-top:1px dashed #cfd5e2;padding-top:10px}
.qe-row{display:flex;align-items:center;gap:8px;margin:6px 0}.qe-row .in{flex:1;margin:0}

#qp-bar{position:fixed;left:8px;right:8px;bottom:56px;z-index:9998;background:#0f4c5c;color:#fff;border-radius:14px;padding:10px 12px;display:flex;align-items:center;gap:10px;font-size:14px;box-shadow:0 4px 14px rgba(0,0,0,.25)}
#qp-bar span{flex:1}#qp-bar button{border:0;border-radius:10px;padding:8px 14px;font-weight:700;background:#f5b400;color:#0f4c5c}
#qp-bar #qp-x{background:transparent;color:#fff;padding:6px 8px}

.qn-edit{background:#f5b400;border:0;border-radius:50%;width:32px;height:32px;font-size:15px;vertical-align:middle;margin-inline-start:6px;padding:0}
.qn-note{margin:2px 0 10px;padding:8px 12px;background:#fff;border-inline-start:4px solid #f5b400;border-radius:10px;color:#0f4c5c;font-size:15px;white-space:pre-wrap}
.qn-ov{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px}
.qn-box{max-width:380px;width:100%;margin:0}

#qa-bar{margin:10px 0}#qa-bar .btn{width:100%}
.qa-del{margin-top:8px;background:#fde8e4;color:#b94a3b;border:0;border-radius:10px;padding:8px 14px;font-weight:700}
.qa-open{width:100%;margin:6px 0}

.viewer.qa-it>.vt{cursor:pointer;display:flex;align-items:center;gap:8px;padding:6px 0;font-size:17px}
.viewer.qa-it>.vt::before{content:attr(data-n) "/";color:#b8860b;font-weight:800}
.viewer.qa-it>.vt::after{content:"‹";margin-inline-start:auto;font-size:22px;color:#0f4c5c;transition:transform .2s}
.viewer.qa-it.open>.vt::after{transform:rotate(-90deg)}
.viewer.qa-it.loading>.vt::after{content:"…"}

.qa-pv{position:relative;max-height:300px;overflow:hidden;border-radius:12px;border:1px solid #e4e7ee;cursor:pointer;background:#fff}
.qa-pv canvas{display:block;width:100%}
.qa-pvh{position:absolute;left:0;right:0;bottom:0;z-index:2;background:linear-gradient(transparent,rgba(15,76,92,.92));color:#fff;text-align:center;padding:26px 8px 8px;font-size:14px;font-weight:700}
.qa-fs{position:fixed;inset:0;z-index:99990;background:#1c2a30;display:flex;flex-direction:column}
.qa-fsb{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#0f4c5c;color:#fff;font-weight:700}
.qa-fsb .btn{padding:8px 16px}
.qa-fss{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:8px;touch-action:pan-x pan-y pinch-zoom}
.qa-fsp{margin:0 auto 10px;max-width:1100px;background:#fff;border-radius:6px}
.qa-fsp canvas{display:block;width:100%}
.qa-fsb .btn{width:auto!important;flex:none;margin:0}.qa-fsb span{flex:none;white-space:nowrap;font-size:16px}

.qa-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.qa-a{border:0;border-radius:10px;padding:8px 12px;font-weight:700;background:#e8f1f3;color:#0f4c5c}
.qa-a.qa-del{background:#fde8e4;color:#b94a3b;margin-top:0}

.qa-card{margin-top:12px}.qa-chk{display:flex;flex-direction:column;gap:6px;margin:6px 0 10px}.qa-chk label{display:flex;align-items:center;gap:8px;font-size:15px}.qa-chk input{width:20px;height:20px}
.qa-fsn{position:absolute;bottom:18px;left:0;right:0;display:flex;justify-content:center;gap:14px;pointer-events:none}
.qa-fsa{pointer-events:auto;width:56px;height:56px;border-radius:28px;border:0;background:#0f4c5c;color:#fff;font-size:34px;line-height:1;box-shadow:0 2px 10px #0006;opacity:.92}
@media (max-width: 480px) {
  header.top { flex-wrap: wrap; row-gap: 8px; }
  header.top #qh-home { order: 20; flex: 1 0 100%; text-align: center; padding: 9px 12px; font-size: 15px; }
}
@media (max-width: 480px) {
  header.top { padding: 8px 10px; gap: 5px; row-gap: 6px; }
  header.top .pill { padding: 6px 9px; font-size: 12.5px; }
  header.top .lpill { max-width: 82px; }
  header.top #qh-home { padding: 7px 12px; font-size: 14px; }
}
@media (max-width: 480px) { header.top .qh-l { display: none; } header.top .lpill { max-width: 66px; } }

.qy-sp{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:8px 0}
.qy-sp span{font-weight:700;font-size:14px}
.qy-b{border:1.5px solid #0f4c5c;background:#fff;color:#0f4c5c;border-radius:20px;padding:6px 14px;font:inherit;font-size:14px;font-weight:700;min-height:36px}
.qy-b.on{background:#0f4c5c;color:#fff}
.qy-n{width:100%;text-align:center;color:#555;font-size:12px}

/* qy: four looks, white / black / gray / calm. High specificity so they win over the owner colour group. */
html body.th-white{--cream:#fff;--card:#f3f3f3;--mute:#555;--ink:#111;--teal:#222;--deep:#222;background:#fff}
html body.th-white header.top{background:#222}
html body.th-white .hero{background:linear-gradient(135deg,#333,#555)}
html body.th-white h1,html body.th-white h2{color:#111}
html body.th-white .card{border:1px solid #ddd}
html body.th-white .tab.on{background:#222;color:#fff}
html body.th-white .sup-num{color:#111}
html body.th-black,html body.th-dark{--cream:#000;--card:#161616;--mute:#b8b8b8;--ink:#f2f2f2;--teal:#e6e6e6;--deep:#e6e6e6;background:#000;color-scheme:dark}
html body.th-dark header.top{background:#000;border-bottom:1px solid #333}
html body.th-dark .hero{background:linear-gradient(135deg,#111,#2a2a2a)}
html body.th-dark h1,html body.th-dark h2{color:#fff}
html body.th-dark .card{border:1px solid #333}
html body.th-dark .tab.on,html body.th-dark .dopt .seg button.on{background:#e6e6e6;color:#000;border-color:#e6e6e6}
html body.th-dark .sup-num{color:#fff}
html body.th-dark .btn:not(.y):not(.r):not(.wa){background:#2a2a2a;color:#fff;border:1px solid #555}
html body.th-dark .in{background:#111;color:#f2f2f2;border-color:#444}
html body.th-gray{--cream:#d6d6d6;--card:#ebebeb;--mute:#444;--ink:#1a1a1a;--teal:#333;--deep:#333;background:#d6d6d6}
html body.th-gray header.top{background:#3b3b3b}
html body.th-gray .hero{background:linear-gradient(135deg,#4a4a4a,#6a6a6a)}
html body.th-gray h1,html body.th-gray h2{color:#222}
html body.th-gray .card{border:1px solid #bbb}
html body.th-gray .tab.on{background:#3b3b3b;color:#fff}
html body.th-gray .sup-num{color:#222}
html body.th-white .hero,html body.th-white .hero *,html body.th-gray .hero,html body.th-gray .hero *{color:#fff}
html body.th-white .hero p,html body.th-gray .hero p{color:#eee}
html body.th-calm{--cream:#efeadf;--card:#f7f3ea;--ink:#2f3a36;--mute:#66726b;--teal:#4a6a6e;--deep:#4a6a6e;--yellow:#dccfa6;background:#efeadf}
html body.th-calm header.top{background:#4f6f72}
html body.th-calm .hero{background:linear-gradient(135deg,#5b7a7c,#7b9496)}
html body.th-calm .btn.y,html body.th-calm .pill.y,html body.th-calm .qk-btn,html body.th-calm #qa-add{background:#dccfa6!important;color:#3d3a2c!important;border-color:#b9ab80!important;box-shadow:none!important}
html body.th-calm .btn.wa{background:#86a897}
html body.th-calm .btn.s{background:#6d8c8f;color:#fff}
html body.th-calm .card,html body.th-calm .viewer img,html body.th-calm .hero img,html body.th-calm .lock{filter:saturate(.5) brightness(1.03)}
html body.th-calm .qx-bdg,html body.th-calm #bellb{background:#b98b86!important}
html body.th-calm h1,html body.th-calm h2{color:#3d5558}
html body.th-calm .hero,html body.th-calm .hero *{color:#fff}
html body.th-calm .ic{background:#e3d9b8!important}
html body.th-calm #qp-bar{background:#4f6f72}
html body.th-calm #qp-bar button{background:#dccfa6;color:#3d3a2c}
html body.th-calm .done-btn{background:#eef0e8;border-color:#b9c6b5;color:#3d5558}
html body.th-calm .done-btn.on{background:#cfdccf;border-color:#9fb59f;color:#2f4a3a}
html body.th-dark .done-btn{background:#1d1d1d;border-color:#444;color:#eee}
html body.th-dark .done-btn.on{background:#26352c;border-color:#5a7a63;color:#e4f2e8}
html body.th-white .done-btn,html body.th-gray .done-btn{background:#f1f5f1;border-color:#b9c9bc;color:#222}

/* qz-glow: soften glowing text and show the whole welcome picture (approved by user, msg 60661494); soft moving pastel glow approved msg 60719109 */
body{--qug:2}
.hero h1.neon-h{color:#fff;text-shadow:0 0 calc(var(--qug)*3px) rgba(216,243,230,calc(var(--qug)/3)),0 0 calc(var(--qug)*7px) rgba(174,230,245,calc(var(--qug)/3)),0 0 calc(var(--qug)*14px) rgba(205,188,245,calc(var(--qug)/3.5)),0 0 calc(var(--qug)*21px) rgba(185,165,240,calc(var(--qug)/4)),0 1px 2px rgba(0,0,0,.35);animation:qzsoft 12s ease-in-out infinite}
@keyframes qzsoft{0%,to{color:#d8f3e6}25%{color:#d6e9fa}50%{color:#e6ddf7}75%{color:#fbeadd}}
@media (prefers-reduced-motion: reduce){.hero h1.neon-h{animation:none;color:#e6ddf7}}
.neon{animation:none;text-shadow:0 1px 2px rgba(0,0,0,.4);box-shadow:0 1px 4px rgba(0,0,0,.25)}
.badge{animation:none;text-shadow:0 0 calc(var(--qug)*3.5px) rgba(255,255,255,calc(var(--qug)*.375)),0 0 calc(var(--qug)*8px) rgba(174,230,245,calc(var(--qug)*.275))}
.badge b{text-shadow:0 0 calc(var(--qug)*3.5px) rgba(255,224,130,calc(var(--qug)*.5)),0 0 calc(var(--qug)*8px) rgba(255,201,77,calc(var(--qug)*.5))}
.qfl-pole{animation:none;filter:none}
html body.th-calm .hero img{filter:none}
@media (max-width:620px){.hero img{height:auto}}

/* qz-segon: make the selected option unmistakable even under phone forced dark mode (bug report 60676367) */
.dopt .seg button.on{font-weight:800}
.dopt .seg button.on::before{content:"✓ "}

/* qu-: display controls (glow intensity + screen brightness), Aa panel, saved per device */
#qu-dim{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;z-index:99998;display:none}
body.qug0 .hero h1.neon-h{animation:none}

/* ☰ menu (settings + my certificates) */
.qmenu {
  position: fixed;
  top: 60px;
  left: 8px;
  min-width: 180px;
  background: var(--card);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 34px #00000047;
  z-index: 9999;
  padding: 8px;
  direction: rtl;
}
.qmenu .qmenu-i {
  display: block;
  width: 100%;
  text-align: right;
  padding: 12px 14px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
}
.qmenu .qmenu-i:hover, .qmenu .qmenu-i:active { background: var(--bord, #e5e5e5); }

/* qu- sliders (glow + brightness) */
.qsl{display:flex;align-items:center;gap:8px;margin:4px 0 10px}
.qsl input[type=range]{flex:1;min-width:0;accent-color:#0f4c5c;height:34px;direction:ltr;cursor:pointer}
.qsl .pill{min-width:42px;min-height:38px;font-size:16px}
.qm-ov{position:fixed;inset:0;z-index:9998;background:rgba(0,0,0,.5);display:flex;align-items:flex-start;justify-content:center;padding:16px;overflow:auto}
.qm-box{background:var(--cream,#fff);color:inherit;border-radius:18px;padding:16px;width:100%;max-width:520px;margin:auto 0}
.qm-course{display:flex;align-items:center;gap:10px;width:100%;border:2px solid var(--teal,#0f4c5c);background:transparent;color:inherit;border-radius:14px;padding:12px;font:inherit;cursor:pointer;text-align:start}
.qm-ic{font-size:26px}.qm-t{flex:1;font-weight:700}
.qm-d{margin-top:10px}
.qm-bar{background:#dfe8e4;border-radius:10px;height:12px;overflow:hidden;margin:4px 0}
.qm-bar i{display:block;height:100%;background:#3f9b6e}
.qm-all{margin-bottom:12px}.qm-all small{display:block;opacity:.75;font-size:12px}
.qm-p{margin:10px 0}.qm-r{display:flex;justify-content:space-between}.qm-e{font-size:13px;opacity:.9;margin-top:2px}
.qa-pvw{border:2px solid var(--teal,#0f4c5c);border-radius:14px;padding:8px;margin-top:6px;background:rgba(15,76,92,.04)}
.qa-pvt{font-weight:700;margin:2px 4px 8px}
.qa-pvb{width:100%;margin-top:8px}

@page { size: A4 landscape; margin: 0; }
#qc-print { display: none; }
@media print {
  body.qc-printing { display: block !important; background: #fff !important; margin: 0 !important; }
  body.qc-printing > *:not(#qc-print) { display: none !important; }
  body.qc-printing #qc-print { display: flex !important; align-items: center; width: 100vw; height: 100vh; overflow: hidden; }
  body.qc-printing #qc-print .qc-wrap { width: 100%; margin: 0 !important; }
  body.qc-printing .qc, body.qc-printing .qc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.qc-acts .btn { margin: 4px; }
@media print {
  html:has(body.qc-printing) { background: #fff !important; height: 100vh !important; overflow: hidden !important; }
  body.qc-printing #qc-print { position: absolute !important; left: 0; top: 0; height: 99.5vh !important; page-break-after: avoid; break-after: avoid; }
  body.qc-printing #qc-print .qc { max-height: 99.5vh; }
}
.qb-bdg { background: #d9534f; color: #fff; border-radius: 10px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; text-align: center; box-sizing: border-box; display: inline-block; margin-inline-start: 6px; }
#qmenu-b > .qb-bdg { position: absolute; top: -6px; left: -6px; margin: 0; }
.qj-sw, .qj-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin: 6px 0; }
.qj-t { border: 0; border-radius: 20px; padding: 8px 14px; font-weight: 700; color: #fff; min-height: 40px; cursor: pointer; font-family: inherit; }
.qj-t.on { background: #2e8b57; } .qj-t.off { background: #c0392b; }
.qj-st { border: 1px solid #0002; border-radius: 12px; margin: 8px 0; padding: 8px; }
.qj-st > summary { cursor: pointer; }
.qj-blk { border-top: 1px solid #0002; margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.qj-blk .in { width: 100%; box-sizing: border-box; }
.qj-st button[disabled], .qj-blk button[disabled] { opacity: .35; cursor: not-allowed; }
.qp-x { margin-top: 12px; } .qp-bd { display: inline-block; background: #fff3d6; color: #5a4300; border-radius: 16px; padding: 6px 12px; margin: 4px; font-weight: 700; }
.qp-sv { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; } .qp-st { border: 1px solid #0003; border-radius: 10px; background: #fff; padding: 8px 10px; min-height: 40px; cursor: pointer; font-family: inherit; color: #333; }
.qp-q { border-top: 1px solid #0002; padding: 8px 0; }
.qc { position: relative; }
.qc-hasv { aspect-ratio: 1275/1040; }
.qc-hasv .qc-in { gap: 1.05cqw; }
.qc-v { display: flex; align-items: center; gap: 1.2cqw; font-size: 1.25cqw; color: #5f6f66; text-align: left; direction: ltr; align-self: flex-start; margin-top: .2cqw; }
@media print { body.qc-printing #qc-print .qc-wrap:has(.qc-hasv) { width: 122vh; margin: 0 auto; } }
.qc-v img { width: 9cqw; height: 9cqw; image-rendering: pixelated; background: #fff; padding: .4cqw; border-radius: .6cqw; }
body.qv-public .qtick, body.qv-public .qpwa, body.qv-public [id*=install], body.qv-public .qinst { display: none !important; }
body.qv-public #qp-bar { display: none !important; }
