:root {
  color-scheme: dark;
  --background: #0b101c;
  --surface: #131d2e;
  --surface-hover: #192940;
  --text: #edf3ff;
  --muted: #97a8c3;
  --line: #26334a;
  --accent: #7dbbff;
  --accent-text: #081424;
  --icon-background: #1c304b;
  --danger: #ff9aab;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100dvh; background: radial-gradient(ellipse at 85% 0%, #142744 0%, transparent 55%) no-repeat; background-size: 100% 760px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, a, input, select { touch-action: manipulation; }
[hidden] { display: none !important; }
.app-shell { max-width: 1080px; margin: 0 auto; padding: 0 40px 70px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 42px 0 38px; }
.brand, .header-actions { display: flex; align-items: center; gap: 11px; }
.header-actions { gap: 8px; }
.monogram { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: var(--accent-text); border-radius: 10px; font-size: 25px; font-weight: 500; letter-spacing: -1.5px; padding-right: 2px; }
h1 { font-size: 18px; font-weight: 500; letter-spacing: -.4px; line-height: 1.4; margin: 0; }
h2 { font-size: 18px; font-weight: 500; letter-spacing: -.3px; line-height: 1.4; margin: 0; }
.icon-button { display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 9px; width: 38px; height: 38px; padding: 8px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--text); background: var(--surface-hover); }
.icon-button[aria-pressed="true"] { color: var(--accent); background: var(--icon-background); }
.icon-button svg { width: 18px; height: 18px; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.search-field:focus-within { border-color: var(--accent); }
.search-field svg { width: 18px; height: 18px; }
.search-field input { min-width: 0; width: 100%; background: transparent; border: 0; color: var(--text); padding: 17px 0; font-size: 15px; }
.search-field input:focus-visible { outline-offset: -2px; border-radius: 4px; }
input::placeholder { color: var(--muted); opacity: 1; }
.category-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 25px; }
.category-button { border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 400; padding: 10px 16px; }
.category-button:hover { color: var(--text); background: var(--surface); }
.category-button.active, .category-button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 500; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shortcut-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); position: relative; transition: background .14s, border-color .14s; }
.shortcut-card:hover { background: var(--surface-hover); border-color: #466a95; }
.shortcut-link { display: flex; flex-direction: column; align-items: flex-start; gap: 30px; padding: 23px; color: var(--text); text-decoration: none; border-radius: 13px; }
.shortcut-top { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; gap: 12px; }
.service-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 11px; background: var(--icon-background); color: var(--accent); }
.service-icon svg { width: 23px; height: 23px; }
.shortcut-top > svg, .shortcut-top .arrow { width: 16px; height: 16px; color: var(--muted); }
.shortcut-name { font-size: 16px; line-height: 1.4; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; }
.favorite-indicator { position: absolute; right: 23px; bottom: 25px; display: inline-flex; color: var(--accent); }
.favorite-indicator svg { width: 13px; height: 13px; fill: currentColor; }
.is-favorite .shortcut-name { padding-right: 22px; }
.add-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 30px; min-height: 144px; padding: 23px; border: 1px dashed var(--line); border-radius: 14px; background: transparent; color: var(--muted); text-align: left; font-size: 14px; }
.add-card > svg { width: 24px; height: 24px; }
.add-card:hover { color: var(--accent); border-color: #466a95; background: #111d30; }
.card-actions { display: flex; flex-wrap: wrap; gap: 3px; padding: 7px 12px; border-top: 1px solid var(--line); }
.card-actions .icon-button { width: 32px; height: 32px; padding: 7px; }
.card-actions .icon-button svg { width: 15px; height: 15px; }
.card-actions button[aria-label^="Remove"] { margin-left: auto; }
.card-actions button[aria-label^="Remove"]:hover { color: var(--danger); }
.manage-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: -5px 0 18px; }
.manage-toolbar > span { font-size: 12px; color: var(--muted); }
.manage-toolbar > div { display: flex; gap: 6px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); background: transparent; }
.text-button:hover { background: var(--surface-hover); color: var(--text); }
.text-button svg { width: 15px; height: 15px; }
.empty-state { padding: 65px 20px; text-align: center; color: var(--muted); }
.empty-state > svg { width: 28px; height: 28px; margin-bottom: 16px; }
.empty-state h2 { font-size: 16px; margin-bottom: 12px; }
.modal { color: var(--text); background: #111a2b; border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 24px 100px #0008; }
.modal::backdrop { background: #030814b8; backdrop-filter: blur(8px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px 12px 26px; }
.form-fields { display: flex; flex-direction: column; gap: 20px; padding: 10px 26px 24px; }
.form-fields label:not(.checkbox-label) { display: flex; flex-direction: column; gap: 9px; color: var(--muted); font-size: 13px; min-width: 0; }
.form-fields input:not([type="checkbox"]), .form-fields select { width: 100%; min-width: 0; background: var(--background); color: var(--text); border: 1px solid var(--line); border-radius: 9px; font-size: 14px; padding: 12px; }
.form-fields select { min-height: 43px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13px; }
.checkbox-label input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.form-error { color: var(--danger); font-size: 13px; line-height: 1.5; margin: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 26px 22px; border-top: 1px solid var(--line); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 11px 20px; border: 1px solid transparent; font-size: 13px; font-weight: 500; }
.primary-button { background: var(--accent); color: var(--accent-text); }
.primary-button:hover { background: #a8d2ff; }
.secondary-button { background: var(--surface-hover); border-color: var(--line); color: var(--text); }
.secondary-button:hover { border-color: var(--muted); }
.danger-button { color: var(--danger); background: #3a2031; border-color: #66374b; }
.danger-button:hover { background: #4b263b; }
.delete-content { padding: 26px; }
.delete-content p { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; margin: 14px 0 0; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: #20324e; border: 1px solid #3f597c; color: var(--text); box-shadow: 0 8px 30px #0005; padding: 12px 18px; border-radius: 10px; font-size: 13px; line-height: 1.5; text-align: center; }
.toast:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { text-align: center; color: var(--muted); }
@media (max-width: 700px) {
  .app-shell { padding: 0 24px 50px; }
  .app-header { padding: 28px 0; }
  .shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shortcut-link, .add-card { padding: 19px; gap: 27px; }
  .favorite-indicator { right: 19px; bottom: 23px; }
}
@media (max-width: 380px) {
  .app-shell { padding: 0 18px 40px; }
  .brand { gap: 9px; }
  h1 { font-size: 16px; }
  .header-actions { gap: 2px; }
  .category-filters { gap: 2px; }
  .category-button { padding: 10px 13px; }
  .shortcut-link, .add-card { padding: 15px; }
  .shortcut-name { font-size: 15px; }
  .service-icon { width: 38px; height: 38px; }
  .favorite-indicator { right: 15px; bottom: 20px; }
  .card-actions { padding: 6px; gap: 0; }
  .form-fields { padding-left: 20px; padding-right: 20px; }
  .modal-header { padding-left: 20px; }
  .modal-footer { padding-left: 20px; padding-right: 20px; }
}
@media (pointer: coarse) {
  .icon-button, .category-button, .text-button { min-width: 44px; min-height: 44px; }
  .card-actions .icon-button { min-width: 40px; min-height: 44px; }
  .search-field input, .form-fields input:not([type="checkbox"]), .form-fields select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .shortcut-card { transition: none; } }
