/* Wikisalad 専用のスタイル（このサイト以外には影響しない） */

:root {
  --ws-bg: #ffffff;
  --ws-ink: #202124;
  --ws-sub: #54595d;
  --ws-muted: #72777d;
  --ws-rule: #a7adb3;
  --ws-rule-light: #dde1e4;
  --ws-link: #2457b0;
  --ws-link-visited: #6b4ba1;
  --ws-surface: #f6f7f8;
  --ws-surface-2: #eaecf0;
  --ws-brand: #356b3f;
  --ws-brand-ink: #ffffff;
  --ws-notice: #fdf6e3;
  --ws-notice-rule: #d9b85c;
  --ws-chg: #fff0a6;
  --ws-error: #b3261e;
  --ws-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Times New Roman", serif;
  --ws-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  /* 重なり順はこの段階だけを使う */
  --ws-z-dev: 10;
  --ws-z-toast: 20;
  --ws-z-skip: 30;
  color-scheme: light;
}

/* 連打（隠しパネル用のフッター5回タップなど）でページが拡大されないようにする。ピンチでの拡大はできる */
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: var(--ws-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

a {
  color: var(--ws-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a.ws-link:visited {
  color: var(--ws-link-visited);
}
a.ws-ext::after {
  content: "↗";
  font-size: 0.75em;
  margin-left: 0.1em;
  color: var(--ws-muted);
}

:focus-visible {
  outline: 2px solid var(--ws-link);
  outline-offset: 2px;
}

.ws-skip {
  position: absolute;
  left: -9999px;
}
.ws-skip:focus {
  left: 8px;
  top: 8px;
  z-index: var(--ws-z-skip);
  background: var(--ws-bg);
  padding: 4px 8px;
}

/* ---- ヘッダー ---- */

.ws-header {
  border-bottom: 1px solid var(--ws-rule-light);
  background: var(--ws-bg);
}
.ws-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.ws-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ws-ink);
  text-decoration: none;
  min-width: 0;
}
.ws-logo:hover {
  text-decoration: none;
}
.ws-logo-mark {
  width: 36px;
  height: 36px;
  flex: none;
}
.ws-logo-name {
  font-family: var(--ws-serif);
  font-size: 1.35rem;
  line-height: 1.2;
}
.ws-header-search {
  flex: 1 1 260px;
  min-width: 0;
}
.ws-random {
  flex: none;
}

/* ---- 共通部品 ---- */

.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--ws-rule);
  border-radius: 4px;
  background: var(--ws-surface);
  color: var(--ws-ink);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.ws-btn:hover {
  background: var(--ws-surface-2);
  text-decoration: none;
}
.ws-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.ws-btn-primary {
  background: var(--ws-brand);
  border-color: var(--ws-brand);
  color: var(--ws-brand-ink);
}
.ws-btn-primary:hover {
  background: #2b5733;
}
.ws-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ws-search {
  display: flex;
  gap: 6px;
  width: 100%;
}
.ws-search input,
.ws-dialog input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--ws-rule);
  border-radius: 4px;
  font: inherit;
  font-size: 16px;
  background: var(--ws-bg);
  color: var(--ws-ink);
}

.ws-hint {
  color: var(--ws-sub);
  font-size: 0.85rem;
  margin: 4px 0 8px;
}
.ws-field-error {
  color: var(--ws-error);
  font-size: 0.85rem;
  margin: 6px 0 0;
}
.ws-field-error:empty {
  margin: 0;
}

.ws-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  outline: none;
}

.ws-message {
  max-width: 640px;
  margin: 40px auto;
}
.ws-message h1 {
  font-family: var(--ws-serif);
  font-weight: normal;
  font-size: 1.6rem;
}
.ws-error h1 {
  color: var(--ws-error);
}

