/* かんたん画面キット本体（2026.08.10-temple-easy-ui-integration-kit-v5）の同梱コピーです。
   上流srcがこの作業領域にないため、動的一覧の配置を同梱コピーへ統合しています。
   寺院ソフト側の配置調整は styles.css の「かんたん画面」節にあります。 */

.teu-root {
  --teu-green: var(--brand-primary);
  --teu-green-dark: var(--brand-hover);
  --teu-green-pale: var(--brand-soft);
  --teu-brand-foreground: var(--brand-foreground);
  --teu-yellow: var(--focus-ring);
  --teu-ink: var(--text-primary);
  --teu-muted: var(--text-muted);
  --teu-line: var(--border-strong);
  --teu-surface: var(--surface-subtle);
  color: var(--teu-ink);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", "BIZ UDPGothic", "IPAexGothic", "IPAGothic", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

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

.teu-root button,
.teu-root input {
  font: inherit;
}

.teu-root button {
  min-height: 52px;
  border: 2px solid var(--teu-green);
  border-radius: 12px;
  background: var(--teu-green);
  color: var(--teu-brand-foreground);
  font-weight: 700;
  cursor: pointer;
}

.teu-root button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.teu-root button:focus-visible,
.teu-root input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.teu-root button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.teu-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 18px;
  background: var(--teu-surface);
}

.teu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.teu-header h1,
.teu-root h2,
.teu-root p {
  margin-top: 0;
}

.teu-header h1 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.teu-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 5px;
  width: min(180px, 42vw);
  padding: 4px;
  border: 1px solid var(--teu-line);
  border-radius: 12px;
  background: var(--surface-card);
}

.teu-mode-switch button {
  min-height: 38px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.teu-mode-switch button[aria-pressed="false"] {
  border-color: transparent;
  background: transparent;
  color: var(--teu-green-dark);
}

.teu-mode-switch button[aria-pressed="true"] {
  border-color: var(--selection-border);
  box-shadow: inset 0 -3px 0 var(--selection-border);
  background: var(--selection-background);
  color: var(--selection-foreground);
}

.teu-main {
  display: grid;
  gap: 16px;
}

.teu-search-panel,
.teu-button-panel,
.teu-results,
.teu-settings-intro,
.teu-settings-form fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--teu-line);
  border-radius: 16px;
  background: var(--surface-card);
}

.teu-search-panel h2,
.teu-button-panel h2,
.teu-results h2,
.teu-settings-intro h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.teu-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.teu-search-form input {
  width: 100%;
  min-height: 58px;
  padding: 10px 16px;
  border: 3px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-card);
  color: var(--teu-ink);
}

.teu-search-form button {
  min-width: 140px;
  padding: 10px 18px;
}

.teu-search-form button span {
  margin-right: 8px;
  font-size: 1.3em;
}

.teu-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teu-section-heading h2 {
  margin-bottom: 0;
}

.teu-quiet-button,
.teu-back-button {
  min-height: 44px !important;
  padding: 6px 14px;
  background: var(--surface-card) !important;
  color: var(--teu-green-dark) !important;
}

.teu-button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.teu-filter-button {
  display: grid;
  place-content: center;
  min-height: 104px !important;
  padding: 12px;
}

.teu-filter-button:nth-child(even) {
  background: var(--surface-card);
  color: var(--teu-green-dark);
}

.teu-filter-button strong,
.teu-filter-button small {
  display: block;
}

.teu-filter-button strong {
  font-size: 1.15rem;
}

.teu-filter-button small {
  margin-top: 5px;
  font-size: 0.76rem;
  font-weight: 600;
}

.teu-filter-button[aria-pressed="true"] {
  border: 3px solid var(--selection-border);
  box-shadow: inset 0 -4px 0 var(--selection-border);
  background: var(--selection-background);
  color: var(--selection-foreground);
}

.teu-search-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.teu-search-actions button {
  min-width: 160px;
}

.teu-kana-nav {
  display: grid;
  grid-template-columns: repeat(11, minmax(44px, 1fr));
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--teu-line);
  border-radius: 14px;
  background: var(--surface-card);
}

.teu-kana-nav button {
  min-width: 0;
  min-height: 48px;
  padding: 4px;
  background: var(--surface-card);
  color: var(--teu-green-dark);
}

.teu-kana-nav button[aria-pressed="true"] {
  border-color: var(--selection-border);
  box-shadow: inset 0 -3px 0 var(--selection-border);
  background: var(--selection-background);
  color: var(--selection-foreground);
}

.teu-results {
  display: grid;
  gap: 9px;
}

.teu-result-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 2.2fr);
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--surface-card);
}

.teu-person-cell {
  min-width: 0;
}

.teu-person-cell small {
  display: block;
  min-height: 1.4em;
  color: var(--teu-muted);
  font-size: 0.78rem;
}

.teu-person-cell button {
  min-height: 40px;
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--teu-green-dark);
  font-size: 1.1rem;
  text-align: left;
  text-decoration: underline;
}

.teu-result-row dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  min-width: 0;
  margin: 0;
}

.teu-result-row dl > div {
  min-width: 0;
}

.teu-result-row dt {
  color: var(--teu-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.teu-result-row dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teu-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

.teu-pagination button {
  min-width: 100px;
}

.teu-settings-form {
  display: grid;
  gap: 16px;
}

.teu-settings-form fieldset {
  min-width: 0;
}

.teu-settings-form legend {
  padding: 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.teu-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teu-setting-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px 14px;
  border: 2px solid var(--teu-line);
  border-radius: 12px;
}

.teu-setting-option input {
  width: 28px;
  height: 28px;
}

.teu-setting-option strong,
.teu-setting-option small {
  display: block;
}

.teu-setting-option small {
  color: var(--teu-muted);
}

.teu-error {
  padding: 12px 16px;
  border: 2px solid var(--status-danger);
  border-radius: 12px;
  background: var(--status-danger-soft);
  color: var(--status-danger);
  font-weight: 700;
}

.teu-empty {
  margin: 16px 0 0;
  color: var(--teu-muted);
}

.teu-status {
  min-height: 1.5em;
  margin-top: 8px;
  color: var(--teu-muted);
}

.teu-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .teu-root {
    font-size: 16px;
  }

  .teu-shell {
    padding: 10px;
  }

  .teu-header {
    align-items: flex-start;
  }

  .teu-mode-switch {
    width: 160px;
  }

  .teu-mode-switch button {
    min-height: 50px;
  }

  .teu-search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .teu-search-form button {
    width: 100%;
  }

  .teu-button-grid {
    gap: 8px;
  }

  .teu-filter-button {
    min-height: 92px !important;
    padding: 8px 5px;
  }

  .teu-filter-button strong {
    font-size: 1rem;
  }

  .teu-kana-nav {
    grid-template-columns: repeat(6, minmax(42px, 1fr));
  }

  .teu-result-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .teu-result-row dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .teu-result-row dd {
    white-space: normal;
  }

  .teu-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
