.reading-action-group, .share-actions { display: flex; align-items: center; gap: 4px; }
.reading-action-group .detail-button { min-width: 44px; }
.intro .reading-share { pointer-events: auto; flex-shrink: 0; min-height: 44px; }
body:not([data-state="reading"]) .reading-share { display: none; }
body[data-state="reading"] .intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
body[data-state="reading"] .intro h1 { min-width: 0; font-size: clamp(20px, 3vw, 40px); }
.share-action, #shareMore { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 6px; border: 0; background: transparent; font: inherit; font-size: 11px; color: #485e7e; white-space: nowrap; cursor: pointer; }
#shareMore { font-size: 22px; line-height: 1; height: 44px; }
#shareX { gap: 8px; height: 44px; padding: 8px 12px; border: 1px solid #b7acb7; border-radius: 100px; background: #fffcf7; color: #27365d; font-size: 13px; font-weight: 500; line-height: 1; letter-spacing: .01em; box-shadow: 0 2px 0 #e9dff04d; }
#shareX img { display: block; flex: 0 0 16px; width: 16px; height: 16px; }
#shareX:hover { background: #fff1f6; border-color: #938399; }
#shareX:active { background: #f8dce8; box-shadow: none; }
.share-action[hidden], #shareMore[hidden], .share-dialog [hidden] { display: none !important; }
.share-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 20px; border: 1px solid #a6a5b9; border-radius: 22px; background: #fffcf7; color: #27365d; box-shadow: 0 18px 70px #44364c33; overflow: auto; }
.share-dialog:not([open]) { display: none; }
.share-dialog::backdrop { background: #302b48aa; backdrop-filter: blur(6px); opacity: 1; transition: opacity 180ms ease; }
.share-dialog[data-window-phase="opening"]::backdrop, .share-dialog[data-window-phase="closing"]::backdrop { opacity: 0; }
.share-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.share-heading h2 { font-size: 17px; margin: 0; line-height: 1.6; }
.share-close { display: inline-grid; place-items: center; padding: 0; line-height: 1; width: 44px; height: 44px; flex: 0 0 44px; font-size: 22px; background: #f7cadc; color: #33456c; border: 1px solid #7481a1; border-radius: 50%; cursor: pointer; }
.share-preview { display: block; width: 100%; height: auto; border-radius: 12px; }
.share-status { min-height: 20px; margin: 10px 0; color: #627291; font-size: 11px; line-height: 1.8; text-align: center; }
.share-dialog-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.share-dialog-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border-radius: 100px; background: #f5e7f0; color: #33456c; border: 1px solid #a6a5b9; font: inherit; font-size: 12px; cursor: pointer; }
#shareLink { width: 100%; margin-top: 12px; padding: 12px; font-size: 16px; border: 1px solid #a6a5b9; border-radius: 8px; }
.share-dialog [data-typing="true"] { cursor: pointer; }
.share-dialog .typing-char.is-pending { color: transparent !important; }
.share-dialog button:focus-visible, .share-dialog a:focus-visible, .share-action:focus-visible, #shareMore:focus-visible { outline: 2px solid #9464bb; outline-offset: 3px; }
.shared-result main { max-width: 1000px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.shared-result .result-heading h1 { min-width: 0; margin: 0; font-size: clamp(21px, 4vw, 38px); }
.result-heading .share-actions { flex-shrink: 0; }
.shared-result .result-intro { margin: 0 0 20px; }
.result-image { display: block; width: 100%; height: auto; border-radius: 16px; }
.result-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; margin-block: 20px 32px; }
.result-meanings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.result-meanings section { border-top: 1px solid var(--line); padding-top: 14px; }
.result-meanings .result-position { margin: 0; font-size: 12px; color: #8e789a; }
.shared-result .result-meanings h2 { font-size: 17px; margin: 8px 0; line-height: 1.8; }
.result-meanings h2 span { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 100px; background: #e4e8fa; white-space: nowrap; font-weight: 400; }
.result-meanings h2 span[data-orientation="upright"] { background: #f8dce8; color: #9b426b; }
.result-meanings p { margin: 0; }
.result-footer { margin-top: 35px; }
.result-footer a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 5px; }
html[data-motion-reduced="true"] .share-dialog::backdrop { transition: none; }
@media (prefers-reduced-motion: reduce) { .share-dialog::backdrop { transition: none; } }
@media (max-width: 760px) { .share-action { font-size: 10px; } }
@media (max-width: 360px) {
  #shareX { gap: 6px; padding-inline: 8px; font-size: 12px; }
  .share-actions { gap: 2px; }
  .result-heading { gap: 8px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  body[data-state="reading"] .experience { grid-template-rows: 45px 48px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .result-meanings { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .share-dialog { padding: 16px; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .share-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 4px 14px; max-width: 680px; padding: 12px 16px; }
  .share-heading { grid-column: 1/-1; margin-bottom: 4px; }
  .share-preview { grid-column: 1; grid-row: 2 / 4; }
  .share-status, .share-dialog-actions { grid-column: 2; margin: 0; align-self: center; }
  #shareLink { grid-column: 1/-1; }
}
