:root {
  --accent: #a8174b;
  --accent-soft: #fcf2f5;
  --ink: #262a31;
  --muted: #636b76;
  --line: #e4e6e9;
  --soft: #f6f7f8;
  --focus: #245cc2;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 24px; top: -80px; z-index: 100; padding: 12px 20px; border-radius: 6px; background: white; box-shadow: 0 4px 16px #0002; }
.skip:focus { top: 12px; }
.site-header { height: 72px; background: white; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1228px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; }
.brand-logo { display: block; width: 220px; height: 39px; overflow: hidden; }
.brand img { display: block; width: 220px; height: auto; transform: translateY(-16px); }
.header-tools { display: flex; align-items: center; gap: 16px; }
.portal-label { font-size: 13px; font-weight: 600; letter-spacing: .035em; }
.review-label { color: #777980; font-size: 10px; line-height: 1.5; padding: 3px 7px; border: 1px solid #e9e9ec; border-radius: 4px; white-space: nowrap; }
.help-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 11px; background: transparent; border-radius: 6px; color: #636970; font-size: 12px; margin-right: -11px; }
.help-button svg { width: 19px; height: 19px; }
.help-button:hover { background: var(--soft); color: var(--ink); }
main { width: 100%; max-width: 1228px; margin: 0 auto; padding: 28px 24px 20px; scroll-margin-top: 110px; }
.search { display: flex; align-items: center; gap: 10px; width: 330px; flex-shrink: 0; height: 46px; padding: 0 14px; background: white; border: 1px solid #dfe2e6; border-radius: 7px; transition: border-color .15s; }
.search svg { color: #8b9199; width: 18px; height: 18px; }
.search input { border: 0; outline: 0; min-width: 0; width: 100%; height: 100%; color: var(--ink); font-size: 13px; background: transparent; }
.search input::placeholder { color: #858b94; }
.search:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 2px; }
.search input:focus-visible { outline: 0; }
.filter-row { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #dedfe3; margin-bottom: 22px; }
.filter-tabs { display: flex; align-items: stretch; gap: 25px; min-width: 0; }
.filter-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: 48px; position: relative; padding: 0 2px 9px; background: transparent; color: #636b76; font-size: 13px; white-space: nowrap; }
.filter-tabs button::after { content: ""; height: 2px; background: transparent; position: absolute; right: 0; bottom: -1px; left: 0; border-radius: 2px 2px 0 0; }
.filter-tabs button:hover { color: var(--ink); }
.filter-tabs button.active { color: var(--accent); font-weight: 650; }
.filter-tabs button.active::after { background: var(--accent); }
.filter-tabs svg { width: 15px; height: 15px; }
#result-count { margin: 0 0 8px auto; flex-shrink: 0; color: #7e838b; font-size: 11px; font-variant-numeric: tabular-nums; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.app-card { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; border: 1px solid #e2e5e8; border-radius: 9px; padding: 18px 20px 0; background: white; box-shadow: 0 1px 2px #17202b03; transition: border-color .16s, box-shadow .16s; }
.app-card:hover { border-color: #c9cdd3; box-shadow: 0 4px 14px #26304008; }
.app-card:has(.app-open:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-top { display: flex; align-items: center; gap: 11px; min-height: 34px; }
.app-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; background: #f4f5f7; color: #666d78; flex-shrink: 0; }
.app-icon svg { width: 21px; height: 21px; }
.app-category { color: #69717c; font-size: 11px; letter-spacing: .02em; }
.favorite { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; margin: -5px -9px -5px auto; background: transparent; color: #9ba2ac; border-radius: 6px; font-size: 23px; line-height: 1; }
.favorite svg { width: 19px; height: 19px; stroke-width: 1.6; }
.favorite:hover { background: #f7f7f8; color: #5f6671; }
.favorite.selected { color: var(--accent); }
.favorite.selected svg { fill: var(--accent); stroke: var(--accent); }
.card-hint svg { width: 14px; height: 14px; }
.app-open { display: block; width: 100%; padding: 10px 0; background: transparent; text-align: left; flex: 1; }
.app-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 9px; }
.app-open:focus-visible { outline: 0; }
.app-title { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.65; letter-spacing: .01em; }
.app-description { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 6px 0 0; min-height: 44px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 10px; border-top: 1px solid #eff0f2; }
.card-bottom button { position: relative; z-index: 2; min-height: 44px; background: transparent; padding: 0 5px; margin-left: -5px; border-radius: 4px; text-align: left; font-size: 12px; color: #626b77; }
.card-bottom button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.card-bottom > span { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; font-weight: 600; }
.empty { text-align: center; background: white; border: 1px solid var(--line); padding: 60px 24px; border-radius: 9px; color: var(--muted); }
.empty > svg { width: 30px; height: 30px; color: #adb3bc; margin-bottom: 9px; }
.empty h3 { color: #515862; font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.empty p { font-size: 12px; margin: 0 0 20px; }
.empty button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 12px; }
.page-footer { margin-top: 24px; padding: 0 1px; }
.support-links { display: flex; align-items: center; gap: 25px; }
.support-links button, .support-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0; background: transparent; font-size: 12px; color: #606772; }
.support-links button:hover, .support-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.support-links a span { color: #8c929b; font-size: 13px; }
.usage-note { margin: 0; color: #69717c; font-size: 11px; line-height: 1.9; }
dialog { width: calc(100% - 40px); max-width: 620px; max-height: 86vh; padding: 26px 32px 30px; color: var(--ink); border: 1px solid #e8e9ec; border-radius: 14px; box-shadow: 0 24px 90px #18202d33; }
dialog::backdrop { background: #1c243a55; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading > span { font-size: 11px; color: var(--muted); }
#close-dialog { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: #f5f6f7; border-radius: 7px; margin: -6px -8px -6px 0; color: #727984; }
#close-dialog:hover { background: #eaecf0; color: var(--ink); }
#close-dialog svg { width: 18px; height: 18px; }
dialog h2 { font-size: 22px; margin: 22px 0 18px; line-height: 1.5; }
dialog p, dialog li { font-size: 13px; line-height: 1.95; color: #666d78; }
dialog strong { color: var(--ink); font-weight: 600; }
dialog ol { padding-left: 23px; }
dialog li + li { margin-top: 16px; }
dialog a:not(.dialog-primary) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.template-select { width: 100%; padding: 12px; margin-top: 7px; min-height: 44px; border: 1px solid #dfe2e7; border-radius: 6px; background: white; color: var(--ink); }
dialog textarea { display: block; width: 100%; min-height: 225px; border: 1px solid #dfe2e7; border-radius: 6px; padding: 15px; font-size: 12px; line-height: 1.9; resize: vertical; margin: 9px 0 14px; color: #454c57; background: #fafbfc; }
.copy-button, .dialog-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; border-radius: 6px; padding: 11px 20px; background: var(--accent); color: white; font-size: 12px; font-weight: 600; }
.copy-button:hover, .dialog-primary:hover { background: #90113f; }
.template-note { font-size: 11px !important; color: #858b95 !important; }
#template-status { color: #286140; font-size: 12px; min-height: 1.7em; }
.workflow-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.workflow-guide { padding-left: 24px; }
.workflow-guide li { padding-left: 5px; margin-bottom: 20px; }
.workflow-guide a { margin-top: 7px; }
.toast { position: fixed; z-index: 100; bottom: 26px; left: 50%; max-width: calc(100% - 36px); transform: translate(-50%, 10px); background: #303641; color: white; padding: 12px 20px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; font-size: 12px; box-shadow: 0 8px 30px #121a2725; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 950px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-tabs { gap: 20px; }
  .portal-label { font-size: 12px; }
  .review-label { display: none; }
  .header-tools { gap: 15px; }
}
@media (max-width: 650px) {
  .site-header { height: 74px; }
  .header-inner { padding: 0 20px; gap: 12px; }
  .brand-logo { width: 185px; height: 33px; }
  .brand img { width: 185px; transform: translateY(-13.5px); }
  .header-tools { gap: 6px; }
  .portal-label { display: none; }
  .help-button { padding: 0 7px; margin-right: -7px; font-size: 11px; gap: 5px; }
  main { padding: 26px 20px 24px; scroll-margin-top: 90px; }
  .search { width: 100%; margin-top: 21px; }
  .filter-row { display: block; border-bottom: 0; margin-bottom: 14px; }
  .filter-tabs { gap: 4px 16px; flex-wrap: wrap; overflow: visible; padding: 0 0 1px; border-bottom: 1px solid #dedfe3; }
  .filter-tabs button { min-height: 44px; font-size: 12px; padding-bottom: 8px; }
  .filter-tabs button::after { bottom: -1px; }
  #result-count { display: block; margin: 12px 0 0; text-align: right; font-size: 10px; }
  .app-grid { grid-template-columns: 1fr; gap: 12px; }
  .app-card { padding: 17px 20px 0; }
  .app-open { padding-top: 10px; padding-bottom: 12px; }
  .app-title { font-size: 16px; }
  .app-description { min-height: 0; font-size: 14px; }
  .card-bottom { margin-top: 2px; }
  .support-links { gap: 20px; flex-wrap: wrap; }
  .support-links button, .support-links a { font-size: 12px; }
  .page-footer { margin-top: 18px; }
  .usage-note { font-size: 10px; margin-top: 5px; }
  dialog { padding: 22px; width: calc(100% - 28px); border-radius: 11px; }
  dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.guide-steps { list-style: none; counter-reset: guide-step; padding: 0; }
.guide-steps > li { position: relative; counter-increment: guide-step; padding-left: 40px; margin: 0 0 22px; }
.guide-steps > li::before { content: counter(guide-step, decimal-leading-zero); position: absolute; top: 1px; left: 0; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 650; }
.guide-steps p { margin: 4px 0 10px; }
.guide-tip { padding: 13px 15px; border-radius: 6px; background: #f5f6f8; font-size: 11px; }
.dialog-intro { margin-bottom: 19px; }
.dialog-secondary, .dialog-text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; background: white; border: 1px solid var(--line); border-radius: 6px; color: #59616d; font-size: 12px; }
.dialog-secondary:hover, .dialog-text-button:hover { background: var(--soft); }
.dialog-text-button { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.field-label { display: block; margin-top: 16px; color: #626a76; font-size: 12px; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.checklist { padding-left: 20px; }
.checklist li + li { margin-top: 10px; }

/* Compact search and category toolbar, without an introductory heading. */
.app-toolbar { display: flex; align-items: center; gap: 24px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid #dedfe3; }
.app-toolbar .filter-row { flex: 1; min-width: 0; margin: 0; border: 0; }
.app-toolbar .filter-tabs button { padding-bottom: 0; }
.app-toolbar #result-count { margin-bottom: 0; }
@media (max-width: 1100px) {
  .app-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .app-toolbar .search { order: -1; width: 100%; margin: 0; }
}
@media (max-width: 650px) {
  .app-toolbar { margin-bottom: 16px; }
  .app-toolbar .filter-tabs { border-bottom: 0; }
  .app-toolbar #result-count { margin-top: 10px; }
}
