.desk-first-guide, .desk-help-dialog {
  background: var(--yd-paper); color: var(--yd-ink);
  border: 1px solid var(--yd-chrome-border); border-radius: 14px;
  box-shadow: 0 8px 28px #0002; font: 16px/1.5 'Figtree', sans-serif;
}
.dv-library-open, .library-back-to-desk {
  min-height:46px; padding:9px 14px; border:1px solid var(--yd-desk-control-border);
  border-radius:7px; color:var(--yd-desk-add-ink); background:var(--yd-desk-add-fill);
  font:500 16px/1.25 var(--serif); cursor:pointer;
}
.library-back-to-desk { margin-left:auto; flex-shrink:0; white-space:nowrap; }
#pocket-library .library-back-to-desk {
  min-height:44px; padding:7px 12px; border:0; border-left:1px solid var(--yd-tool-border);
  border-radius:0; background:transparent; color:var(--yd-ink); font:500 14px/1.25 var(--serif);
}
@media(max-width:600px) {
  #pocket-library .lib-search-v2-input { order:2; flex:1 1 100%; }
  #pocket-library .library-add-source-btn { margin-left:auto; }
  #pocket-library .library-back-to-desk { margin-left:0; padding:7px 8px; font-size:13px; }
}
@media(min-width:781px) { body #pocket-library { bottom:0; } }
.desk-first-guide { position: fixed; z-index: 11000; width: min(310px, calc(100vw - 24px)); padding: 18px; box-sizing: border-box; }
.desk-first-guide p { margin: 0 0 12px; }
.desk-first-guide button, .desk-help-dialog button {
  font: inherit; color: var(--yd-ink); background: var(--yd-chrome-raised);
  border: 1px solid var(--yd-chrome-border); border-radius: 7px;
  padding: 9px 13px; min-height: 44px; cursor: pointer; margin: 4px 8px 4px 0;
}
.desk-first-guide .desk-guide-more { background: transparent; font-size: 14px; }
.desk-help-dialog { width: min(600px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); padding: 28px; box-sizing: border-box; overflow: auto; }
.desk-help-dialog::backdrop { background: #1e1a1270; }
.desk-help-dialog h2 { font: 600 30px/1.2 'EB Garamond',serif; margin: 0 0 8px; }
.desk-help-dialog h3 { font: 600 23px/1.3 'EB Garamond',serif; }
.desk-help-dialog .desk-help-close { float:right; }
.desk-help-dialog p { clear: both; }
.desk-usage-choice { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--yd-chrome-border); }
.desk-feedback-form label { display:block; margin:18px 0; }
.desk-feedback-form input, .desk-feedback-form textarea, .desk-feedback-form select {
  width:100%; box-sizing:border-box; display:block; margin-top:6px; padding:10px;
  font:inherit; background:var(--yd-surface); color:var(--yd-ink);
  border:1px solid var(--yd-chrome-border); border-radius:6px;
}
.desk-feedback-form textarea { resize:vertical; }
.desk-help-dialog button:disabled { opacity:.6; cursor:default; }
.desk-help-dialog :focus-visible, .desk-first-guide :focus-visible { outline: 2px solid var(--yd-action,#4a667a); outline-offset:3px; }
.desk-guide-pulse { outline:2px solid var(--yd-action,#4a667a); outline-offset:4px; animation:desk-guide-pulse 1.5s ease-in-out 3; }
@keyframes desk-guide-pulse { 50% { outline-offset:9px; } }
@media(prefers-reduced-motion: reduce) { .desk-guide-pulse { animation:none; } }
.entry-desk-introduction { max-width: 360px; margin: 0; font: 20px/1.5 'EB Garamond',serif; color: #F0EBE1; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.product-info-page { background:var(--yd-chrome); color:var(--yd-ink); margin:0; font:16px/1.5 'Figtree',sans-serif; }
.product-info-page main { max-width:1050px; padding:32px 22px 80px; margin:auto; }
.product-info-page h1, .product-info-page h2 { font-family:'EB Garamond',Georgia,serif; }
.product-info-page a { color:var(--yd-desk-add-plus); }
.product-info-page table { width:100%; border-collapse:collapse; background:var(--yd-paper); }
.product-info-page td,.product-info-page th { text-align:left; padding:10px; border-bottom:1px solid var(--yd-chrome-border); }
.product-report-scroll { overflow-x:auto; }
.product-feedback-entry { white-space:pre-wrap; overflow-wrap:anywhere; background:var(--yd-paper); padding:16px; border-radius:10px; margin:12px 0; }
.desk-first-guide small { display:block; font:600 10px/1.4 'Figtree',sans-serif; letter-spacing:.12em; color:var(--yd-muted,var(--yd-ink)); margin-bottom:8px; }
.desk-first-guide h2 { font:600 24px/1.1 var(--serif); margin:0 0 10px; }
.desk-first-guide { max-height:calc(100dvh - 28px - var(--keyboard-height,0px)); overflow:auto; }
.desk-introduction-steps { list-style:none; counter-reset:steps; padding:0; margin:24px 0; }
.desk-introduction-steps li { counter-increment:steps; position:relative; padding:0 0 16px 38px; margin:16px 0; border-bottom:1px solid var(--yd-chrome-border); }
.desk-introduction-steps li::before { content:counter(steps); position:absolute; left:0; top:0; width:26px; height:26px; text-align:center; border-radius:50%; background:var(--yd-chrome-raised); font:600 18px/26px var(--serif); }
.desk-introduction-steps h3 { margin:0 0 8px; font-size:24px; }
.desk-introduction-steps p { margin:0; }
@media(max-width:780px) {
  .desk-help-dialog { padding:20px; }
  .desk-help-dialog h2 { font-size:27px; }
  .desk-first-guide { width:min(310px,calc(100vw - 24px)); padding:14px; font-size:14px; }
  .desk-first-guide h2 { font-size:22px; }
}
dialog.desk-help-dialog { position:fixed; inset:16px; margin:auto; height:fit-content; width:min(600px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); }
.desk-help-heading { display:flex; align-items:flex-start; gap:16px; }
.desk-help-heading h2 { flex:1; }
.desk-help-dialog .desk-help-close { float:none; margin:0; }
.desk-usage-choice summary { cursor:pointer; padding:8px 0; min-height:28px; }
.desk-introduction-steps li:last-child { padding-bottom:0; border:0; }
.pocket-writing-share { min-width:52px; min-height:44px; padding:8px 10px; border:1px solid var(--yd-chrome-border); border-radius:8px; color:var(--yd-ink); background:var(--yd-paper); font:500 15px/1.2 var(--serif); cursor:pointer; }

/* Phone tips reserve space in the active surface instead of floating above
   its controls. The Desk camera has its own viewport below the guide row. */
@media(max-width:700px) {
  [data-onboarding-slot] { flex: none; min-height: 0; }
  #phone-guide-slot { position: fixed; top: var(--pocket-header-total-h, var(--header-h, 64px)); left: 0; right: 0; z-index: 320; }
  body.desk-scope #desk-view-root,
  body.desk-scope .dv-surface.dv-pocket-plane,
  body #pocket-writing-overview { top: calc(var(--pocket-header-total-h, var(--header-h, 64px)) + var(--desk-guide-height, 0px)); }
  .desk-first-guide.desk-guide-in-flow { position: static; width: auto; max-height: none; border-radius: 0; box-shadow: none; padding: 12px 16px; font-size: 13px; }
  .desk-guide-in-flow small { margin: 0 0 4px; }
  .desk-guide-in-flow h2 { font-size: 21px; margin-bottom: 6px; }
  .desk-guide-in-flow p { margin-bottom: 6px; }
  .desk-guide-in-flow button { margin: 0 8px 0 0; padding: 7px 10px; font-size: 13px; }
}