/* 読み込み中: 記事の形の下書き（動かさない） */
.ws-loading {
  max-width: 1000px;
}
.ws-loading-status {
  margin: 8px 0 0;
  color: var(--ws-sub);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.ws-loading .ws-hint {
  margin-top: 2px;
}
.ws-skel {
  margin-top: 8px;
}
.ws-skel-title {
  width: 40%;
  height: 1.8rem;
  margin: 12px 0 10px;
  background: var(--ws-surface-2);
  border-radius: 2px;
}
.ws-skel-title-text {
  width: auto;
  height: auto;
  margin: 12px 0 4px;
  padding-bottom: 4px;
  background: none;
  border-radius: 0;
  border-bottom: 1px solid var(--ws-rule);
  font-family: var(--ws-serif);
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  line-height: 1.3;
  text-wrap: balance;
}
.ws-skel-sub {
  width: 55%;
  height: 0.8rem;
  margin: 0 0 24px;
  background: var(--ws-surface-2);
  border-radius: 2px;
}
.ws-skel-line {
  height: 0.9rem;
  margin: 0 0 0.85rem;
  background: var(--ws-surface-2);
  border-radius: 2px;
}
.ws-skel-line:nth-child(3n) {
  width: 93%;
}
.ws-skel-line:nth-child(5n) {
  width: 68%;
  margin-bottom: 1.8rem;
}

/* ---- トップページ（ヘッダーは出さず、検索欄を中央に置く） ---- */

body[data-view="top"] .ws-header {
  display: none;
}
body[data-view="top"] .ws-footer {
  text-align: center;
}
.ws-top {
  max-width: 560px;
  margin: 56px auto 24px;
  text-align: center;
}
.ws-top-logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
}
.ws-top-title {
  font-family: var(--ws-serif);
  font-weight: normal;
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.2;
  margin: 0;
}
.ws-top-lead {
  margin: 8px 0 20px;
  color: var(--ws-sub);
}
.ws-top .ws-search-wrap {
  text-align: left;
}
.ws-top-random {
  margin: 12px 0 0;
}
.ws-top-note {
  margin: 28px 0 0;
  color: var(--ws-muted);
  font-size: 0.85rem;
}

/* ---- 検索結果 ---- */

.ws-empty {
  margin: 24px 0;
}
.ws-empty p {
  margin: 0 0 12px;
}

.ws-search-page h1 {
  font-family: var(--ws-serif);
  font-weight: normal;
  border-bottom: 1px solid var(--ws-rule);
}
.ws-results {
  list-style: none;
  padding: 0;
}
.ws-results li {
  margin: 0 0 16px;
}
.ws-snippet {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ws-sub);
}

/* ---- 記事 ---- */

.ws-article {
  max-width: 1000px;
}
.ws-tabbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--ws-rule);
  margin-bottom: 4px;
}
.ws-tabs {
  display: flex;
}
.ws-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ws-link);
  cursor: pointer;
  min-height: 40px;
}
.ws-tab-active {
  color: var(--ws-ink);
  border-bottom-color: var(--ws-ink);
}
.ws-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.ws-tool {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ws-link);
  padding: 6px 8px;
  cursor: pointer;
  min-height: 40px;
}
.ws-tool:hover {
  text-decoration: underline;
}

.ws-title {
  font-family: var(--ws-serif);
  font-weight: normal;
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  line-height: 1.3;
  margin: 12px 0 2px;
  border-bottom: 1px solid var(--ws-rule);
  padding-bottom: 4px;
}
.ws-sitesub {
  font-size: 0.82rem;
  color: var(--ws-sub);
  margin-bottom: 8px;
}
.ws-notice {
  border: 1px solid var(--ws-notice-rule);
  border-left-width: 6px;
  background: var(--ws-notice);
  padding: 6px 12px;
  font-size: 0.86rem;
  margin: 8px 0 16px;
}
.ws-warnings {
  border: 1px solid #e0a29d;
  background: #fdf0ef;
  padding: 6px 12px 6px 28px;
  font-size: 0.86rem;
  margin: 0 0 16px;
}

