:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #293c31; background: #f6f5f0; line-height: 1.6; color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 760px; margin: auto; padding: 36px 24px 48px; }
.eyebrow { font-size: .7rem; letter-spacing: .18em; font-weight: 700; color: #59715d; margin: 0 0 8px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.intro { color: #6c786e; margin: 10px 0 32px; font-size: .9rem; }
h2 { font-size: 1.1rem; margin: 0 0 22px; }
h3 { font-size: .95rem; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid #cbd3c9; border-radius: 7px; color: #365945; background: white; padding: 9px 14px; font-size: .85rem; font-weight: 600; }
button:hover { background: #edf1e9; }
.primary { background: #365945; color: white; border-color: #365945; }
.primary:hover { background: #244331; }
:focus-visible { outline: 3px solid #b37e2b; outline-offset: 3px; }
label { display: block; font-size: .85rem; font-weight: 600; }
input { width: 100%; border: 1px solid #bdc9bc; border-radius: 6px; padding: 11px 12px; background: white; color: #293c31; margin-top: 7px; font-size: 16px; font-weight: 400; min-width: 0; }
input::placeholder { color: #899186; }
.section-heading, .view-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading { margin: 28px 0 14px; }
.link-row { margin: 0 0 14px; padding: 16px; border: 1px solid #d9dfd3; border-radius: 10px; background: #fff; min-width: 0; }
legend { font-size: .75rem; color: #6a7869; padding: 0 6px; }
.link-row label + label { margin-top: 14px; }
.row-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.row-actions button:disabled { cursor: default; }
.remove { margin-left: auto; color: #8b5145; border: 0; padding: 4px 0; background: transparent; }
.remove:hover { text-decoration: underline; background: transparent; }
.form-actions, .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button-label-short { display: none; }
.form-actions { justify-content: flex-end; margin-top: 20px; }
.save-format { margin: 24px 0 0; padding: 12px 16px; border: 1px solid #d9dfd3; border-radius: 10px; }
.save-format label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 16px 4px 0; font-weight: 400; }
.save-format input { width: auto; margin: 0; accent-color: #365945; }
.save-format p { font-size: .75rem; color: #78816f; margin: 8px 0 0; }
button:disabled { cursor: wait; opacity: .6; }
.view-toolbar { margin-bottom: 18px; flex-wrap: wrap; }
#link-count { margin: 0; font-size: .85rem; color: #71806e; }
.updated-at { display: block; margin-top: 16px; font-size: .75rem; color: #78816f; }
.bookmarks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bookmark { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px; background: #fff; border: 1px solid #d9dfd3; border-radius: 10px; text-decoration: none; color: inherit; }
.bookmark:hover { border-color: #769278; background: #fcfdf9; }
.bookmark-text { flex: 1; min-width: 0; }
.bookmark-name { display: block; font-weight: 650; overflow-wrap: anywhere; }
.open-icon { color: #587653; flex-shrink: 0; }
.error { color: #a03928; font-size: .85rem; }
#message { color: #365945; font-size: .85rem; margin: 10px 0 32px; }
#message:empty { display: none; }
.fallback { margin-top: 20px; }
footer { border-top: 1px solid #dce1d5; padding-top: 18px; margin-top: 24px; font-size: .75rem; color: #78816f; }
@media (max-width: 640px) {
  .link-row { margin: 0 0 20px; padding: 0 0 16px; border: 0; border-bottom: 1px solid #d9dfd3; border-radius: 0; background: transparent; }
  .link-row legend { padding: 0; margin-bottom: 12px; }
  .button-label-long { display: none; }
  .button-label-short { display: inline; }
}
@media (max-width: 480px) {
  main { padding: 24px 16px 36px; }
  .view-toolbar { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .actions .primary { flex: 1; }
}
