/* Shared dialog shell; the guide is loaded only after an explicit click. */
.works-guide-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(660px, calc(100vw - 40px));
  height: min(740px, calc(100vh - 40px));
  height: min(740px, calc(100dvh - 40px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 24, 22, .16);
  border-radius: 12px;
  background: #f2efe7;
  color: #171816;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .26);
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans CJK SC', 'Segoe UI', sans-serif;
  text-align: left;
  overscroll-behavior: contain;
}
.works-guide-dialog[open] { display: flex; flex-direction: column; }
.works-guide-dialog::backdrop { background: rgba(10, 11, 10, .58); }
.works-guide-dialog__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  min-height: 54px;
  padding: 10px 16px;
  border-bottom: 1px solid #d8d6cf;
  background: #f7f5ef;
}
.works-guide-dialog .works-guide-dialog__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: .01em; color: #171816; }
.works-guide-dialog__controls { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.works-guide-dialog .works-guide-dialog__open { color: #62645e; font: inherit; font-size: 12px; line-height: 1.5; text-decoration: none; white-space: nowrap; }
.works-guide-dialog .works-guide-dialog__open:hover { color: #171816; text-decoration: underline; }
.works-guide-dialog .works-guide-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 34px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #d8d6cf;
  border-radius: 4px;
  background: transparent;
  color: #171816;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.works-guide-dialog .works-guide-dialog__close:hover { background: #e9e6de; }
.works-guide-dialog__open:focus-visible, .works-guide-dialog__close:focus-visible { outline: 2px solid #171816; outline-offset: 3px; }
.works-guide-dialog__frame { display: block; flex: 1 1 auto; width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; background: #f2efe7; }
@media (max-width: 600px) {
  .works-guide-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 8px; }
  .works-guide-dialog__header { min-height: 52px; padding: 8px 12px; gap: 8px; }
  .works-guide-dialog__controls { gap: 10px; }
  .works-guide-dialog .works-guide-dialog__title { font-size: 14px; }
  .works-guide-dialog .works-guide-dialog__open { font-size: 11px; }
}

/* A small original line face, with no image request or automatic animation. */
body.works-guide-ready a[data-works-guide] { display: none !important; }
.works-guide-launcher.works-guide-launcher {
  position: fixed;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: auto;
  min-width: 0;
  min-height: 44px;
  max-width: calc(100vw - 28px);
  margin: 0 0 env(safe-area-inset-bottom, 0px);
  padding: 8px 13px 8px 10px;
  border: 1px solid #b9b9ae;
  border-radius: 24px;
  background: #f8f8f3;
  color: #20211f;
  box-shadow: 0 3px 14px rgba(20, 22, 18, .10);
  font: 500 12px/1.4 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  letter-spacing: .015em;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  touch-action: none;
  cursor: grab;
}
.works-guide-launcher.works-guide-launcher[hidden] { display: none !important; }
.works-guide-launcher.works-guide-launcher:hover { color: #ad3b2e; border-color: #ad3b2e; background: #f8f8f3; }
.works-guide-launcher.works-guide-launcher:focus-visible { outline: 2px solid #20211f; outline-offset: 4px; }
.works-guide-launcher.is-dragging { cursor: grabbing; }
.works-guide-launcher__face { position: relative; display: block; width: 28px; height: 24px; border: 1px solid currentColor; border-radius: 46% 46% 42% 42%; flex: 0 0 auto; }
.works-guide-launcher__face::before { content: ''; position: absolute; left: 7px; top: 7px; width: 2px; height: 3px; background: currentColor; border-radius: 50%; box-shadow: 10px 0 0 currentColor; }
.works-guide-launcher__face > span { position: absolute; width: 8px; height: 4px; left: 9px; top: 12px; border-bottom: 1px solid currentColor; border-radius: 0 0 50% 50%; }
.works-guide-move-help { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media print { .works-guide-launcher, .works-guide-move-help { display: none !important; } }