.ws-content {
  font-size: 0.97rem;
}
.ws-content::after {
  content: "";
  display: block;
  clear: both;
}
.ws-content p {
  margin: 0.5em 0 0.9em;
}
.ws-heading {
  font-family: var(--ws-serif);
  font-weight: normal;
  line-height: 1.35;
  overflow: hidden;
}
h2.ws-heading {
  font-size: 1.5rem;
  margin: 1.2em 0 0.4em;
  border-bottom: 1px solid var(--ws-rule);
  padding-bottom: 2px;
}
h3.ws-heading {
  font-family: var(--ws-sans);
  font-weight: bold;
  font-size: 1.15rem;
  margin: 1em 0 0.3em;
}
h4.ws-heading,
h5.ws-heading,
h6.ws-heading {
  font-family: var(--ws-sans);
  font-weight: bold;
  font-size: 1rem;
  margin: 0.9em 0 0.3em;
}
.ws-content ul,
.ws-content ol {
  padding-left: 1.6em;
  margin: 0.3em 0 0.8em;
}
.ws-content li {
  margin: 0.15em 0;
}
.ws-content dl {
  margin: 0.3em 0 0.8em;
}
.ws-content dt {
  font-weight: bold;
}
.ws-content dd {
  margin-left: 1.6em;
}
.ws-content blockquote {
  margin: 1em 0;
  padding: 0 1em;
  border-left: 4px solid var(--ws-rule-light);
}
.ws-content pre {
  background: var(--ws-surface);
  border: 1px solid var(--ws-rule-light);
  padding: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
}
.ws-ref,
.ws-fact {
  font-size: 0.72em;
  line-height: 1;
  white-space: nowrap;
}
.ws-fact {
  color: var(--ws-sub);
}
.ws-hatnote {
  font-size: 0.88rem;
  color: var(--ws-sub);
  padding: 2px 0 6px 1.6em;
  border-bottom: 1px solid var(--ws-rule-light);
  margin-bottom: 8px;
}
.ws-math {
  vertical-align: middle;
  max-width: 100%;
}
.ws-math-block {
  display: block;
  margin: 0.6em auto;
}

/* 目次 */
.ws-toc {
  display: inline-block;
  min-width: 220px;
  max-width: 100%;
  border: 1px solid var(--ws-rule);
  background: var(--ws-surface);
  padding: 6px 14px 8px;
  margin: 8px 0 12px;
  font-size: 0.9rem;
}
.ws-toc summary {
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  min-height: 32px;
}
.ws-toc-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.ws-toc-num {
  color: var(--ws-sub);
}
.ws-toc-l3 {
  padding-left: 1.2em;
}
.ws-toc-l4,
.ws-toc-l5,
.ws-toc-l6 {
  padding-left: 2.4em;
}

/* 表 */
.ws-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0.6em 0 1em;
}
.ws-table {
  border-collapse: collapse;
  font-size: 0.88rem;
}
.ws-table th,
.ws-table td {
  border: 1px solid var(--ws-rule);
  padding: 4px 8px;
  vertical-align: top;
}
.ws-table th {
  background: var(--ws-surface-2);
  text-align: center;
}
.ws-wikitable,
.ws-plain {
  background: var(--ws-surface);
}
.ws-table caption {
  font-weight: bold;
  padding: 4px;
}
.ws-infobox-wrap {
  margin: 0 0 1em;
}
.ws-infobox {
  width: 100%;
  background: var(--ws-surface);
  border: 1px solid var(--ws-rule);
}
.ws-infobox th,
.ws-infobox td {
  border: 0;
  border-top: 1px solid var(--ws-rule-light);
}
.ws-infobox th {
  text-align: left;
  background: var(--ws-surface-2);
}
.ws-infobox img {
  max-width: 100%;
  height: auto;
}
.ws-table td img {
  max-width: 100%;
  height: auto;
}
.ws-inline-img {
  vertical-align: middle;
}

/* 画像 */
.ws-figure {
  margin: 0.4em 0 1em;
  border: 1px solid var(--ws-rule-light);
  background: var(--ws-surface);
  padding: 4px;
  max-width: 100%;
}
.ws-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.ws-figure figcaption {
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 4px 2px 0;
}
.ws-gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding: 0 !important;
}
.ws-gallery .ws-figure {
  float: none;
  width: auto;
  margin: 0;
}

/* 出典などの節 */
.ws-special-refs,
.ws-special-external {
  font-size: 0.88rem;
}
.ws-refs {
  font-size: 0.86rem;
}

/* 変換箇所の強調表示（開発者パネルでON） */
.ws-chg {
  background: var(--ws-chg);
  color: inherit;
  border-radius: 2px;
}
.ws-chg-cell {
  box-shadow: inset 0 0 0 2px #e3c200;
}
.ws-chg-img {
  outline: 3px solid #e3c200;
}
.ws-chg-block {
  background: var(--ws-chg);
}

/* ---- この記事について・生成設定 ---- */

