/* The privacy page (privacy.html) */

/* Zhanote home: a landing page built like a stationery-shop notebook that collects a stamp for each language.
   The one bold thing is the stamps (あ 字 한); everything around them stays quiet. The cards, stamps and
   language names are filled in by make_home.py from ../languages.json: to add a language, add it there. */
:root {
  --paper: #f3f7f8;
  --paper-line: #dce6ea;
  --surface: #ffffff;
  --ink: #1b2442;
  --ink-2: #56607a;
  --rule: #d3dce0;
  --accent: #1e2b57;
  --on-accent: #ffffff;
  --mark: #ffe066;
  --mark-ink: #1b2442;
  --ok: #14734a;
  --margin: #e8a3a0;
  --tape: rgba(255, 214, 79, 0.72);
  --blend: multiply;
  --grid-ja: #9cc7b9;
  --grid-zh: #e2a49b;
  --grid-ko: #a9c4c9;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Gaegu", "Comic Neue", "Segoe Print", cursive;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --f-ja: "Klee One", "Hiragino Maru Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
  --f-ko: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --f-zh: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif CJK SC", "Songti SC", serif;
}
:root[data-theme="dark"] {
  --paper: #11161e;
  --paper-line: #18202b;
  --surface: #18202b;
  --ink: #e7ecf3;
  --ink-2: #a2adbe;
  --rule: #2b3646;
  --accent: #afc4f2;
  --on-accent: #111a33;
  --mark: #efd15f;
  --mark-ink: #1b1d0e;
  --ok: #74d6a4;
  --margin: #7a4b4e;
  --tape: rgba(239, 209, 95, 0.5);
  --blend: normal;
  --grid-ja: #46655a;
  --grid-zh: #7a4a44;
  --grid-ko: #44606a;
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--f-body);
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 28px 28px;
}
h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 16px;
}
section {
  padding-block: clamp(36px, 5.5vw, 64px);
}
h2 {
  font: 700 clamp(1.75rem, 3.6vw, 2.4rem) / 1.1 var(--f-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 {
  font: 700 1.3rem/1.2 var(--f-display);
  letter-spacing: -0.005em;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font: 600 1rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink-2));
}
.btn.quiet {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--surface);
}
.btn.quiet:hover {
  border-color: var(--ink-2);
}

/* ---------- stamps ---------- */
.stamp {
  display: block;
  color: var(--c);
  mix-blend-mode: var(--blend);
}
.stamp svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.ja {
  --c: var(--st-ja);
}
.zh {
  --c: var(--st-zh);
}
.ko {
  --c: var(--st-ko);
}
.ja .native {
  font-family: var(--f-ja);
}
.zh .native {
  font-family: var(--f-zh);
}
.ko .native {
  font-family: var(--f-ko);
}
:root {
  --st-ja: #2b8a6c;
  --st-zh: #c23b2e;
  --st-ko: #2f5da8;
}
:root[data-theme="dark"] {
  --st-ja: #6ccba8;
  --st-zh: #f27e6c;
  --st-ko: #8fb2f2;
}

