:root { --ink: #20372e; --muted: #5a6b65; --green: #285942; --line: #dce5e0; --soft: #edf3ef; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; color: var(--ink); background: #f8faf9; font-family: Arial, sans-serif; line-height: 1.5; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #a94763; outline-offset: 4px; }
.masthead { border-bottom: 1px solid var(--line); background: #fff; }
.masthead-inner, main, footer { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 96px; padding-block: 16px; }
.identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.portrait { object-fit: cover; object-position: center 24%; border-radius: 50%; flex: 0 0 48px; }
.identity strong { display: block; font-size: 18px; }
.identity span, .domain { font-size: 13px; color: var(--muted); }
.identity span { display: block; }
.domain { color: #87465a; }
main { padding: 38px 0 48px; }
.heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
h1 { margin: 0; font-size: 32px; line-height: 1.2; }
.total { font-size: 14px; color: var(--muted); }
.toolbar { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.search { display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid #a7bbb0; border-radius: 6px; min-height: 48px; width: min(560px, 100%); background: #fff; }
.search img { opacity: .6; flex-shrink: 0; }
.search:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.search input { border: 0; outline: none; background: transparent; min-width: 0; width: 100%; padding: 12px 0; color: var(--ink); font-size: 16px; }
input::placeholder { color: var(--muted); opacity: 1; }
#results { white-space: nowrap; font-size: 14px; color: var(--muted); }
.catalog { border-top: 2px solid var(--green); }
.site-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); padding: 22px 0; }
.site-info { min-width: 0; }
h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.site-info p { margin: 6px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.actions { display: flex; gap: 10px; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 5px; padding: 11px 14px; min-height: 44px; font-size: 14px; font-weight: 600; line-height: 20px; cursor: pointer; text-decoration: none; }
.action img { flex: 0 0 18px; }
.share { color: var(--ink); background: var(--soft); border-color: var(--line); }
.share:hover { background: #deebe2; border-color: #a7bbb0; }
.open { background: var(--green); color: #fff; }
.open img { filter: invert(1); }
.open:hover { background: #163d2b; }
.action:disabled { opacity: .65; cursor: wait; }
.empty { padding: 64px 0; text-align: center; }
.empty button { margin-top: 20px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.toast { position: fixed; z-index: 2; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: #fff; border-radius: 6px; font-size: 14px; padding: 14px 20px; box-shadow: 0 4px 20px #0002; pointer-events: none; }
.toast:empty { display: none; }
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
dialog::backdrop { background: #152c2470; }
dialog p, dialog label { font-size: 14px; color: var(--muted); }
dialog input { width: 100%; min-width: 0; font-size: 16px; padding: 12px; border: 1px solid #a7bbb0; border-radius: 4px; margin: 8px 0 20px; }
dialog button { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .masthead-inner, main, footer { width: calc(100% - 32px); }
  .masthead-inner { min-height: 84px; }
  .domain { display: none; }
  .identity strong { font-size: 16px; }
  .identity span { font-size: 12px; }
  main { padding-top: 28px; }
  h1 { font-size: 28px; }
  .toolbar { gap: 12px; flex-wrap: wrap; }
  .search { width: 100%; }
  .site-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 20px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .action { padding-inline: 10px; }
  h2 { font-size: 17px; }
}