.ws-about,
.ws-settings {
  clear: both;
  margin-top: 40px;
  border-top: 1px solid var(--ws-rule);
  padding-top: 8px;
  font-size: 0.9rem;
}
.ws-about h2,
.ws-settings h2 {
  font-family: var(--ws-serif);
  font-weight: normal;
  font-size: 1.35rem;
  margin: 8px 0;
}
.ws-about h3 {
  font-size: 1rem;
  margin: 16px 0 4px;
}
.ws-about-list {
  margin: 4px 0;
  padding-left: 1.4em;
}
.ws-settings {
  background: var(--ws-surface);
  border: 1px solid var(--ws-rule-light);
  border-radius: 6px;
  padding: 12px 16px 16px;
}
.ws-settings-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
}
.ws-field {
  margin: 0;
}
.ws-fieldset {
  border: 0;
  padding: 0;
}
.ws-field-label {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  padding: 0;
}
.ws-range {
  width: 100%;
  min-height: 32px;
  accent-color: var(--ws-brand);
}
.ws-range-value {
  font-variant-numeric: tabular-nums;
  font-weight: normal;
}
.ws-details summary {
  cursor: pointer;
  font-weight: bold;
  min-height: 32px;
}
.ws-details .ws-field {
  margin-top: 10px;
}
.ws-details .ws-field-sep {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ws-rule-light);
}
.ws-range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--ws-muted);
  font-size: 0.78rem;
}
.ws-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.ws-radio,
.ws-check label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  cursor: pointer;
}
.ws-radio input,
.ws-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ws-brand);
}
.ws-check .ws-hint {
  margin: 0 0 8px 26px;
}
.ws-settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ws-settings-status {
  margin: 0;
  color: var(--ws-brand);
  font-size: 0.86rem;
  min-height: 1.2em;
}
.ws-settings-status.ws-settings-error {
  color: var(--ws-error);
}
.ws-shared-note {
  background: var(--ws-notice);
  border: 1px solid var(--ws-notice-rule);
  padding: 6px 10px;
  margin: 0;
}

/* ---- フッター ---- */

.ws-footer {
  border-top: 1px solid var(--ws-rule-light);
  color: var(--ws-sub);
  font-size: 0.8rem;
  padding: 16px;
  max-width: 1120px;
  margin: 0 auto;
}
.ws-footer p {
  margin: 0 0 8px;
}

/* ---- 開発者パネル ---- */

.ws-dev {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-left: 1px solid var(--ws-rule);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
  padding: 12px 16px calc(32px + env(safe-area-inset-bottom));
  font-size: 0.85rem;
  z-index: var(--ws-z-dev);
}
.ws-dev[hidden] {
  display: none;
}
.ws-dev-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ws-dev h2 {
  font-size: 1.1rem;
  margin: 0;
}
.ws-dev h3 {
  font-size: 0.95rem;
  margin: 16px 0 4px;
}
.ws-dev-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  min-height: 36px;
}
.ws-dev-meta dt {
  font-weight: bold;
  margin-top: 6px;
}
.ws-dev-meta dd {
  margin: 0;
}
.ws-dev-table {
  width: 100%;
  border-collapse: collapse;
}
.ws-dev-table th,
.ws-dev-table td {
  border-bottom: 1px solid var(--ws-rule-light);
  padding: 3px 4px;
  text-align: left;
  vertical-align: top;
}
.ws-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.ws-dev-mult {
  width: 4.5em;
  font: inherit;
}
.ws-dev-fns small {
  color: var(--ws-muted);
}
.ws-dev-materials {
  padding-left: 1.4em;
  margin: 0;
}
.ws-dev-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

/* ---- ダイアログ・通知 ---- */

.ws-dialog {
  border: 1px solid var(--ws-rule);
  border-radius: 8px;
  padding: 16px;
  width: min(520px, calc(100vw - 32px));
  background: var(--ws-bg);
  color: var(--ws-ink);
}
.ws-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}
.ws-dialog h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.ws-dialog input {
  width: 100%;
  font-size: 0.85rem;
}
.ws-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: #202124;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: var(--ws-z-toast);
  /* left: 50% で置くと幅が画面の半分までに縮むので、文の長さに合わせる */
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  /* 文節の区切り（js/ui/phrase.js が入れる <wbr>）でだけ改行し、行の長さをそろえる */
  word-break: keep-all;
  text-wrap: balance;
}
.ws-toast.ws-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- 広い画面: インフォボックスと画像を右に寄せる ---- */

