.pocket-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 13px; border: 1px solid #c3cde4; border-radius: 30px; background: transparent; color: var(--blue); font: .75rem var(--mono); }
.pocket-trigger > span:first-child { font-size: 1.3rem; }
.pocket-trigger:hover, .pocket-trigger:focus-visible { background: var(--lime); border-color: #aeb864; }
.motion-enabled .pocket-trigger > span:first-child { transition: transform .3s; }
.motion-enabled .pocket-trigger:hover > span:first-child { transform: rotate(90deg); }
.pocket-fleck { position: fixed; z-index: 100; pointer-events: none; font: 1.25rem/1 var(--mono); user-select: none; }
#pocket-dialog { width: min(690px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); border: 1px solid #b4c3df; background: #f6f7fd; overflow-x: hidden; box-shadow: 0 24px 90px #18255540; }
#pocket-dialog.is-music-postcard[data-panel="music"] { width: min(1000px, calc(100vw - 24px)); }
#pocket-dialog.is-music-postcard[data-panel="music"] .pocket-intro { max-width: 650px; margin-bottom: 17px; }
#pocket-dialog::backdrop { background: #17213bbf; backdrop-filter: blur(8px); }
.pocket-topbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 23px; border-bottom: 1px solid #cad3e7; background: #f6f7fdf5; }
.pocket-topbar .eyebrow { margin: 0; font-size: .57rem; color: var(--blue); }
.pocket-topbar > div { display: flex; align-items: center; gap: 16px; }
#pocket-close { border: 0; background: transparent; min-height: 44px; padding: 5px; font-size: .8rem; }
#pocket-close > span:last-child { font-size: 1.3rem; margin-left: 5px; }
.pocket-body { position: relative; padding: 27px 35px 22px; }
.pocket-doodle { position: absolute; top: 16px; right: 35px; color: #506bcb; transform: rotate(9deg); font: 2.1rem var(--serif); margin: 0; opacity: .5; pointer-events: none; }
#pocket-title { font: 3.45rem/1.1 var(--serif); margin: 0 0 17px; max-width: 85%; }
.pocket-intro { color: #65718b; font-size: .91rem; max-width: 450px; line-height: 1.8; margin-bottom: 24px; }
.pocket-tabs { display: flex; gap: 7px; margin: 0 0 25px; border-bottom: 1px solid #c3cee5; padding-bottom: 13px; }
.pocket-tabs button { border: 1px solid #c0cde8; background: transparent; border-radius: 30px; min-height: 43px; padding: 8px 17px; font-size: .82rem; color: #526180; }
.pocket-tabs [aria-selected="true"] { border-color: var(--blue); background: var(--blue); color: white; }
.pocket-body h3 { font: 2rem/1.3 var(--serif); margin-bottom: 10px; }
.pocket-panel-note { font-size: .82rem; color: #61708a; margin: 0 0 19px; line-height: 1.75; }
.pocket-circle-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 24px; }
.pocket-circle { border: 1px solid #c4cee3; background: white; border-radius: 50%; overflow: hidden; }
.pocket-circle svg { display: block; width: 100%; }
.pocket-axis { stroke: #a0adc7; stroke-width: 1; }
.pocket-unit-circle { fill: none; stroke: #b1c0e2; stroke-width: 1.5; }
.pocket-radius { stroke: var(--blue); stroke-width: 2; }
.pocket-cos-line { stroke: #b99a39; stroke-width: 3; }
.pocket-sin-line { stroke: #b75a58; stroke-width: 2; stroke-dasharray: 4 3; }
.pocket-angle-arc { fill: none; stroke: #769246; stroke-width: 2; }
#pocket-point { fill: var(--blue); stroke: white; stroke-width: 3; }
.pocket-circle text { font: 12px var(--mono); fill: #617391; }
.pocket-equation .eyebrow { font-size: .54rem; color: #5b6c8c; margin-bottom: 14px; }
.pocket-formula { font: 1.15rem/1.6 var(--serif); margin-bottom: 10px; }
#pocket-complex { display: block; font: 1.15rem/1.8 var(--mono); color: var(--blue); border-bottom: 1px solid #c7d1e6; padding-bottom: 13px; margin-bottom: 15px; }
#pocket-identity { color: var(--blue); font: 1.5rem var(--serif); background: var(--lime); padding: 6px 12px; border-radius: 3px; margin: 0 0 15px; }
.pocket-component { display: flex; justify-content: space-between; gap: 12px; font: .7rem/1.9 var(--mono); color: #65728d; }
.pocket-angle-label { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: .81rem; margin: 22px 0 4px; }
.pocket-angle-label output { font-family: var(--mono); color: var(--blue); }
#pocket-angle { width: 100%; min-height: 44px; accent-color: var(--blue); padding: 0; cursor: pointer; background: transparent; border: 0; }
.pocket-angle-presets { display: flex; gap: 8px; margin: 9px 0 22px; }
.pocket-angle-presets button { flex: 1; min-height: 42px; border: 1px solid #c4cee3; border-radius: 3px; background: white; color: #566889; font: .75rem var(--mono); }
.pocket-angle-presets button[aria-pressed="true"] { background: var(--lime); border-color: #a8b163; color: var(--ink); }
.pocket-paper-link { font-size: .8rem; }
.pocket-key-hint { font-size: .66rem; line-height: 1.8; color: #7b8498; border-top: 1px solid #cad3e7; margin: 26px 0 0; padding-top: 17px; }
#pocket-dialog [hidden] { display: none !important; }
.motion-enabled #pocket-dialog[open] .pocket-body { animation: pocket-arrives .3s ease-out; }
@keyframes pocket-arrives { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
html[lang="zh-CN"] #pocket-title { font-size: 2.5rem; line-height: 1.5; }
html[lang="zh-CN"] .pocket-body h3 { font-size: 1.65rem; }
@media (max-width: 600px) {
  .pocket-body { padding: 24px 21px 21px; }
  .pocket-topbar { padding: 8px 17px; }
  .pocket-topbar .eyebrow { max-width: 125px; line-height: 1.7; }
  .pocket-topbar > div { gap: 11px; }
  #pocket-title { font-size: 2.8rem; }
  .pocket-doodle { right: 21px; font-size: 1.65rem; top: 23px; }
  .pocket-circle-layout { gap: 13px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .pocket-equation .eyebrow { font-size: .45rem; margin-bottom: 8px; line-height: 1.8; }
  .pocket-formula { font-size: .95rem; }
  #pocket-complex { font-size: .83rem; padding-bottom: 9px; margin-bottom: 8px; }
  .pocket-component { font-size: .63rem; }
  #pocket-identity { font-size: 1.15rem; padding: 5px 7px; }
  .pocket-trigger { font-size: .65rem; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { #pocket-dialog[open] .pocket-body { animation: none; } .pocket-trigger > span:first-child { transition: none; transform: none !important; } }
@media print { .pocket-trigger, #pocket-dialog, .pocket-fleck { display: none; } }