/* ---------- hero ---------- */
.page {
  position: relative;
  aspect-ratio: 10/9;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  border: 1px solid var(--rule);
  border-radius: 4px 10px 10px 4px;
  background: var(--surface);
  transform: rotate(1.2deg);
  background-image:
    linear-gradient(
      90deg,
      transparent 15%,
      var(--margin) 15%,
      var(--margin) calc(15% + 1.5px),
      transparent calc(15% + 1.5px)
    ),
    repeating-linear-gradient(transparent 0 31px, var(--paper-line) 31px 32px);
}
.page::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 132px;
  height: 30px;
  margin-left: -66px;
  background: var(--tape);
  transform: rotate(-4deg);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px);
}
.page .stamp {
  position: absolute;
}
.page .h1 {
  left: 20%;
  top: 9%;
  width: 41%;
  --r: -9deg;
}
.page .h2 {
  left: 59%;
  top: 27%;
  width: 33%;
  --r: 7deg;
}
.page .stamp svg {
  transform: rotate(var(--r));
}
.hand {
  position: absolute;
  font: 700 1.45rem/1 var(--f-hand);
  color: var(--ink-2);
  white-space: nowrap;
}
.hand svg {
  position: absolute;
  width: 38px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
@keyframes press {
  0% {
    opacity: 0;
    transform: scale(1.4);
  }
  55% {
    opacity: 1;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes inkin {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.page .stamp {
  animation: press 0.5s cubic-bezier(0.3, 0.7, 0.3, 1) both;
}
.page .h1 {
  animation-delay: 0.25s;
}
.page .h2 {
  animation-delay: 0.6s;
}
.page .hand {
  animation: inkin 0.4s ease-out 1.45s both;
}
@media (max-width: 52rem) {
  .page {
    justify-self: center;
    max-width: 420px;
  }
}

/* ---------- languages ---------- */
.lang {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.lang .top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang .stamp {
  width: 84px;
  flex: none;
}
.lang .en {
  font: 600 0.95rem/1.2 var(--f-body);
  color: var(--ink-2);
}
.lang .native {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
}
.lang ul {
  display: grid;
  gap: 6px;
  border-top: 1px dashed var(--rule);
  padding-top: 14px;
  flex: 1;
}
.lang li {
  padding-left: 18px;
  position: relative;
  font-size: 0.98rem;
}
.lang li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--c);
}
.lang .btn {
  width: 100%;
}
.lang .free {
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* ---------- what's inside ---------- */

/* ---------- how it works ---------- */

/* ---------- install the app ---------- */
/* ---------- pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 52rem;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.plan.full {
  border: 2px solid var(--accent);
}
.plan ul {
  display: grid;
  gap: 8px;
  flex: 1;
  align-content: start;
}
.plan li {
  padding-left: 22px;
  position: relative;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.45em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.plan .btn {
  width: 100%;
}
@media (max-width: 44rem) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- questions ---------- */

/* ---------- closing ---------- */
.picks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 44px);
  margin-top: 32px;
}
.pick {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 118px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.pick .stamp {
  width: 100%;
  transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.pick:hover .stamp {
  transform: rotate(-6deg) scale(1.04);
}
@media (max-width: 30rem) {
  .pick {
    width: 92px;
  }
  .picks {
    gap: 16px;
  }
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  padding-block: 28px 40px;
  display: grid;
  gap: 10px;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.byline {
  font-size: 0.95rem;
}
.byline b {
  font: 700 1.05rem/1 var(--f-display);
  color: var(--ink);
}
.credits {
  max-width: 46rem;
  margin-inline: auto;
}
.foot-link {
  color: var(--ink-2);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .page .stamp,
  .page .hand {
    animation: none;
  }
  .btn,
  .pick .stamp {
    transition: none;
  }
}

/* ---------- privacy policy page ---------- */
.legal {
  padding-block: clamp(32px, 6vw, 64px);
}
.legal .wrap {
  max-width: 44rem;
}
.legal h1 {
  font: 800 clamp(2rem, 5vw, 3rem) / 1.05 var(--f-display);
  letter-spacing: -0.02em;
}
.legal .updated {
  color: var(--ink-2);
  font-size: 0.92rem;
  margin: 10px 0 28px;
}
.legal h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin: 34px 0 10px;
}
.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 12px;
}
.legal ul {
  display: grid;
  gap: 8px;
}
.legal li {
  padding-left: 20px;
  position: relative;
}
.legal li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-2);
}
.legal a:not(.btn) {
  color: var(--accent);
}
.legal .back {
  margin-top: 40px;
}

/* ---------- practice tabs on narrow phones: 5 or 6 tabs go in two rows of 3 ---------- */
@media (max-width: 420px) {
  .tabs[style*="--n: 5"],
  .tabs[style*="--n: 6"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 340px) {
  .tabs[style*="--n: 4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* radical tiles: a radical with 2 or 3 variant shapes fits its tile on a phone */
/* ---------- site bar: brand, study-language menu, and the menu for the language of the explanations ---------- */
.sitebar {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 30;
}
.sb-in {
  max-width: 70rem;
  margin-inline: auto;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font: 700 1.02rem/1.1 var(--f-display);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.sb-mark {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1.05rem/1 var(--f-body);
}
.sb-nav {
  display: flex;
  gap: 6px;
  flex: none;
}
.sb-dd {
  position: relative;
}
.sb-dd summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  font: 600 0.9rem/1 var(--f-body);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.sb-dd summary::-webkit-details-marker {
  display: none;
}
.sb-dd summary:hover,
.sb-dd[open] summary {
  border-color: var(--ink-2);
}
.sb-c {
  font-size: 0.7rem;
  color: var(--ink-2);
  transition: transform 0.12s;
}
.sb-dd[open] .sb-c {
  transform: rotate(180deg);
}
.flag {
  flex: none;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--rule);
}
.flag.globe {
  box-shadow: none;
  color: var(--ink-2);
}
.sb-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}
.sb-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 14.5rem;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(10, 16, 14, 0.18);
  display: grid;
  gap: 2px;
}
.sb-h {
  margin: 0;
  padding: 6px 8px 4px;
  font: 600 0.7rem/1 var(--f-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sb-i {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}
.sb-i small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-2);
  margin-top: 1px;
}
a.sb-i:hover {
  background: var(--paper);
}
.sb-i.cur {
  background: var(--paper);
}
button.sb-i {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  background: none;
  cursor: pointer;
}
button.sb-i:hover {
  background: var(--paper);
}
.sb-i:not(.cur) .sb-tick {
  visibility: hidden;
}
.sb-tick {
  color: var(--ok, #14734a);
  font-size: 0.9rem;
}
.sw {
  display: inline-flex;
  flex: none;
}
.sw i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--surface);
  margin-left: -4px;
}
.sw i:first-child {
  margin-left: 0;
  box-shadow: 0 0 0 1px var(--rule);
}
@media (max-width: 30rem) {
  .sb-brand > span:last-child {
    display: none;
  }
  .sb-nav {
    gap: 5px;
  }
}
.sb-sep {
  height: 1px;
  background: var(--rule);
  margin: 4px 2px;
}
@media (max-width: 30rem) {
  .sb-brand {
    font-size: 0.95rem;
  }
  .sb-dd summary {
    padding: 0 8px;
    gap: 6px;
  }
}
/* small screens: the menus open under the whole bar, inside the screen, instead of hanging off the button */
@media (max-width: 26rem) {
  .sb-name {
    display: none;
  }
  .sb-in {
    padding-inline: 12px;
    gap: 6px;
  }
}
@media (max-width: 40rem) {
  .sb-dd {
    position: static;
  }
  .sb-menu {
    left: 12px;
    right: 12px;
    top: calc(100% + 4px);
    min-width: 0;
  }
}
/* moving between the home page and a language fades one page out and the next one in */
html {
  background: var(--paper);
  scrollbar-gutter: stable;
}
body {
  animation: nbPageIn 0.38s ease-out both;
}
body.nb-leaving {
  opacity: 0;
  transition: opacity 0.22s ease-in;
}
@keyframes nbPageIn {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  body.nb-leaving {
    transition: none;
  }
}
/* menus fade and slide in, and fade out again when the pointer leaves */
.sb-dd summary {
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.sb-dd summary:hover,
.sb-dd[open] summary {
  background: var(--surface);
}
.sb-dd[open] .sb-menu {
  animation: sbIn 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sbIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.sb-i {
  transition: background-color 0.12s;
}
.sb-c {
  transition: transform 0.18s;
}
@media (prefers-reduced-motion: reduce) {
  .sb-c,
  .sb-dd summary,
  .sb-i {
    transition: none;
  }
  .sb-dd[open] .sb-menu {
    animation: none;
  }
}
/* ---------- account button, log in and unlock dialogs, and locked parts ---------- */
.sb-acct summary {
  gap: 6px;
}
.acct-ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.acct-dlg {
  width: min(26rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 24px 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(10, 16, 30, 0.28);
  font-family: var(--f-body);
}
.acct-dlg::backdrop {
  background: rgba(12, 18, 30, 0.45);
}
.acct-dlg h2 {
  margin: 0 0 10px;
  font: 700 1.35rem/1.2 var(--f-display);
  padding-right: 28px;
}
.acct-dlg p {
  margin: 0 0 12px;
}
.acct-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.acct-x:hover {
  background: var(--paper);
}
.acct-dlg .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: 600 1rem/1 var(--f-body);
  cursor: pointer;
}
.acct-dlg .btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.acct-dlg .btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.acct-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  background: var(--surface);
}
.acct-google:hover {
  border-color: var(--ink-2);
}
.acct-google svg {
  width: 20px;
  height: 20px;
}
.acct-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.85rem;
  margin: 14px 0 !important;
}
.acct-or::before,
.acct-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}
.acct-form {
  display: grid;
  gap: 10px;
}
.acct-form label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 0.92rem;
}
.acct-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem var(--f-body);
}
.acct-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.acct-hint,
.acct-note {
  font-size: 0.88rem;
  color: var(--ink-2);
}
.acct-err {
  color: #b3261e;
  font-size: 0.92rem;
}
.acct-err:empty {
  display: none;
}
.acct-switch {
  margin: 16px 0 0 !important;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.acct-switch button {
  border: 0;
  background: none;
  color: var(--accent);
  font: 600 0.92rem var(--f-body);
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}
.acct-list {
  margin: 0 0 16px;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
.acct-test {
  font-size: 0.85rem;
  background: var(--mark, #ffe066);
  color: var(--mark-ink, #1b2442);
  padding: 6px 10px;
  border-radius: 8px;
}
:root[data-theme="dark"] .acct-err {
  color: #ff8a80;
}
/* locked parts of the free version */
.locked {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding: 28px 18px;
  border: 1.5px dashed var(--rule);
  border-radius: 12px;
  background: var(--paper);
  margin: 8px 0;
}
.locked .meta {
  margin: 0 0 6px;
  max-width: 30rem;
}
.locked .btn {
  width: auto;
}
/* ---------- the person button and its menu ---------- */
.sb-acct summary {
  padding: 0 6px 0 6px;
  min-width: 40px;
  justify-content: center;
}
.sb-acct summary .acct-face {
  width: 28px;
  height: 28px;
}
.acct-face {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--paper);
}
.acct-ini {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-family: var(--f-body);
}
.sb-acct .sb-menu {
  min-width: 16rem;
}
.sb-acct .sb-i {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.sb-acct .sb-i .acct-ic {
  color: var(--ink-2);
}
/* ---------- panels: back button, settings, account ---------- */
.acct-bk {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 600 0.9rem/1 var(--f-body);
  padding: 8px 8px 8px 2px;
  border-radius: 8px;
  cursor: pointer;
}
.acct-bk:hover {
  color: var(--ink);
  background: var(--paper);
}
.acct-bk svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.acct-dlg:has(.acct-bk) {
  padding-top: 52px;
}
.acct-sec {
  margin: 14px 0 8px !important;
  font: 600 0.7rem/1 var(--f-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.acct-grp {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.acct-lab {
  font-weight: 600;
  font-size: 0.92rem;
}
.acct-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
}
.acct-seg button {
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink);
  font: 500 0.9rem/1 var(--f-body);
  padding: 9px 0;
  cursor: pointer;
}
.acct-seg button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}
.acct-pals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.acct-pals button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.85rem/1.25 var(--f-body);
  padding: 9px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.acct-pals button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.acct-pals .sw i {
  width: 12px;
  height: 12px;
}
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
}
.acct-row b {
  font-size: 0.95rem;
}
.acct-row small {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-2);
  margin-top: 2px;
}
.acct-sw {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  border: 0;
  background: #c3c9d4;
  cursor: pointer;
  flex: none;
  transition: background 0.2s;
}
.acct-sw i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.acct-sw.on {
  background: var(--accent);
}
.acct-sw.on i {
  transform: translateX(18px);
}
/* furigana switched off in Profile → Learning: the kanji stay, the small kana above them go */
html[data-furi="off"] ruby rt {
  display: none;
}
.acct-sw:focus-visible,
.acct-seg button:focus-visible,
.acct-pals button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.acct-foot {
  margin-top: 12px !important;
}
.acct-pic {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.acct-pic > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.acct-lnk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 3px 0;
  color: var(--accent);
  font: 600 0.9rem/1.2 var(--f-body);
  cursor: pointer;
  text-decoration: none;
}
.acct-lnk.mute {
  color: var(--ink-2);
  font-weight: 500;
}
.acct-lnk .acct-ic {
  width: 16px;
  height: 16px;
}
.acct-fld {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.acct-fld > span {
  font-weight: 600;
}
.acct-fld input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem var(--f-body);
}
.acct-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--paper);
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.acct-val b {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.acct-g svg {
  width: 16px;
  height: 16px;
}
.acct-ok {
  color: var(--ok, #14734a);
  font-weight: 600;
}
.acct-rowbtn {
  width: 100%;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.acct-rowbtn:hover {
  border-color: var(--ink-2);
}
.acct-chev {
  font-size: 1.2rem;
  color: var(--ink-2);
}
.acct-cta {
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px;
  background: var(--paper);
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.acct-cta > b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.acct-cta p {
  margin: 0 !important;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.acct-dlg .btn.sm {
  min-height: 38px;
  font-size: 0.9rem;
  margin-top: 0;
}
.acct-sub {
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
}
.acct-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.acct-two .btn {
  padding: 0 14px;
}
.acct-rules {
  list-style: none;
  margin: -2px 0 6px;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.acct-rules li::before {
  content: "○";
  display: inline-block;
  width: 18px;
}
.acct-rules li.on {
  color: var(--ok, #14734a);
}
.acct-rules li.on::before {
  content: "✓";
  font-weight: 700;
}
.acct-pwmsg {
  margin: 0 0 8px !important;
  font-size: 0.88rem;
  font-weight: 600;
}
.acct-pwmsg:empty {
  display: none;
}
.acct-pwmsg.good {
  color: var(--ok, #14734a);
}
.acct-pwmsg.good::before {
  content: "✓ ";
}
.acct-pwmsg.bad {
  color: #b3261e;
}
.acct-msg {
  margin: 0 0 8px !important;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}
.acct-msg:empty {
  display: none;
}
.acct-msg.ok {
  color: var(--ok, #14734a);
}
.acct-msg.bad {
  color: #b3261e;
}
.acct-done {
  margin: 8px 0 !important;
  font-weight: 600;
  color: var(--ok, #14734a);
}
.acct-ask {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}
.acct-ask .acct-face {
  width: 60px;
  height: 60px;
}
.acct-ask h2 {
  padding: 0 !important;
  margin: 0 !important;
}
.acct-ask hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4px 0;
}
.acct-hi {
  margin: 0 !important;
  font-size: 1.05rem;
}
.acct-ask .btn {
  margin: 0;
}
:root[data-theme="dark"] .acct-pwmsg.bad,
:root[data-theme="dark"] .acct-msg.bad {
  color: #ff8a80;
}
@media (prefers-reduced-motion: reduce) {
  .acct-sw,
  .acct-sw i {
    transition: none;
  }
}
/* ---------- changing notebook (Stamp + Ripple) ---------- */
.nbsw {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
}
.nbsw-r {
  position: absolute;
  border-radius: 50%;
}
.nbsw-d {
  position: absolute;
  color: #fff;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}
.nbsw-mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.nbsw-stamp {
  position: relative;
}
.nbsw-ring {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}
.acct-right {
  align-self: flex-end;
  justify-self: end;
  margin: -4px 0 4px;
}
.acct-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}
.acct-icon .acct-ic {
  width: 24px;
  height: 24px;
}
.acct-icon.ok {
  background: var(--ok, #14734a);
  border-color: transparent;
  color: #fff;
}
.acct-ask .acct-hint {
  margin: 0 !important;
}

.acct-tourb {
  flex: none;
  font: inherit;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
}
.acct-tourb:hover {
  border-color: var(--ink-2);
}

/* ---------- writing check: after Check the writing box turns into the result, in the same place:
   the similarity, then yours and the model as two separate boxes, short notes and Write again ---------- */
@keyframes wcin {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* ---------- grammar quizzes: the box after a lesson, level checks, questions and the result ---------- */
/* the faint guide in the writing box has no stroke numbers, so you can try the order yourself first; Stroke order shows them */

/* ---------- the creator credit in the footer is a link ---------- */
.by-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
  border-radius: 4px;
}
.by-link:hover b {
  color: var(--accent);
}