@media (min-width: 760px) {
  .ws-infobox-wrap {
    float: right;
    clear: right;
    width: 22em;
    max-width: 45%;
    margin: 0 0 1em 1.4em;
  }
  .ws-figure {
    float: right;
    clear: right;
    width: 260px;
    margin: 0.3em 0 1em 1.4em;
  }
  .ws-figure.ws-align-left {
    float: left;
    clear: left;
    margin: 0.3em 1.4em 1em 0;
  }
  .ws-figure.ws-align-center,
  .ws-figure.ws-align-none {
    float: none;
    margin: 0.6em auto;
  }
  .ws-toc {
    min-width: 260px;
  }
}

/* ---- 狭い画面 ---- */

@media (max-width: 600px) {
  .ws-header-inner {
    padding: 8px 16px;
  }
  .ws-header-search {
    order: 3;
    flex-basis: 100%;
  }
  .ws-random {
    margin-left: auto;
  }
  .ws-tabbar {
    align-items: stretch;
  }
  .ws-tools {
    width: 100%;
  }
  .ws-figure {
    margin-left: auto;
    margin-right: auto;
  }
  .ws-toc {
    display: block;
  }
}

/* ---- 文字組み: 見出しは行の長さをそろえ、本文は行末に1文字だけ残る改行を避ける ---- */

.ws-title,
.ws-heading,
.ws-message h1,
.ws-top-title,
.ws-search-page h1,
.ws-about h2,
.ws-settings h2,
.ws-dialog h2 {
  text-wrap: balance;
}
.ws-content p,
.ws-content li,
.ws-hint,
.ws-notice,
.ws-message p,
.ws-about p,
.ws-top-lead,
.ws-footer p,
.ws-dialog p {
  text-wrap: pretty;
}

/* ---- ダイアログ（共有・初回の辞書のダウンロード） ----
   OSの確認ダイアログと同じく、文面もボタンも中央にそろえる。
   文は <wbr> を入れた文節の区切りでだけ改行し、行の長さを balance でそろえる。
   余白は8pxを単位にし、四辺を同じにする（見出しの行の上の余白は詰めて、文字の上端から測る）。
   間隔は「見出しと本文」「文面と操作」を広く、「本文と注記」「URL欄とボタン」を狭くして、まとまりを示す。 */

.ws-dialog-centered {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 8px;
  text-align: center;
}
.ws-dialog-centered h2,
.ws-dialog-centered p {
  word-break: keep-all;
  overflow-wrap: anywhere; /* 1つの文節が1行に入りきらないときだけ、文節の途中で折る */
  text-wrap: balance;
}
.ws-dialog-centered h2 {
  margin: 0;
  margin-top: -0.225em; /* 行の上の余白（(1.45 - 1) / 2 行）を詰める */
  font-family: var(--ws-serif);
  font-weight: normal;
  font-size: 1.35rem;
  line-height: 1.45;
}
.ws-dialog-centered p {
  margin: 16px 0 0;
  line-height: 1.75;
}
/* 本文は1文ずつ行を改める（文の途中から次の文が始まる行を作らない） */
.ws-dialog-centered p > span {
  display: block;
}
.ws-dialog-centered .ws-hint {
  margin: 8px 0 0;
  line-height: 1.6;
}
/* URL欄: 先頭から読めるように左にそろえる。iPhoneで選択したときに画面が拡大されないよう16px以上にする */
.ws-dialog-centered input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 24px;
  font-size: 16px;
  text-align: start;
}
.ws-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
}
.ws-dialog-centered input + .ws-dialog-actions {
  margin-top: 8px;
}
.ws-dialog-actions .ws-btn {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.95rem;
}
/* .ws-btn の display が hidden 属性より優先されるので、ここで隠す */
.ws-dialog-actions > [hidden] {
  display: none;
}
/* 表示中のボタンが奇数個のときは、最後のボタン（閉じる）を行の幅いっぱいにする */
.ws-dialog-actions > :last-child:nth-child(odd of :not([hidden])) {
  grid-column: 1 / -1;
}

/* 狭い画面: ボタンを縦に積む（上が主な操作） */
@media (max-width: 479px) {
  .ws-dialog-actions {
    grid-template-columns: 1fr;
  }
}

/* ---- 保存したHTML ---- */

.ws-export-body .ws-main {
  padding-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .ws-toast {
    transition: none;
  }
}
