:root {
  --totink-site-ink: #2f2a27;
  --totink-site-muted: #6f625a;
  --totink-site-orange: #ef6f3b;
  --totink-site-blue: #2f7fc1;
  --totink-site-cream: #fff7e8;
  --totink-site-line: #eadbc7;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

html:root,
html:root body {
  overflow-x: clip !important;
}

.totink-site-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--totink-site-ink);
  border-radius: 6px;
  transform: translateY(-160%);
}

.totink-site-skip:focus {
  transform: translateY(0);
}

[data-totink-header] {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
}

.totink-site-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 901;
  width: 100%;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}

.totink-site-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--totink-site-orange), #ffd56a, var(--totink-site-blue));
  box-shadow: 0 0 14px rgba(255, 140, 90, 0.35);
  transition: width 90ms linear;
}

.totink-site-header {
  position: static;
  width: 100%;
  color: var(--totink-site-ink);
  background: rgba(255, 247, 232, 0.96);
  border-bottom: 1px solid var(--totink-site-line);
  backdrop-filter: blur(14px);
}

.totink-site-header *,
.totink-site-footer * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.totink-site-header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.totink-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--totink-site-ink);
  font: 900 30px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.totink-site-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(96, 64, 32, 0.12);
}

.totink-site-brand-tot {
  color: var(--totink-site-orange);
}

.totink-site-brand-ink {
  color: var(--totink-site-blue);
}

.totink-site-nav-shell {
  flex: 1 1 auto;
  min-width: 0;
}

.totink-site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  padding: 4px 0;
}

.totink-site-nav::-webkit-scrollbar {
  display: none;
}

.totink-site-nav a {
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--totink-site-muted);
  border-radius: 999px;
  font: 800 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.totink-site-nav a:hover,
.totink-site-nav a:focus-visible {
  color: var(--totink-site-ink);
  background: #fff;
  outline: 2px solid transparent;
}

.totink-site-nav a.is-active {
  color: #9e3f1c;
  background: rgba(255, 140, 90, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 140, 90, 0.18);
}

.totink-site-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.totink-site-language {
  position: relative;
  display: inline-flex;
}

.totink-site-language-trigger {
  width: 112px;
  height: 38px;
  padding: 0 10px;
  text-align: center;
  color: var(--totink-site-ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(240, 220, 190, 0.95);
  border-radius: 999px;
  font: 800 13px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 8px 18px rgba(96, 64, 32, 0.05);
  cursor: pointer;
}

.totink-site-language-trigger:focus-visible,
.totink-site-language-option:focus-visible {
  outline: 3px solid rgba(47, 127, 193, 0.35);
  outline-offset: 2px;
}

.totink-site-language-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 188px;
  max-width: calc(100vw - 24px);
  padding: 7px;
  background: #fff;
  border: 1px solid rgba(240, 220, 190, 0.95);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(73, 46, 32, 0.17);
}

.totink-site-language-menu[hidden] {
  display: none;
}

.totink-site-language-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: #59443a;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: 700 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  cursor: pointer;
}

.totink-site-language-option + .totink-site-language-option {
  margin-top: 2px;
}

.totink-site-language-option:hover,
.totink-site-language-option:focus-visible {
  color: #9e3f1c;
  background: #fff0e8;
}

.totink-site-language-option[aria-selected="true"] {
  color: #fff;
  background: #ff8c5a;
}

.totink-site-language-option[aria-selected="true"]:hover,
.totink-site-language-option[aria-selected="true"]:focus-visible {
  color: #fff;
  background: #f77742;
}

.totink-site-language-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 25px;
  margin-right: 10px;
  flex: 0 0 32px;
  color: #8b553d;
  background: #fff2dd;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.totink-site-language-option[aria-selected="true"] .totink-site-language-code {
  color: #d85628;
  background: #fff;
}

.totink-site-nav-cta {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #ff8c5a, var(--totink-site-orange));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(255, 140, 90, 0.2);
  font: 900 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.totink-site-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.totink-site-footer {
  margin: 72px 0 0;
  padding: 0;
  border: 0;
  color: #f9f6f1;
  background: #302d2b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-totink-footer] > .totink-site-footer {
  margin: 72px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #302d2b !important;
}

.totink-site-footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(130px, 1fr));
  gap: 40px;
}

.totink-site-footer .totink-site-brand {
  color: #fff;
}

.totink-site-footer-brand p {
  max-width: 380px;
  margin: 16px 0 0;
  color: #cdc6bf;
  font-size: 14px;
  line-height: 1.7;
}

.totink-site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.totink-site-footer h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

.totink-site-footer nav a {
  color: #cdc6bf;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.totink-site-footer nav a:hover,
.totink-site-footer nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.totink-site-footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #aaa19a;
  border-top: 1px solid #4b4642;
  font-size: 12px;
  line-height: 1.5;
}

