home-shortcut { display: block; }
home-shortcut[hidden], #shortcut-guide [hidden], #shortcut-guide:not([open]) { display: none; }

.shortcut-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px 24px; background: #f7f3e6; border-bottom: 1px solid #c4bb9e;
  padding: 13px max(16px, env(safe-area-inset-left));
}
.shortcut-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 64px; padding: 8px 28px; border: 2px solid #493617;
  border-radius: 10px; background: #ffd568; color: #272013; box-shadow: 0 2px 0 #493617;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 800; line-height: 1.35;
}
.shortcut-main:hover { background: #ffcb44; }
.shortcut-badge { width: 42px; height: 42px; display: inline-flex; position: relative; flex: none; }
.shortcut-badge img { width: 100%; height: 100%; border-radius: 9px; }
.shortcut-badge b {
  display: grid; place-items: center; position: absolute; right: -4px; bottom: -3px;
  width: 20px; height: 20px; border: 2px solid #ffd568; border-radius: 50%;
  background: #203f38; color: white; font: bold 16px/1 sans-serif;
}
.shortcut-strip p { margin: 0; font-size: 1.125rem; line-height: 1.5; color: #35483f; word-break: keep-all; }
#shortcut-guide {
  position: fixed; inset: 0; margin: auto; box-sizing: border-box; width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 32px); overflow: auto; padding: clamp(20px, 4vw, 32px);
  background: white; color: #172f2b; border: 1px solid #799086; border-radius: 14px;
  box-shadow: 0 14px 60px #132c3052; font-size: 1.25rem; line-height: 1.6; word-break: keep-all;
}
#shortcut-guide::backdrop { background: rgb(10 22 21 / 68%); }
#shortcut-title { margin: 0 0 18px; font-size: 1.625rem; line-height: 1.4; font-weight: 750; }
#shortcut-guide ol { list-style: decimal; margin: 0 0 18px; padding-left: 1.6em; }
#shortcut-guide li { margin: 0 0 12px; padding-left: .15em; }
#shortcut-guide li::marker { font-weight: 750; color: #155348; }
#shortcut-guide :is(button,a) {
  display: block; width: 100%; margin-top: 10px; padding: 10px 15px;
  text-align: center; min-height: 50px; border-radius: 7px; background: #194e44;
  color: white; font: inherit; font-weight: 700; text-decoration: none;
}
#shortcut-guide #shortcut-close { background: white; color: #223d37; border: 1px solid #799086; }
#shortcut-guide :focus-visible, .shortcut-main:focus-visible { outline: 3px solid #005ecb; outline-offset: 3px; }
#shortcut-message { font-size: 1.125rem; margin-top: 10px; overflow-wrap: anywhere; }
#shortcut-message:empty { display: none; }
#shortcut-desktop p { font-size: 1.125rem; }
@media (max-width: 600px) {
  .shortcut-strip { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 16px; text-align: center; }
  .shortcut-main { width: 100%; padding-inline: 12px; gap: 10px; }
  .shortcut-strip p { font-size: 1.0625rem; }
}

#shortcut-guide:has(#shortcut-desktop:not([hidden])) { width: min(740px, calc(100% - 28px)); }
#shortcut-desktop p { margin: 12px 0 22px; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.45; }
#shortcut-desktop a[draggable] { box-sizing: border-box; padding: 16px; background: #126039; color: white; font-size: clamp(1.5rem, 2.6vw, 2rem); cursor: grab; }
#shortcut-desktop small { display: block; font-size: .8em; }
@media (prefers-reduced-motion: no-preference) { #shortcut-desktop a { animation: shortcut-glow 2.4s ease-in-out infinite alternate; } @keyframes shortcut-glow { from { box-shadow: 0 0 0 2px #92cd9e; } to { box-shadow: 0 0 16px 6px #5cb077; } } }
@media (prefers-reduced-motion: no-preference) {
  #shortcut-desktop a[draggable] {
    animation: shortcut-glow 2.4s ease-in-out infinite alternate,
               shortcut-letter-light 1s ease-in-out infinite;
  }
  @keyframes shortcut-letter-light {
    0%, 100% { color: #fff; text-shadow: 0 1px 2px #0b3822; }
    50% { color: #ffed91; text-shadow: 0 1px 2px #183618, 0 0 5px #ffc44c, 0 0 12px #ffcb5180; }
  }
}
.shortcut-fallback { display:block; padding:14px; background:#ffd568; color:#272013; font-size:22px; font-weight:bold; text-align:center; }
