/* Scienshell mobile usability refinements, 2026-11-02. */
/* Public mobile reading and touch controls. Studio is intentionally excluded. */
@media (max-width: 719px), (pointer: coarse) and (max-width: 1023px) and (max-height: 500px) {
  body.faq-page:not(.studio-page) .faq > details {
    padding: 0;
  }
  body.faq-page:not(.studio-page) .faq > details[open] {
    padding-bottom: 16px;
  }
  body.faq-page:not(.studio-page) .faq > details > summary {
    min-height: 60px;
    padding: 16px 0;
    touch-action: manipulation;
  }
  body.faq-page:not(.studio-page) .faq > details > summary::after {
    flex: none;
  }
  body.faq-page:not(.studio-page) .faq > details > summary + p {
    margin-top: 0;
  }

  body.watch-page:not(.studio-page) .watch-desc-toggle,
  body.watch-page:not(.studio-page) .watch-access.is-purchase-offer .film-plans-note {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 0;
    box-sizing: border-box;
    line-height: 1.5;
    touch-action: manipulation;
  }

  body.inner:not(.studio-page) footer[data-footer] .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-inline: max(16px, var(--safe-left, 0px)) max(16px, var(--safe-right, 0px));
  }
  body.inner:not(.studio-page) footer[data-footer] .site-footer > :is(nav, div):last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    /* Existing separators are text nodes; shrink them without altering links. */
    font-size: 0;
    line-height: 0;
  }
  body.inner:not(.studio-page) footer[data-footer] .site-footer > :is(nav, div):last-child > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    touch-action: manipulation;
  }
}

/* Keep the existing warm paper login surface and make secondary text readable.
   The card scope also wins over the later, dynamically loaded login stylesheet. */
body:not(.studio-page) .login-overlay :is(.login-card, .account-box) :is(.login-sub, .login-legal, .login-close) {
  color: #625f59;
}
body:not(.studio-page) .login-overlay :is(.login-card, .account-box) :is(.login-legal a, .login-text) {
  color: #4e4a44;
}
body:not(.studio-page) .login-overlay :is(.login-card, .account-box) .email-login-form input::placeholder {
  color: #6d6962;
  opacity: 1;
}
body:not(.studio-page) .login-overlay :is(.login-card, .account-box) :is(.login-legal a, .login-text, .login-close):hover {
  color: #111;
}

/* Keep the desktop catalogue unchanged; mobile visitors can jump between plans. */
body.join-page .plans-jump { display: none; }

@media (max-width: 719px) {
  body.join-page .plans-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 20px 0 16px;
    border-bottom: 1px solid var(--line, #24333a);
  }
  body.join-page .plans-jump a {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px;
    border-radius: 6px;
    color: var(--text, #f4f7f8);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    touch-action: manipulation;
  }
  body.join-page .plans-jump a:is(:hover, :active) { background: var(--ui-soft, rgba(232, 241, 255, .065)); }
  body.join-page .plans-jump a:focus-visible { outline: 2px solid var(--accent-text, #8dcff0); outline-offset: 2px; }
  body.join-page:not(:has(#season-pass)) .plans-jump a[href="#season-pass"],
  body.join-page:not(:has(#life-pass)) .plans-jump a[href="#life-pass"] { display: none; }
  body.join-page :is(#plans, #season-pass, #life-pass) {
    scroll-margin-top: calc(var(--safe-top, 0px) + 128px);
  }
  body.join-page :is(#plans, #passes) { gap: 32px; }
  body.join-page :is(#plans, #passes) > .price-card {
    display: flex;
    grid-row: auto;
    flex-direction: column;
    gap: 0;
    padding: 24px 20px;
  }
  body.join-page :is(#plans, #passes) > .price-card > .shop-cover {
    align-self: stretch;
    margin: -24px -20px 18px;
  }
  body.join-page :is(#plans, #passes) > .price-card > h3 {
    min-block-size: 0;
    margin: 8px 0;
  }
  body.join-page :is(#plans, #passes) > .price-card > .meta {
    margin: 8px 0;
    line-height: 1.65;
  }
  body.join-page :is(#plans, #passes) > .price-card > .amount {
    min-block-size: 0;
    margin: 14px 0 6px;
    font-size: 34px;
    line-height: 1.2;
  }
  body.join-page :is(#plans, #passes) > .price-card > .btn { margin-top: 12px; }
  body.join-page #passes > .price-card > ul { margin: 8px 0 4px; line-height: 1.65; }
  body.join-page #passes > .price-card > .ss-season-credit { margin: 12px 0 0; padding-top: 12px; }
}

/* A multiline comment keeps the existing Post action and grows with the draft. */
.watch-page #comment-form {
  align-items: flex-end;
  gap: 8px;
  padding: 5px 7px 5px 14px;
}
.watch-page #comment-input {
  display: block;
  flex: 1 1 0;
  box-sizing: border-box;
  width: 0;
  min-width: 0;
  min-height: 44px;
  max-height: min(192px, 40dvh);
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--ui-highlight, #b6def4);
  font: 400 16px/24px var(--ui-font, var(--font));
  resize: none;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #506879 transparent;
}
.watch-page #comment-input::placeholder { color: var(--muted); opacity: 1; }
.watch-page #comment-input:focus-visible { outline: none; }
.watch-page #comment-form:focus-within {
  border-color: var(--ui-highlight, #b6def4);
  outline: 2px solid var(--ui-highlight, #b6def4);
  outline-offset: 2px;
}
.watch-page #comment-input:disabled { opacity: .65; cursor: wait; }
.watch-page #comment-form > button[type="submit"] {
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 44px;
  padding: 10px 14px;
}
.watch-page #comment-log .row > div {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.watch-page #comment-log .comment-actions { white-space: normal; }