.totink-site-footer-bottom span {
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .totink-site-header-inner {
    min-height: 72px;
    padding: 14px 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .totink-site-nav-shell {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .totink-site-nav {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  button,
  .button,
  .btn,
  input,
  select,
  textarea {
    max-width: 100%;
  }

  .totink-site-header-inner {
    width: 100%;
    padding-inline: 12px;
    align-items: flex-start;
  }

  .totink-site-nav {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    white-space: normal;
  }

  .totink-site-nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .totink-site-header a,
  .totink-site-header button,
  .totink-site-footer a {
    min-height: 44px;
  }

  .totink-site-language-menu {
    right: auto;
    left: 0;
  }

  .totink-site-nav-cta {
    flex: 1;
  }

  .totink-site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .totink-site-footer-bottom {
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 480px) {
  .totink-site-brand {
    font-size: 28px;
  }

  .totink-site-brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }

  .totink-site-language-trigger {
    width: 108px;
  }

  .totink-site-footer-grid {
    grid-template-columns: 1fr;
  }

  .totink-site-footer-brand {
    grid-column: auto;
  }
}

/*
 * Mobile and tablet usability layer.
 * Everything in this section is breakpoint-scoped so the approved desktop
 * presentation remains unchanged.
 */
@media (min-width: 761px) and (max-width: 1024px) {
  .totink-site-header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand actions"
      "nav nav";
    min-height: 0;
    padding: 10px 16px 8px;
    gap: 8px 16px;
  }

  .totink-site-brand {
    grid-area: brand;
  }

  .totink-site-nav-shell {
    grid-area: nav;
    width: 100%;
  }

  .totink-site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .totink-site-nav-actions {
    grid-area: actions;
    justify-self: end;
  }

  .totink-site-header a,
  .totink-site-header button {
    min-height: 44px !important;
  }

  html body .preset-chip,
  html body.totink-nursery-ui .preset-chip,
  html body.name-tracing-page .preset-chip {
    min-height: 44px !important;
    height: auto !important;
  }

  .totink-site-nav a,
  .totink-site-language-trigger,
  .totink-site-nav-cta {
    height: 44px !important;
  }

  button,
  .button,
  .btn,
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px !important;
  }
}

@media (max-width: 760px) {
  [data-totink-header] {
    position: relative;
  }

  .totink-site-header {
    backdrop-filter: none;
  }

  .totink-site-header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas:
      "brand actions"
      "nav nav" !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 8px 12px 7px !important;
    gap: 7px 8px !important;
    align-items: center !important;
  }

  .totink-site-brand {
    grid-area: brand;
    gap: 5px;
    font-size: 23px;
  }

  .totink-site-brand-mark {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 8px;
  }

  .totink-site-nav-shell {
    grid-area: nav;
    order: initial;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .totink-site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 1px 0;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
  }

  .totink-site-nav a {
    min-height: 42px;
    padding-inline: 11px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    font-size: 13px;
  }

  .totink-site-nav-actions {
    grid-area: actions;
    width: auto;
    min-width: 0;
    justify-self: end;
    justify-content: flex-end;
    gap: 6px;
  }

  .totink-site-language-trigger {
    width: auto;
    min-width: 62px;
    height: 40px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .totink-site-language-menu {
    right: 0;
    left: auto;
  }

  .totink-site-nav-cta {
    flex: 0 1 auto;
    min-height: 40px;
    padding-inline: 11px;
    font-size: 12px;
  }

  html body .page-wrap,
  html body .site-shell-inner,
  html body .totink-main-frame,
  html body main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .container,
  html body.totink-nursery-ui .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
    box-sizing: border-box !important;
  }

  html body .hero-inner,
  html body .hero-grid,
  html body .layout,
  html body .split-grid,
  html body .content-grid,
  html body .detail-grid,
  html body .generator-grid,
  html body .generator-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body.totink-nursery-ui .layout,
  html body.name-tracing-page .layout {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
  }

  html body.totink-nursery-ui .layout > *,
  html body.name-tracing-page .layout > * {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html body h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(30px, 9vw, 38px) !important;
    line-height: 1.12 !important;
  }

  html body input,
  html body select,
  html body textarea {
    width: 100%;
    min-height: 48px;
    font-size: 16px !important;
    box-sizing: border-box;
  }

  html body button,
  html body .button,
  html body .btn {
    min-height: 48px;
  }

  html body .preset-chip,
  html body.totink-nursery-ui .preset-chip,
  html body.name-tracing-page .preset-chip {
    min-height: 44px !important;
    height: auto !important;
  }

  html body .dots button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    background: radial-gradient(circle, #e7d2b9 0 4px, transparent 5px) !important;
  }

  html body .dots button.active {
    background: radial-gradient(circle, var(--totink-site-orange) 0 6px, transparent 7px) !important;
  }

  html body img,
  html body svg,
  html body canvas {
    max-width: 100%;
  }

  html body .panel,
  html body .preview-panel,
  html body .section-card,
  html body .detail-card,
  html body .resource-card {
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
  }

  html body .field,
  html body .form-group,
  html body .control-group {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html body.totink-nursery-ui .field,
  html body.name-tracing-page .field {
    width: auto !important;
    max-width: 100% !important;
  }

  html body.scissor-skills-page .container,
  html body.scissor-skills-page .visual-card,
  html body.scissor-skills-page .worksheet-flow-stage {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html body .preview-wrap,
  html body .worksheet-preview,
  html body .worksheet-flow-stage {
    max-width: 100% !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.totink-education-home .hero-inner {
    padding: 32px 16px 34px !important;
    gap: 22px !important;
  }

  body.totink-education-home .hero-visual {
    min-height: 300px !important;
  }

  body.totink-education-home .preview-name,
  body.totink-education-home .preview-scissor {
    display: none !important;
  }

  html body.totink-nursery-ui .name-hero-art.nursery-name-preview {
    display: none !important;
  }

  html body.totink-nursery-ui .hero-grid {
    gap: 24px !important;
  }

  .totink-site-footer {
    margin-top: 48px;
  }

  .totink-site-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px 12px;
    padding: 34px 0 26px;
  }

  .totink-site-footer-brand {
    grid-column: 1 / -1 !important;
  }

  .totink-site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 359px) {
  .totink-site-header-inner {
    padding-inline: 9px !important;
  }

  .totink-site-brand {
    font-size: 21px;
  }

  .totink-site-brand-mark {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .totink-site-language-trigger {
    min-width: 56px;
    padding-inline: 8px;
  }

  .totink-site-nav-cta {
    padding-inline: 9px;
  }
}

/* Mobile app shell: phone-only. Tablet and desktop layouts keep their existing structure. */
.totink-mobile-dock {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --totink-mobile-gutter: 16px;
    --totink-mobile-dock-height: 76px;
  }

  html {
    background: #fff7e8;
    scroll-padding-bottom: calc(var(--totink-mobile-dock-height) + 24px);
  }

  body {
    padding-bottom: calc(var(--totink-mobile-dock-height) + 24px + env(safe-area-inset-bottom)) !important;
    background: #fff7e8 !important;
  }

  [data-totink-header] {
    position: sticky !important;
    top: 0;
    z-index: 900;
  }

  .totink-site-progress,
  .totink-site-nav-shell,
  .totink-site-nav-cta {
    display: none !important;
  }

  .totink-site-header {
    border-bottom: 1px solid rgba(116, 77, 43, 0.08) !important;
    background: rgba(255, 247, 232, 0.94) !important;
    box-shadow: 0 8px 24px rgba(106, 72, 42, 0.06) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }

  .totink-site-header-inner {
    display: flex !important;
    width: 100% !important;
    min-height: 60px !important;
    padding: 9px var(--totink-mobile-gutter) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .totink-site-brand {
    display: inline-flex !important;
    flex: 0 0 auto;
    gap: 5px !important;
    font-size: 25px !important;
    line-height: 1 !important;
  }

  .totink-site-brand-mark {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
    border-radius: 10px !important;
  }

  .totink-site-nav-actions {
    display: flex !important;
    width: auto !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
  }

  .totink-site-language-trigger {
    width: auto !important;
    min-width: 72px !important;
    max-width: 112px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 28px 0 12px !important;
    overflow: hidden;
    border: 1px solid #f0dcc4 !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #67452f !important;
    font-size: 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .totink-site-language-menu {
    right: 0 !important;
    left: auto !important;
    width: min(250px, calc(100vw - 32px));
    border-radius: 18px !important;
    box-shadow: 0 18px 42px rgba(92, 61, 35, 0.18) !important;
  }

  .totink-mobile-dock {
    position: fixed;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--totink-mobile-dock-height);
    padding: 7px 5px 6px;
    border: 1px solid rgba(142, 102, 63, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 34px rgba(83, 53, 27, 0.2), 0 2px 8px rgba(83, 53, 27, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-sizing: border-box !important;
  }

  .totink-mobile-dock-link {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 60px;
    padding: 3px 2px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: 18px;
    color: #8c7767;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .totink-mobile-dock * {
    box-sizing: border-box !important;
  }

  .totink-mobile-dock-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
  }

  .totink-mobile-dock-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .totink-mobile-dock-link.is-active {
    color: #e96936;
    background: #fff2e7 !important;
  }

  .totink-mobile-dock-link.is-create {
    padding-top: 0;
    color: #d85e2e;
  }

  .totink-mobile-dock-link.is-create .totink-mobile-dock-icon {
    width: 46px;
    height: 46px;
    margin-top: -19px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff9b69, #ff7645);
    box-shadow: 0 8px 18px rgba(232, 104, 49, 0.32);
    color: #fff;
    font-size: 31px;
    font-weight: 400;
  }

  .totink-mobile-dock-link.is-create.is-active {
    background: transparent !important;
  }

  main {
    overflow: clip;
  }

  /* Home: search-first app dashboard followed by a 2-up / 3-up resource grid. */
  body.totink-education-home .hero {
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.totink-education-home .hero-inner {
    display: block !important;
    padding: 20px var(--totink-mobile-gutter) 14px !important;
  }

  body.totink-education-home .hero-copy {
    display: flex !important;
    max-width: none !important;
    align-items: stretch;
    flex-direction: column;
    gap: 10px !important;
    text-align: left !important;
  }

  body.totink-education-home .hero-copy .eyebrow {
    order: 0;
    align-self: flex-start;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ffe8d5 !important;
    color: #b85a31 !important;
    font-size: 11px !important;
    letter-spacing: 0.02em !important;
  }

  body.totink-education-home .hero-title {
    order: 1;
    margin: 0 !important;
    color: #4d392d !important;
    font-size: clamp(29px, 8.3vw, 36px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.04em !important;
  }

  body.totink-education-home .hero-copy > p {
    display: -webkit-box;
    order: 2;
    margin: 0 !important;
    overflow: hidden;
    color: #7e6b5c !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.totink-education-home .resource-search {
    order: 3;
    width: 100% !important;
    margin: 2px 0 0 !important;
    padding: 5px 5px 5px 15px !important;
    border: 1px solid #eedcc7 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(126, 86, 48, 0.08) !important;
  }

  body.totink-education-home .resource-search input {
    min-height: 46px !important;
    padding: 0 4px !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
  }

  body.totink-education-home .resource-search button {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    background: #ff8c5a !important;
    color: #fff !important;
  }

  body.totink-education-home .quick-resource-tabs {
    display: flex !important;
    order: 4;
    width: calc(100% + var(--totink-mobile-gutter)) !important;
    margin: 0 calc(var(--totink-mobile-gutter) * -1) 0 0 !important;
    padding: 2px var(--totink-mobile-gutter) 4px 0 !important;
    gap: 8px !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  body.totink-education-home .quick-resource-tabs::-webkit-scrollbar {
    display: none;
  }

  body.totink-education-home .quick-resource-tabs a {
    flex: 0 0 auto;
    min-height: 38px !important;
    padding: 9px 13px !important;
    border: 1px solid #efdcc4 !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #70533f !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
  }

  body.totink-education-home .hero-actions,
  body.totink-education-home .hero-visual {
    display: none !important;
  }

  body.totink-education-home .features {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: 100% !important;
    padding: 8px var(--totink-mobile-gutter) 24px !important;
    gap: 11px !important;
  }

  body.totink-education-home .feature-card {
    grid-column: span 3;
    min-width: 0 !important;
    min-height: 226px !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid rgba(139, 96, 52, 0.09) !important;
    border-radius: 23px !important;
    box-shadow: 0 10px 25px rgba(114, 75, 38, 0.08) !important;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) {
    grid-column: span 2;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    padding: 11px !important;
    border-radius: 20px !important;
  }

  body.totink-education-home .feature-top {
    min-height: auto !important;
    margin: 0 !important;
  }

  body.totink-education-home .feature-index,
  body.totink-education-home .feature-top p {
    display: none !important;
  }

  body.totink-education-home .feature-top h3 {
    margin: 0 !important;
    color: #4f392d !important;
    font-size: 17px !important;
    line-height: 1.18 !important;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) .feature-top h3 {
    min-height: 34px;
    font-size: 13px !important;
    text-align: center;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) .feature-top {
    height: 34px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.totink-education-home .feature-preview {
    min-height: 0 !important;
    height: 112px !important;
    margin: 10px 0 8px !important;
    border-radius: 16px !important;
    transform: none !important;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) .feature-preview {
    flex: 0 0 72px !important;
    height: 72px !important;
    margin: 7px 0 !important;
    border-radius: 14px !important;
  }

  body.totink-education-home .feature-bottom {
    min-height: 34px !important;
    padding: 7px 9px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) .feature-bottom {
    margin-top: auto !important;
    justify-content: center !important;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) .feature-bottom span:first-child {
    display: none !important;
  }

  body.totink-education-home .section {
    padding-top: 42px !important;
    padding-bottom: 42px !important;
  }

  body.totink-education-home .section-heading {
    margin-bottom: 20px !important;
    text-align: left !important;
  }

  body.totink-education-home .section-title {
    font-size: 28px !important;
  }

  body.totink-education-home .workflow-steps {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body.totink-education-home .workflow-step {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    padding: 14px !important;
    border-radius: 18px !important;
    text-align: left !important;
  }

  body.totink-education-home .workflow-step .step-no,
  body.totink-education-home .workflow-step .step-icon {
    grid-row: 1 / span 2;
  }

  body.totink-education-home .workflow-step .step-icon {
    display: none !important;
  }

  body.totink-education-home .workflow-step h3,
  body.totink-education-home .workflow-step p {
    grid-column: 2;
    margin: 0 !important;
  }

  /* Generator pages: editor first, compact controls, printable preview second. */
  body.name-tracing-page .hero,
  body.scissor-skills-page .hero {
    padding-top: 20px !important;
    padding-bottom: 18px !important;
  }

  body.name-tracing-page .hero-grid,
  body.scissor-skills-page .hero-grid {
    display: block !important;
  }

  body.name-tracing-page .hero-copy,
  body.scissor-skills-page .hero-copy {
    text-align: left !important;
  }

  body.name-tracing-page .hero-copy p,
  body.scissor-skills-page .hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.name-tracing-page .name-hero-art,
  body.scissor-skills-page .worksheet-flow-stage {
    display: none !important;
  }

  body.name-tracing-page .layout,
  body.scissor-skills-page .layout {
    padding: 4px 0 34px !important;
    gap: 14px !important;
  }

  body.name-tracing-page .panel,
  body.scissor-skills-page .panel,
  body.name-tracing-page .preview-panel,
  body.scissor-skills-page .preview-panel {
    padding: 16px !important;
    border: 1px solid rgba(133, 91, 51, 0.1) !important;
    border-radius: 23px !important;
    background: #fff !important;
    box-shadow: 0 10px 26px rgba(107, 69, 35, 0.08) !important;
  }

  body.name-tracing-page .panel-head,
  body.scissor-skills-page .panel-head {
    margin-bottom: 14px !important;
  }

  body.name-tracing-page .panel-actions,
  body.scissor-skills-page .panel-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  body.name-tracing-page .panel-actions button,
  body.scissor-skills-page .panel-actions button,
  body.name-tracing-page .panel-actions .button,
  body.scissor-skills-page .panel-actions .button {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 15px !important;
  }

  body.name-tracing-page .preview-panel,
  body.scissor-skills-page .preview-panel {
    overflow: hidden !important;
  }

  body.name-tracing-page .preview-wrap,
  body.scissor-skills-page .preview-wrap {
    margin-inline: -8px !important;
    border-radius: 16px !important;
  }

  /* Resource and company pages use the same compact app-card rhythm. */
  body[data-totink-page="picture-books"] main,
  body[data-totink-page="courseware"] main,
  body[data-totink-page="themes"] main,
  body[data-totink-page="gallery"] main,
  body[data-totink-page="about"] main,
  body[data-totink-page="contact"] main,
  body[data-totink-page="privacy"] main,
  body[data-totink-page="terms"] main {
    padding-top: 6px;
  }

  html body .resource-card,
  html body .detail-card,
  html body .section-card {
    border: 1px solid rgba(133, 91, 51, 0.1) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(107, 69, 35, 0.07) !important;
  }

  .totink-site-footer {
    margin-top: 32px !important;
    padding-bottom: 10px !important;
  }

  .totink-site-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    padding: 28px var(--totink-mobile-gutter) 22px !important;
    gap: 22px 10px !important;
  }

  .totink-site-footer-brand {
    grid-column: 1 / -1 !important;
  }

  .totink-site-footer-grid nav h2 {
    font-size: 12px !important;
  }

  .totink-site-footer-grid nav a {
    font-size: 11px !important;
  }

  .totink-site-footer-bottom {
    padding-inline: var(--totink-mobile-gutter) !important;
  }
}

/* Phone content architecture: turn every public content page into a compact app view. */
@media (max-width: 760px) {
  body[data-totink-page="picture-books"],
  body[data-totink-page="courseware"],
  body[data-totink-page="themes"],
  body[data-totink-page="gallery"],
  body[data-totink-page$="-detail"],
  body[data-totink-page="about"],
  body[data-totink-page="contact"],
  body[data-totink-page="privacy"],
  body[data-totink-page="terms"] {
    color: #4f3a2e;
    background: #fff7e8 !important;
  }

  body[data-totink-page="picture-books"] main h1,
  body[data-totink-page="courseware"] main h1,
  body[data-totink-page="themes"] main h1,
  body[data-totink-page="gallery"] main h1,
  body[data-totink-page$="-detail"] main h1,
  body[data-totink-page="about"] main h1,
  body[data-totink-page="contact"] main h1,
  body[data-totink-page="privacy"] main h1,
  body[data-totink-page="terms"] main h1 {
    font-size: clamp(28px, 8vw, 34px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.035em !important;
  }

  body[data-totink-page="picture-books"] main .section,
  body[data-totink-page="courseware"] main .section,
  body[data-totink-page="themes"] main .section,
  body[data-totink-page="gallery"] main .section,
  body[data-totink-page$="-detail"] main .section,
  body[data-totink-page="about"] main .section,
  body[data-totink-page="contact"] main .section,
  body[data-totink-page="privacy"] main .section {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  body[data-totink-page="picture-books"] .hero,
  body[data-totink-page="courseware"] .hero,
  body[data-totink-page="themes"] .hero,
  body[data-totink-page="gallery"] .hero {
    min-height: 0 !important;
    padding: 14px 0 8px !important;
    background: transparent !important;
  }

  body[data-totink-page="picture-books"] .hero-inner,
  body[data-totink-page="courseware"] .hero-card,
  body[data-totink-page="themes"] .hero-card,
  body[data-totink-page="gallery"] .hero-grid {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px !important;
    border: 1px solid rgba(143, 98, 54, 0.1) !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,239,218,.9)) !important;
    box-shadow: 0 10px 28px rgba(106, 70, 36, 0.08) !important;
  }

  body[data-totink-page="picture-books"] .hero h1,
  body[data-totink-page="courseware"] .hero h1,
  body[data-totink-page="themes"] .hero h1,
  body[data-totink-page="gallery"] .hero h1 {
    margin: 10px 0 8px !important;
  }

  body[data-totink-page="picture-books"] .hero p,
  body[data-totink-page="courseware"] .hero p,
  body[data-totink-page="themes"] .hero p,
  body[data-totink-page="gallery"] .hero p {
    display: -webkit-box;
    margin: 0 !important;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.55 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body[data-totink-page="picture-books"] .hero-books,
  body[data-totink-page="courseware"] .hero-illustration,
  body[data-totink-page="themes"] .hero-visual,
  body[data-totink-page="gallery"] .hero-visual {
    display: none !important;
  }

  body[data-totink-page="picture-books"] .hero-actions,
  body[data-totink-page="courseware"] .hero-actions,
  body[data-totink-page="gallery"] .hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    margin-top: 15px !important;
    gap: 8px !important;
  }

  body[data-totink-page="picture-books"] .hero-actions a,
  body[data-totink-page="courseware"] .hero-actions a,
  body[data-totink-page="gallery"] .hero-actions a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 10px 8px !important;
    border-radius: 14px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  /* Picture books: compact library header and two-column story shelf. */
  body[data-totink-page="picture-books"] .hero {
    height: auto !important;
  }

  body[data-totink-page="picture-books"] #book-library {
    padding: 10px 0 24px !important;
  }

  body[data-totink-page="picture-books"] .library-panel {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-totink-page="picture-books"] .panel-head {
    display: flex !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    align-items: flex-end !important;
    gap: 8px !important;
  }

  body[data-totink-page="picture-books"] .section-title {
    font-size: 22px !important;
    line-height: 1.18 !important;
  }

  body[data-totink-page="picture-books"] .count-text {
    max-width: 42% !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    background: #fff0e5 !important;
    font-size: 10px !important;
    text-align: right !important;
  }

  body[data-totink-page="picture-books"] .filter-bar,
  body[data-totink-page="courseware"] .filter-bar,
  body[data-totink-page="themes"] .theme-chips,
  body[data-totink-page="gallery"] .filter-bar {
    display: flex !important;
    width: calc(100% + 16px) !important;
    margin-right: -16px !important;
    padding: 4px 16px 8px 0 !important;
    gap: 8px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  body[data-totink-page="picture-books"] .filter-bar::-webkit-scrollbar,
  body[data-totink-page="courseware"] .filter-bar::-webkit-scrollbar,
  body[data-totink-page="themes"] .theme-chips::-webkit-scrollbar,
  body[data-totink-page="gallery"] .filter-bar::-webkit-scrollbar {
    display: none;
  }

  body[data-totink-page="picture-books"] .filter-bar button,
  body[data-totink-page="courseware"] .filter-btn,
  body[data-totink-page="themes"] .theme-chip,
  body[data-totink-page="gallery"] .filter-btn {
    flex: 0 0 auto !important;
    min-height: 40px !important;
    padding: 8px 13px !important;
    border-radius: 13px !important;
    font-size: 11px !important;
    scroll-snap-align: start;
  }

  body[data-totink-page="picture-books"] .status-note,
  body[data-totink-page="courseware"] .status-note {
    margin: 4px 0 10px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
  }

  body[data-totink-page="picture-books"] .book-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 11px !important;
  }

  body[data-totink-page="picture-books"] .book-card {
    display: flex !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    flex-direction: column !important;
    border: 1px solid rgba(136, 93, 50, .1) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98, 65, 34, .08) !important;
  }

  body[data-totink-page="picture-books"] .cover {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.12 / 1 !important;
    border-radius: 0 !important;
  }

  body[data-totink-page="picture-books"] .cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body[data-totink-page="picture-books"] .book-body {
    display: flex !important;
    min-width: 0 !important;
    padding: 11px !important;
    flex: 1;
    flex-direction: column;
  }

  body[data-totink-page="picture-books"] .book-title {
    display: -webkit-box;
    min-height: 34px;
    margin: 0 0 7px !important;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.2 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="picture-books"] .meta-row {
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
  }

  body[data-totink-page="picture-books"] .pill {
    min-width: 0 !important;
    padding: 4px 6px !important;
    overflow: hidden;
    font-size: 9px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-totink-page="picture-books"] .desc {
    display: -webkit-box !important;
    margin: 8px 0 !important;
    overflow: hidden;
    font-size: 11px !important;
    line-height: 1.4 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="picture-books"] .open-btn {
    width: 100% !important;
    min-height: 38px !important;
    margin-top: auto !important;
    padding: 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    text-align: center !important;
  }

  body[data-totink-page="picture-books"] .detail-hint {
    display: none !important;
  }

  body[data-totink-page="picture-books"] .file-actions {
    margin-top: 7px !important;
    gap: 4px !important;
  }

  body[data-totink-page="picture-books"] .file-link {
    min-height: 30px !important;
    padding: 5px !important;
    font-size: 9px !important;
  }

  body[data-totink-page="picture-books"] .teacher-panel {
    display: flex !important;
    width: calc(100% + 16px) !important;
    margin: 18px -16px 0 0 !important;
    padding: 0 16px 6px 0 !important;
    gap: 10px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  body[data-totink-page="picture-books"] .teacher-panel .info-card {
    flex: 0 0 82% !important;
    padding: 16px !important;
    border-radius: 20px !important;
  }

  /* Courseware: search-first toolbar, swipe filters, two-column lesson cards. */
  body[data-totink-page="courseware"] .hero {
    height: auto !important;
  }

  body[data-totink-page="courseware"] .toolbar {
    position: sticky !important;
    top: 63px !important;
    z-index: 80;
    padding: 8px 0 !important;
    background: rgba(255, 247, 232, .95) !important;
    backdrop-filter: blur(14px);
  }

  body[data-totink-page="courseware"] .toolbar-inner {
    display: flex !important;
    padding: 10px !important;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 8px !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.07) !important;
  }

  body[data-totink-page="courseware"] .search-box {
    display: flex !important;
    order: -1;
    flex: 0 0 48px !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 12px !important;
    align-items: center !important;
    border-radius: 14px !important;
    background: #fff7ed !important;
  }

  body[data-totink-page="courseware"] .search-box input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
  }

  body[data-totink-page="courseware"] .filter-bar {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 2px !important;
  }

  body[data-totink-page="courseware"] .main-layout {
    display: block !important;
    padding-top: 12px !important;
  }

  body[data-totink-page="courseware"] .sidebar {
    display: none !important;
  }

  body[data-totink-page="courseware"] .course-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px !important;
  }

  body[data-totink-page="courseware"] .course-card {
    display: flex !important;
    min-width: 0 !important;
    overflow: hidden !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page="courseware"] .course-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.2 / 1 !important;
    border-radius: 0 !important;
  }

  body[data-totink-page="courseware"] .course-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body[data-totink-page="courseware"] .course-content {
    display: flex !important;
    min-width: 0 !important;
    padding: 11px !important;
    flex: 1;
    flex-direction: column;
  }

  body[data-totink-page="courseware"] .subject-pill,
  body[data-totink-page="courseware"] .like {
    padding: 4px 6px !important;
    font-size: 9px !important;
  }

  body[data-totink-page="courseware"] .course-title {
    display: -webkit-box;
    min-height: 34px;
    margin: 8px 0 5px !important;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.2 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="courseware"] .course-summary {
    display: -webkit-box !important;
    margin: 0 0 8px !important;
    overflow: hidden;
    font-size: 10px !important;
    line-height: 1.4 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="courseware"] .course-meta span:not(:nth-child(2)),
  body[data-totink-page="courseware"] .detail-hint {
    display: none !important;
  }

  body[data-totink-page="courseware"] .course-meta {
    margin-bottom: 7px !important;
    font-size: 9px !important;
  }

  body[data-totink-page="courseware"] .open-course {
    width: 100% !important;
    min-height: 38px !important;
    margin-top: auto !important;
    padding: 8px !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    text-align: center !important;
  }

  /* Themes: compact feature shortcuts, swipe chips and two-column packs. */
  body[data-totink-page="themes"] .hero-mini-features {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-top: 14px !important;
    gap: 7px !important;
  }

  body[data-totink-page="themes"] .mini-feature {
    min-width: 0 !important;
    padding: 9px 5px !important;
    align-items: center !important;
    flex-direction: column !important;
    border-radius: 14px !important;
    text-align: center !important;
  }

  body[data-totink-page="themes"] .mini-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
  }

  body[data-totink-page="themes"] .mini-feature strong {
    display: block !important;
    margin-top: 4px;
    font-size: 10px !important;
  }

  body[data-totink-page="themes"] .mini-feature span {
    display: none !important;
  }

  body[data-totink-page="themes"] .chip-panel {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  body[data-totink-page="themes"] .theme-chips {
    width: calc(100% + 14px) !important;
    margin-right: -14px !important;
    padding-right: 14px !important;
  }

  body[data-totink-page="themes"] .info-panel {
    display: none !important;
  }

  body[data-totink-page="themes"] .themes-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px !important;
  }

  body[data-totink-page="themes"] .theme-card {
    display: flex !important;
    min-width: 0 !important;
    overflow: hidden !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page="themes"] .theme-cover {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.15 / 1 !important;
  }

  body[data-totink-page="themes"] .theme-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body[data-totink-page="themes"] .theme-body {
    display: flex !important;
    min-width: 0 !important;
    padding: 11px !important;
    flex: 1;
    flex-direction: column;
  }

  body[data-totink-page="themes"] .theme-name {
    display: -webkit-box;
    min-height: 34px;
    margin: 0 0 6px !important;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.2 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="themes"] .theme-desc {
    display: -webkit-box !important;
    margin: 0 0 8px !important;
    overflow: hidden;
    font-size: 10px !important;
    line-height: 1.4 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="themes"] .theme-stats {
    display: block !important;
    margin-top: auto !important;
    font-size: 9px !important;
  }

  body[data-totink-page="themes"] .theme-stats span:not(:first-child) {
    display: none !important;
  }

  body[data-totink-page="themes"] .theme-go {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin-top: 8px !important;
  }

  body[data-totink-page="themes"] .cta-panel {
    display: block !important;
    padding: 18px !important;
    border-radius: 22px !important;
    text-align: left !important;
  }

  body[data-totink-page="themes"] .cta-emoji {
    display: none !important;
  }

  /* Gallery: remove desktop orbit and use a two-column visual feed. */
  body[data-totink-page="gallery"] .page-inner,
  body[data-totink-page="gallery"] .page-wrap {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  body[data-totink-page="gallery"] .hero-grid {
    width: calc(100% - 32px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  body[data-totink-page="gallery"] .breadcrumbs {
    margin-bottom: 8px !important;
    font-size: 10px !important;
  }

  body[data-totink-page="gallery"] .hero-badges {
    display: flex !important;
    margin-top: 12px !important;
    gap: 6px !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page="gallery"] .hero-badges .badge {
    flex: 0 0 auto;
    min-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 9px !important;
  }

  body[data-totink-page="gallery"] .filter-panel {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  body[data-totink-page="gallery"] .filter-row {
    display: block !important;
  }

  body[data-totink-page="gallery"] .filter-row .section-title {
    margin-bottom: 8px !important;
    font-size: 21px !important;
  }

  body[data-totink-page="gallery"] .filter-bar {
    width: calc(100% + 14px) !important;
    margin-right: -14px !important;
    padding-right: 14px !important;
  }

  body[data-totink-page="gallery"] .count-row {
    padding-top: 7px !important;
    font-size: 10px !important;
  }

  body[data-totink-page="gallery"] .count-row span:last-child {
    display: none !important;
  }

  body[data-totink-page="gallery"] .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px !important;
  }

  body[data-totink-page="gallery"] .gallery-card {
    min-width: 0 !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page="gallery"] .gallery-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  body[data-totink-page="gallery"] .gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body[data-totink-page="gallery"] .gallery-card-body {
    padding: 10px !important;
  }

  body[data-totink-page="gallery"] .gallery-card-body h3 {
    margin: 3px 0 5px !important;
    font-size: 14px !important;
  }

  body[data-totink-page="gallery"] .card-label,
  body[data-totink-page="gallery"] .card-note {
    font-size: 9px !important;
  }

  body[data-totink-page="gallery"] .card-note {
    display: -webkit-box !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-totink-page="gallery"] .tag-row {
    display: none !important;
  }

  body[data-totink-page="gallery"] .card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    margin-top: 8px !important;
    gap: 5px !important;
  }

  body[data-totink-page="gallery"] .card-actions a {
    min-height: 34px !important;
    padding: 7px 5px !important;
    border-radius: 10px !important;
    font-size: 9px !important;
    text-align: center !important;
  }

  body[data-totink-page="gallery"] .info-grid {
    display: flex !important;
    width: calc(100% + 16px) !important;
    padding-right: 16px !important;
    gap: 10px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page="gallery"] .info-grid .info-card {
    flex: 0 0 82% !important;
    padding: 16px !important;
    border-radius: 20px !important;
  }

  body[data-totink-page="gallery"] .cta-panel {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  /* Resource detail pages: cover-first card, swipe summaries, compact downloads. */
  body[data-totink-page$="-detail"] .hero {
    padding: 14px 0 8px !important;
    background: transparent !important;
  }

  body[data-totink-page$="-detail"] .hero-card {
    display: flex !important;
    min-height: 0 !important;
    padding: 14px !important;
    flex-direction: column !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 10px 26px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page$="-detail"] .book-preview,
  body[data-totink-page$="-detail"] .preview-box,
  body[data-totink-page$="-detail"] .hero-cover {
    order: -1 !important;
    width: 100% !important;
    height: 210px !important;
    min-height: 210px !important;
    margin: 0 0 15px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: #fff3e3 !important;
  }

  body[data-totink-page$="-detail"] .book-cover-wrap,
  body[data-totink-page$="-detail"] .preview-frame {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
  }

  body[data-totink-page$="-detail"] .book-preview img,
  body[data-totink-page$="-detail"] .preview-box img,
  body[data-totink-page$="-detail"] .hero-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body[data-totink-page$="-detail"] .floating-note {
    display: none !important;
  }

  body[data-totink-page$="-detail"] .lead {
    display: -webkit-box !important;
    margin: 7px 0 10px !important;
    overflow: hidden;
    font-size: 13px !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body[data-totink-page$="-detail"] .meta-row {
    display: flex !important;
    width: calc(100% + 14px) !important;
    margin-right: -14px !important;
    padding: 2px 14px 4px 0 !important;
    gap: 6px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page$="-detail"] .meta-row .pill {
    flex: 0 0 auto !important;
    padding: 6px 9px !important;
    font-size: 10px !important;
  }

  body[data-totink-page$="-detail"] .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 12px !important;
    gap: 7px !important;
  }

  body[data-totink-page$="-detail"] .hero-actions .button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 9px 7px !important;
    border-radius: 13px !important;
    font-size: 10px !important;
    text-align: center !important;
  }

  body[data-totink-page$="-detail"] .hero-actions .button:first-child {
    grid-column: 1 / -1;
  }

  body[data-totink-page$="-detail"] .layout {
    display: block !important;
  }

  body[data-totink-page$="-detail"] .panel,
  body[data-totink-page$="-detail"] .content-card,
  body[data-totink-page$="-detail"] .download-box,
  body[data-totink-page$="-detail"] .info-box,
  body[data-totink-page$="-detail"] .side-card {
    padding: 16px !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.07) !important;
  }

  body[data-totink-page$="-detail"] .section-title {
    font-size: 22px !important;
  }

  body[data-totink-page$="-detail"] .body-text {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  body[data-totink-page$="-detail"] .summary-grid {
    display: flex !important;
    width: calc(100% + 16px) !important;
    margin: 14px -16px 0 0 !important;
    padding-right: 16px !important;
    gap: 9px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  body[data-totink-page$="-detail"] .summary-card {
    flex: 0 0 76% !important;
    min-height: 132px !important;
    padding: 14px !important;
    border-radius: 17px !important;
  }

  body[data-totink-page$="-detail"] .preview-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-totink-page$="-detail"] .preview-card {
    min-height: 76px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    font-size: 11px !important;
  }

  body[data-totink-page$="-detail"] .related-grid {
    display: flex !important;
    width: calc(100% + 16px) !important;
    padding-right: 16px !important;
    gap: 9px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page$="-detail"] .related-card {
    flex: 0 0 78% !important;
  }

  body[data-totink-page$="-detail"] .side-panel,
  body[data-totink-page$="-detail"] .side-stack {
    display: grid !important;
    margin-top: 14px !important;
    gap: 10px !important;
  }

  body[data-totink-page$="-detail"] .download-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-totink-page$="-detail"] .download-list .button {
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 6px !important;
    border-radius: 13px !important;
    font-size: 10px !important;
  }

  body[data-totink-page="theme-detail"] .content-card .block,
  body[data-totink-page="theme-detail"] .download-card {
    padding: 14px !important;
    border-radius: 17px !important;
  }

  /* Company and legal pages: remove desktop artwork and use readable app cards. */
  body[data-totink-page="about"] .about-hero {
    display: block !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  body[data-totink-page="about"] .about-visual,
  body[data-totink-page="contact"] .mail-board,
  body[data-totink-page="privacy"] .privacy-visual {
    display: none !important;
  }

  body[data-totink-page="about"] .about-copy,
  body[data-totink-page="contact"] .hero-left,
  body[data-totink-page="privacy"] .hero-card {
    padding: 18px !important;
    border: 1px solid rgba(136,93,50,.1) !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 10px 26px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page="about"] .hero-badges,
  body[data-totink-page="contact"] .hero-pills,
  body[data-totink-page="privacy"] .hero-badges {
    display: flex !important;
    width: calc(100% + 18px) !important;
    margin-right: -18px !important;
    padding-right: 18px !important;
    gap: 7px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page="about"] .hero-badges > *,
  body[data-totink-page="contact"] .hero-pills > *,
  body[data-totink-page="privacy"] .hero-badges > * {
    flex: 0 0 auto !important;
  }

  body[data-totink-page="about"] .value-grid,
  body[data-totink-page="about"] .benefit-grid,
  body[data-totink-page="about"] .audience-grid,
  body[data-totink-page="about"] .related-grid,
  body[data-totink-page="about"] .faq-grid,
  body[data-totink-page="contact"] .grid-2,
  body[data-totink-page="contact"] .grid-3,
  body[data-totink-page="privacy"] .summary-grid,
  body[data-totink-page="privacy"] .policy-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 11px !important;
  }

  body[data-totink-page="about"] .value-card,
  body[data-totink-page="about"] .benefit-card,
  body[data-totink-page="about"] .persona-card,
  body[data-totink-page="about"] .story-card,
  body[data-totink-page="about"] .privacy-card,
  body[data-totink-page="about"] .tool-card,
  body[data-totink-page="about"] .faq-card,
  body[data-totink-page="contact"] .card,
  body[data-totink-page="contact"] .related-card,
  body[data-totink-page="privacy"] .summary-card,
  body[data-totink-page="privacy"] .policy-card,
  body[data-totink-page="privacy"] .contact-card {
    padding: 16px !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.07) !important;
  }

  body[data-totink-page="contact"] .hero {
    padding: 20px 0 10px !important;
  }

  body[data-totink-page="contact"] .hero-grid {
    display: block !important;
  }

  body[data-totink-page="contact"] .hero-actions,
  body[data-totink-page="about"] .hero-actions,
  body[data-totink-page="privacy"] .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body[data-totink-page="contact"] .hero-actions .btn,
  body[data-totink-page="about"] .hero-actions .btn,
  body[data-totink-page="privacy"] .hero-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
  }

  body[data-totink-page="contact"] .wide-card,
  body[data-totink-page="contact"] .direct-card {
    display: block !important;
  }

  body[data-totink-page="contact"] .related-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  body[data-totink-page="contact"] .cta {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  body[data-totink-page="contact"] .cta .character {
    display: none !important;
  }

  body[data-totink-page="privacy"] .hero {
    padding: 16px 0 8px !important;
  }

  body[data-totink-page="privacy"] .hero-card {
    display: block !important;
  }

  body[data-totink-page="privacy"] .quick-summary {
    padding: 12px 0 !important;
  }

  body[data-totink-page="privacy"] .summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-totink-page="privacy"] .summary-card {
    min-height: 0 !important;
  }

  body[data-totink-page="privacy"] .summary-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body[data-totink-page="privacy"] .toc-card {
    position: sticky !important;
    top: 63px !important;
    z-index: 70;
    padding: 10px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.96) !important;
  }

  body[data-totink-page="privacy"] .toc-card h2,
  body[data-totink-page="privacy"] .updated-pill {
    display: none !important;
  }

  body[data-totink-page="privacy"] .toc-links {
    display: flex !important;
    gap: 7px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  body[data-totink-page="privacy"] .toc-links a {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 8px 11px !important;
    border-radius: 12px !important;
    background: #fff3e8 !important;
    font-size: 10px !important;
  }

  body[data-totink-page="privacy"] .policy-stack {
    margin-top: 12px !important;
  }

  body[data-totink-page="privacy"] .policy-card h2 {
    font-size: 21px !important;
  }

  body[data-totink-page="privacy"] .policy-card p,
  body[data-totink-page="privacy"] .policy-card li {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  body[data-totink-page="terms"] .legal-hero {
    padding: 18px 16px 8px !important;
    background: transparent !important;
  }

  body[data-totink-page="terms"] .legal-hero-inner {
    padding: 18px !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg,#fff,#ffedda) !important;
    box-shadow: 0 10px 26px rgba(98,65,34,.08) !important;
  }

  body[data-totink-page="terms"] .legal-content {
    width: calc(100% - 32px) !important;
    margin: 0 auto !important;
    padding: 10px 0 24px !important;
    box-sizing: border-box !important;
  }

  body[data-totink-page="terms"] .legal-content section {
    margin: 0 0 10px !important;
    padding: 16px !important;
    border: 1px solid rgba(136,93,50,.1) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(98,65,34,.06) !important;
  }

  body[data-totink-page="terms"] .legal-content h2 {
    margin: 0 0 8px !important;
    font-size: 20px !important;
  }

  body[data-totink-page="terms"] .legal-content p {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  /* Long explanatory blocks on generators become swipeable cards on phones. */
  body.name-tracing-page .info-grid,
  body.scissor-skills-page .info-grid,
  body.name-tracing-page .faq-grid,
  body.scissor-skills-page .faq-grid,
  body.name-tracing-page .related-grid,
  body.scissor-skills-page .related-grid {
    display: flex !important;
    width: calc(100% + 16px) !important;
    padding-right: 16px !important;
    gap: 10px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  body.name-tracing-page .info-grid > *,
  body.scissor-skills-page .info-grid > *,
  body.name-tracing-page .faq-grid > *,
  body.scissor-skills-page .faq-grid > *,
  body.name-tracing-page .related-grid > *,
  body.scissor-skills-page .related-grid > * {
    flex: 0 0 84% !important;
  }
}

/* Phone creator header: a compact tool identity card that leads directly into editing. */
@media (max-width: 760px) {
  body.name-tracing-page .hero,
  body.scissor-skills-page .hero {
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 0 8px !important;
    background: transparent !important;
  }

  body.name-tracing-page .hero > .container,
  body.scissor-skills-page .hero > .container {
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 16px !important;
  }

  body.name-tracing-page .hero-grid,
  body.scissor-skills-page .hero-grid {
    display: block !important;
    width: calc(100% - 32px) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  body.name-tracing-page .hero-grid > .hero-visual,
  body.scissor-skills-page .hero-grid > .hero-visual {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.name-tracing-page .hero-grid > div:first-child,
  body.scissor-skills-page .hero-grid > div:first-child {
    position: relative;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 14px !important;
    column-gap: 10px !important;
    row-gap: 8px !important;
    overflow: hidden;
    border: 1px solid rgba(140, 94, 50, .1) !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, #fff, #fff0df) !important;
    box-shadow: 0 10px 26px rgba(98, 65, 34, .08) !important;
  }

  body.scissor-skills-page .hero-grid > div:first-child {
    background: linear-gradient(145deg, #fff, #eef9f5 55%, #fff0e3) !important;
  }

  body.name-tracing-page .hero-grid > div:first-child::before,
  body.scissor-skills-page .hero-grid > div:first-child::before {
    display: grid;
    width: 46px;
    height: 46px;
    grid-column: 1;
    grid-row: 2 / span 2;
    place-items: center;
    align-self: start;
    border-radius: 15px;
    background: linear-gradient(145deg, #ff9d6c, #ff7543);
    box-shadow: 0 8px 16px rgba(232,104,49,.24);
    color: #fff;
    font-size: 25px;
    line-height: 1;
  }

  body.name-tracing-page .hero-grid > div:first-child::before {
    content: "✎";
  }

  body.scissor-skills-page .hero-grid > div:first-child::before {
    content: "✂";
    background: linear-gradient(145deg, #8dcc76, #58ac67);
  }

  body.name-tracing-page .hero .breadcrumbs,
  body.scissor-skills-page .hero .breadcrumbs {
    display: flex !important;
    width: max-content !important;
    min-height: 24px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    border-radius: 999px !important;
    background: #fff7ed !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body.name-tracing-page .hero .eyebrow,
  body.scissor-skills-page .hero .eyebrow {
    width: max-content !important;
    max-width: 100% !important;
    min-height: 24px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
  }

  body.name-tracing-page .hero h1,
  body.scissor-skills-page .hero h1 {
    margin: 0 !important;
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    color: #4b362b !important;
    font-size: clamp(24px, 7vw, 29px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.04em !important;
  }

  body.name-tracing-page .hero-grid > div:first-child > p,
  body.scissor-skills-page .hero-grid > div:first-child > p {
    display: -webkit-box !important;
    margin: 0 !important;
    grid-column: 1 / -1;
    grid-row: 4;
    overflow: hidden;
    color: #766253 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.name-tracing-page .hero-actions,
  body.scissor-skills-page .hero-actions {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 2px 0 0 !important;
    grid-column: 1 / -1;
    grid-row: 5;
  }

  body.name-tracing-page .hero-actions > *,
  body.scissor-skills-page .hero-actions > * {
    display: none !important;
  }

  body.name-tracing-page .hero-actions > :first-child,
  body.scissor-skills-page .hero-actions > :first-child {
    display: flex !important;
    width: 100% !important;
    min-height: 46px !important;
    padding: 9px 12px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 14px !important;
    font-size: 12px !important;
  }

  body.name-tracing-page .hero-badges,
  body.scissor-skills-page .hero-badges {
    display: flex !important;
    width: calc(100% + 14px) !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 -14px 0 0 !important;
    padding: 0 14px 0 0 !important;
    grid-column: 1 / -1;
    grid-row: 6;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  body.name-tracing-page .hero-badges::-webkit-scrollbar,
  body.scissor-skills-page .hero-badges::-webkit-scrollbar {
    display: none;
  }

  body.name-tracing-page .hero-badges .badge,
  body.scissor-skills-page .hero-badges .badge {
    flex: 0 0 auto !important;
    min-height: 30px !important;
    padding: 6px 9px !important;
    border-radius: 11px !important;
    font-size: 9px !important;
    white-space: nowrap !important;
  }

  body.name-tracing-page #generator,
  body.scissor-skills-page #generator {
    margin-top: 0 !important;
    padding-top: 8px !important;
  }
}

/* The generated worksheet uses fixed A4 internals at every responsive width. */
@media (max-width: 1200px) {
  body.name-tracing-page .page,
  body.name-tracing-page .a4-page-instance {
    width: 800px !important;
    height: 1131px !important;
  }
}

/* Tablet workspace: remove the oversized hero artwork and contain the editor. */
@media (min-width: 761px) and (max-width: 1024px) {
  body.name-tracing-page.totink-nursery-ui .hero > .container {
    padding: 28px 0 34px !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-grid {
    display: block !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-visual {
    display: none !important;
  }

  body.name-tracing-page.totink-nursery-ui #generator {
    margin-top: 24px !important;
  }

  body.name-tracing-page.totink-nursery-ui #generator .layout {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.name-tracing-page.totink-nursery-ui #generator .panel,
  body.name-tracing-page.totink-nursery-ui #generator .layout > div,
  body.name-tracing-page.totink-nursery-ui #generator .preview-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.name-tracing-page.totink-nursery-ui #generator .layout > div {
    margin-top: 20px !important;
  }
}

/* Name tracing workspace: compact phone editor with a true A4 preview scale. */
@media (max-width: 760px) {
  body.name-tracing-page.totink-nursery-ui .hero {
    padding: 8px 0 4px !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero > .container {
    width: 100% !important;
    padding: 0 16px !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-grid {
    width: 100% !important;
    margin: 0 !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-grid > div:first-child {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    padding: 12px !important;
    column-gap: 9px !important;
    row-gap: 4px !important;
    border-radius: 20px !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-grid > div:first-child::before {
    width: 42px;
    height: 42px;
    grid-row: 1 / span 2;
    border-radius: 13px;
    font-size: 22px;
  }

  body.name-tracing-page.totink-nursery-ui .hero .breadcrumbs,
  body.name-tracing-page.totink-nursery-ui .hero-grid > div:first-child > p,
  body.name-tracing-page.totink-nursery-ui .hero-badges {
    display: none !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero .eyebrow {
    grid-column: 2;
    grid-row: 1;
    min-height: 20px !important;
    padding: 3px 7px !important;
    align-self: end;
    font-size: 9px !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero h1 {
    grid-column: 2;
    grid-row: 2;
    font-size: clamp(22px, 6.4vw, 26px) !important;
  }

  body.name-tracing-page.totink-nursery-ui .hero-actions {
    display: none !important;
  }

  body.name-tracing-page.totink-nursery-ui #generator {
    margin-top: 0 !important;
    padding-top: 4px !important;
  }

  body.name-tracing-page .layout {
    gap: 10px !important;
  }

  body.name-tracing-page.totink-nursery-ui .panel,
  body.name-tracing-page.totink-nursery-ui .preview-panel {
    padding: 13px !important;
    border-radius: 20px !important;
  }

  body.name-tracing-page .panel-head {
    margin-bottom: 10px !important;
  }

  body.name-tracing-page .panel-head h2 {
    font-size: 20px !important;
  }

  body.name-tracing-page .field {
    margin-bottom: 12px !important;
  }

  body.name-tracing-page .field label {
    margin-bottom: 6px !important;
    font-size: 13px !important;
  }

  body.name-tracing-page #inputText {
    height: 96px !important;
    min-height: 96px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    line-height: 1.35 !important;
  }

  body.name-tracing-page .field-help,
  body.name-tracing-page .panel-note,
  body.name-tracing-page .switch-copy span {
    display: none !important;
  }

  body.name-tracing-page .preset-strip {
    margin-top: 8px !important;
    gap: 6px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  body.name-tracing-page .preset-strip::-webkit-scrollbar {
    display: none;
  }

  body.name-tracing-page .preset-chip {
    flex: 1 0 auto !important;
    min-height: 40px !important;
    padding: 7px 11px !important;
  }

  body.name-tracing-page .switch-row {
    min-height: 50px !important;
    padding: 8px 11px !important;
    border-radius: 14px !important;
  }

  body.name-tracing-page .status-grid {
    display: none !important;
  }

  body.name-tracing-page .status-card {
    min-width: 0 !important;
    padding: 9px 10px !important;
    border-radius: 14px !important;
  }

  body.name-tracing-page .status-card .value {
    margin-top: 3px !important;
    font-size: 12px !important;
  }

  body.name-tracing-page .panel-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    gap: 7px !important;
  }

  body.name-tracing-page .panel-actions button {
    min-height: 46px !important;
    padding: 8px 6px !important;
    border-radius: 13px !important;
    font-size: 11px !important;
  }

  body.name-tracing-page .panel-actions #downloadBtn {
    grid-column: auto;
  }

  body.name-tracing-page .preview-panel .section-head {
    display: flex !important;
    margin-bottom: 9px !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  body.name-tracing-page .preview-panel .section-title {
    font-size: 20px !important;
  }

  body.name-tracing-page .preview-panel .section-desc {
    display: none !important;
  }

  body.name-tracing-page .preview-panel .chip {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    font-size: 9px !important;
  }

  body.name-tracing-page.totink-nursery-ui .preview-wrap {
    margin-inline: -4px !important;
    padding: 4px !important;
    border-radius: 15px !important;
  }

  /* Keep the worksheet at its designed A4 canvas size, then scale the whole sheet. */
  body.name-tracing-page .page,
  body.name-tracing-page .a4-page-instance {
    width: 800px !important;
    height: 1131px !important;
  }
}

/* Extra-narrow phones: keep cards readable at 320px without changing larger phones. */
@media (max-width: 359px) {
  :root {
    --totink-mobile-gutter: 16px;
    --totink-mobile-dock-height: 72px;
  }

  .totink-mobile-dock {
    right: 6px;
    left: 6px;
    padding: 6px 3px 5px;
    border-radius: 21px;
  }

  .totink-mobile-dock-link {
    min-height: 58px;
    padding: 3px 1px !important;
    border-radius: 15px;
    font-size: 9px;
  }

  .totink-mobile-dock-link.is-create .totink-mobile-dock-icon {
    width: 43px;
    height: 43px;
    margin-top: -17px;
    font-size: 28px;
  }

  body.totink-education-home .feature-card:nth-child(n + 3) {
    grid-column: span 3;
  }

  body.totink-education-home .feature-card:nth-child(5) {
    grid-column: 1 / -1;
  }

  body[data-totink-page="picture-books"] .book-grid,
  body[data-totink-page="courseware"] .course-list,
  body[data-totink-page="themes"] .themes-grid,
  body[data-totink-page="gallery"] .gallery-grid,
  body[data-totink-page="privacy"] .summary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-totink-page="picture-books"] .book-card,
  body[data-totink-page="courseware"] .course-card,
  body[data-totink-page="themes"] .theme-card,
  body[data-totink-page="gallery"] .gallery-card {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    min-height: 168px !important;
  }

  body[data-totink-page="picture-books"] .cover,
  body[data-totink-page="courseware"] .course-thumb,
  body[data-totink-page="themes"] .theme-cover,
  body[data-totink-page="gallery"] .gallery-thumb {
    width: 104px !important;
    height: 100% !important;
    min-height: 168px !important;
    aspect-ratio: auto !important;
  }

  body[data-totink-page="picture-books"] .book-body,
  body[data-totink-page="courseware"] .course-content,
  body[data-totink-page="themes"] .theme-body,
  body[data-totink-page="gallery"] .gallery-card-body {
    min-width: 0 !important;
    padding: 10px !important;
  }

  body[data-totink-page="gallery"] .gallery-card-body {
    display: flex !important;
    flex-direction: column !important;
  }

  body[data-totink-page="gallery"] .card-actions {
    margin-top: auto !important;
  }

  body[data-totink-page$="-detail"] .book-preview,
  body[data-totink-page$="-detail"] .preview-box,
  body[data-totink-page$="-detail"] .hero-cover {
    height: 176px !important;
    min-height: 176px !important;
  }

  body.scissor-skills-page #resetPresetBtn {
    height: 44px !important;
    min-height: 44px !important;
  }

  body[data-totink-page="not-found"] main {
    width: calc(100% - 32px) !important;
    margin: 20px auto !important;
    padding: 22px !important;
    border-radius: 22px !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    color: #000 !important;
    background: #fff !important;
  }

  [data-totink-header],
  [data-totink-footer],
  .totink-site-progress,
  .totink-mobile-dock,
  .hero-actions,
  .generator-controls,
  .no-print,
  button {
    display: none !important;
  }

  main,
  .container,
  .page-wrap,
  .site-shell-inner,
  .totink-main-frame {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .worksheet,
  .worksheet-page,
  .paper,
  .papersContainer {
    break-after: page;
    page-break-after: always;
    box-shadow: none !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }

  body.name-tracing-page,
  body.scissor-skills-page {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.name-tracing-page main > :not(#generator),
  body.scissor-skills-page main > :not(#generator),
  body.name-tracing-page #generator .panel,
  body.scissor-skills-page #generator .panel,
  body.name-tracing-page #generator .section-head,
  body.scissor-skills-page #generator .section-head,
  body.name-tracing-page #generator .info-grid,
  body.scissor-skills-page #generator .info-grid {
    display: none !important;
  }

  body.name-tracing-page #generator,
  body.scissor-skills-page #generator,
  body.name-tracing-page #generator .layout,
  body.scissor-skills-page #generator .layout,
  body.name-tracing-page #generator .layout > div,
  body.scissor-skills-page #generator .layout > div {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.name-tracing-page .preview-panel,
  body.scissor-skills-page .preview-panel,
  body.name-tracing-page .preview-wrap,
  body.scissor-skills-page .preview-wrap,
  body.name-tracing-page .preview-fit-area,
  body.scissor-skills-page .preview-stack,
  body.scissor-skills-page .animal-preview-shell,
  body.scissor-skills-page .animal-preview-fit-area {
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.name-tracing-page .papers-scale-wrap,
  body.name-tracing-page .papers-container,
  body.scissor-skills-page .preview-stack,
  body.scissor-skills-page .animal-paper-scale-wrap {
    width: 210mm !important;
    height: auto !important;
    margin: 0 !important;
    gap: 0 !important;
    transform: none !important;
    transform-origin: top left !important;
  }

  body.name-tracing-page .page,
  body.name-tracing-page .a4-page-instance,
  body.scissor-skills-page .page,
  body.scissor-skills-page .a4-paper {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.name-tracing-page .page:last-child,
  body.name-tracing-page .a4-page-instance:last-child,
  body.scissor-skills-page .page:last-child,
  body.scissor-skills-page .a4-paper:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}

/* Readability and responsive polish: titles may wrap between phrases, never inside a marked phrase. */
main :where(h1, h2, h3, .hero-title, .section-title, .book-title, .course-title, .theme-name) {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.nowrap-phrase {
  display: inline-block;
  white-space: nowrap;
}

html[lang="zh"] body[data-totink-page="contact"] main h1 br,
html[lang="zh"] body[data-totink-page="contact"] main h1 [data-i18n="hero_title_2"] {
  display: none !important;
}

body.totink-education-home .seo-guide .section-heading {
  display: block;
  max-width: 1040px;
}

body.totink-education-home .seo-guide .section-title {
  width: 100%;
  max-width: 880px;
}

body.totink-education-home .seo-guide .section-text {
  width: 100%;
  max-width: 940px;
  margin-top: 14px;
}

body[data-totink-page="picture-books"] .book-card .desc {
  display: -webkit-box;
  min-height: calc(1.55em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media screen and (max-width: 760px) {
  html {
    scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  html body {
    padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  }

  html body main :where(h1, h2, h3, .hero-title, .section-title, .book-title, .course-title, .theme-name) {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: balance;
  }

  html[lang="zh"] body main :where(h1, h2, h3, .hero-title, .section-title) {
    letter-spacing: 0 !important;
  }

  body.totink-education-home .hero-title {
    font-size: clamp(28px, 8.1vw, 34px) !important;
    line-height: 1.13 !important;
  }

  body.totink-education-home .hero-copy p {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    -webkit-line-clamp: unset !important;
  }

  body.name-tracing-page .hero h1,
  body[data-totink-page="about"] main h1,
  body[data-totink-page="gallery"] main h1 {
    font-size: clamp(25px, 7.4vw, 32px) !important;
    line-height: 1.14 !important;
  }

  body[data-totink-page="about"] .hero-badges,
  body[data-totink-page="privacy"] .hero-badges {
    display: flex !important;
    width: 100% !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    gap: 8px !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
  }

  body[data-totink-page="about"] .hero-badges > *,
  body[data-totink-page="privacy"] .hero-badges > * {
    flex: 1 1 132px !important;
    justify-content: center;
    text-align: center;
  }

  body[data-totink-page="contact"] .hero-pills {
    display: grid !important;
    width: 100% !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)) !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  body[data-totink-page="contact"] .hero-pills > * {
    min-width: 0 !important;
  }

  body[data-totink-page="gallery"] .hero-badges {
    width: 100% !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
  }

  body[data-totink-page="themes"] .hero-mini-features {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body[data-totink-page="themes"] .mini-feature {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    padding: 10px 12px !important;
  }

  body[data-totink-page="themes"] .mini-feature strong {
    display: inline-block;
    font-size: 13px !important;
    white-space: nowrap;
  }

  body[data-totink-page="picture-books"] .book-grid,
  body[data-totink-page="courseware"] .course-list,
  body[data-totink-page="themes"] .themes-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body[data-totink-page="picture-books"] .book-card,
  body[data-totink-page="courseware"] .course-card,
  body[data-totink-page="themes"] .theme-card {
    display: grid !important;
    grid-template-columns: clamp(110px, 31vw, 176px) minmax(0, 1fr) !important;
    min-height: 190px !important;
  }

  body[data-totink-page="picture-books"] .cover,
  body[data-totink-page="courseware"] .course-thumb,
  body[data-totink-page="themes"] .theme-cover {
    width: 100% !important;
    height: 100% !important;
    min-height: 190px !important;
    aspect-ratio: auto !important;
  }

  body[data-totink-page="picture-books"] .book-body,
  body[data-totink-page="courseware"] .course-content,
  body[data-totink-page="themes"] .theme-body {
    padding: 13px !important;
  }

  body[data-totink-page="picture-books"] .book-title,
  body[data-totink-page="courseware"] .course-title,
  body[data-totink-page="themes"] .theme-name {
    min-height: 0 !important;
    font-size: 16px !important;
    line-height: 1.28 !important;
  }

  body[data-totink-page="picture-books"] .meta-row,
  body[data-totink-page="courseware"] .course-top,
  body[data-totink-page="courseware"] .course-meta {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }

  body[data-totink-page="picture-books"] .pill,
  body[data-totink-page="courseware"] .subject-pill,
  body[data-totink-page="courseware"] .course-meta span,
  body[data-totink-page="themes"] .theme-stats {
    font-size: 11px !important;
  }

  body[data-totink-page="picture-books"] .desc,
  body[data-totink-page="courseware"] .course-summary,
  body[data-totink-page="themes"] .theme-desc {
    min-height: calc(1.45em * 3) !important;
    margin: 8px 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    -webkit-line-clamp: 3 !important;
  }

  [data-totink-footer] > .totink-site-footer {
    margin-top: 36px !important;
    padding-bottom: 0 !important;
  }

  .totink-site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 30px var(--totink-mobile-gutter) 22px !important;
    gap: 22px 18px !important;
  }

  .totink-site-footer-brand,
  .totink-site-footer-grid > nav:first-of-type {
    grid-column: 1 / -1 !important;
  }

  .totink-site-footer-grid > nav:first-of-type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 18px;
  }

  .totink-site-footer-grid > nav:first-of-type h2 {
    grid-column: 1 / -1;
  }

  .totink-site-footer-grid nav {
    gap: 9px;
  }

  .totink-site-footer-grid nav h2 {
    margin-bottom: 2px;
    font-size: 14px !important;
  }

  .totink-site-footer-grid nav a,
  .totink-site-footer-brand p {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .totink-site-footer-bottom {
    padding: 16px var(--totink-mobile-gutter) 22px !important;
  }
}

@media screen and (max-width: 390px) {
  body[data-totink-page="picture-books"] .book-card,
  body[data-totink-page="courseware"] .course-card,
  body[data-totink-page="themes"] .theme-card {
    grid-template-columns: 104px minmax(0, 1fr) !important;
  }

  body[data-totink-page="picture-books"] .book-body,
  body[data-totink-page="courseware"] .course-content,
  body[data-totink-page="themes"] .theme-body {
    padding: 11px !important;
  }
}
