:root {
  color-scheme: light;
  --ink: #151d35;
  --muted: #596781;
  --blue: #2857df;
  --blue-dark: #1945c8;
  --line: #e3e9f3;
  --paper: #f8faff;
  font-family: Geist, Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7597fa; outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; width: 1em; height: 1em; }
.wrap { width: min(1192px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 26px; font-weight: 760; letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; gap: 31px; }
.nav-link { font-size: 14px; color: #475771; }
.nav-link:hover, .footer a:hover { color: var(--blue); }
.button { display: inline-flex; width: fit-content; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid #dbe3f0; border-radius: 9px; padding: 0 14px; background: #fff; color: #243552; font-weight: 650; font-size: 14px; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.button:hover { border-color: #bdcbeb; background: #f3f6ff; }
.button svg { font-size: 17px; }
.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.danger { border-color: #c13243; background: #c13243; color: #fff; }
.danger:hover { border-color: #992636; background: #992636; }

.hero { position: relative; isolation: isolate; min-height: 391px; display: flex; align-items: center; margin-top: 32px; overflow: hidden; border: 1px solid #dce6fb; border-radius: 22px; background: #eaf1ff; }
.hero-art { position: absolute; z-index: -2; top: 0; right: 0; width: 77%; height: 100%; object-fit: cover; object-position: 57% 52%; }
.hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #eaf1ff 21%, #eaf1ff 28%, #eaf1ffec 37%, #eaf1ff00 63%); content: ""; }
.hero-text { width: min(50%, 520px); padding: 46px 0 49px 60px; }
.hero-label { margin: 0 0 17px; color: #3455a5; font-size: 12px; font-weight: 750; letter-spacing: .17em; }
.hero h1 { margin: 0; color: #101c39; font-size: clamp(37px, 5.1vw, 69px); font-weight: 780; line-height: 1.14; letter-spacing: -.058em; }
.hero-description { max-width: 348px; margin: 23px 0 28px; color: #495b7a; font-size: 16px; line-height: 1.8; }
.hero .button { gap: 16px; min-height: 45px; padding-inline: 17px; }

.directory { padding: 41px 0 55px; scroll-margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 19px; }
.section-head h2, .dialog-head h2 { margin: 0; font-size: 25px; line-height: 1.35; letter-spacing: -.035em; }
.search { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0 12px; width: 214px; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #61708b; }
.search:focus-within { outline: 2px solid #7597fa; outline-offset: 1px; }
.search svg { font-size: 17px; }
.search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.search input::placeholder { color: #62708a; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.app-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; padding: 21px; min-height: 180px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 3px 12px #24396106; overflow-wrap: anywhere; transition: box-shadow .2s, border-color .2s; }
.app-card:has(a[href]):hover { border-color: #bdcbeb; box-shadow: 0 10px 24px #24447b12; }
.app-card:focus-within { outline: 2px solid #7597fa; outline-offset: 3px; }
.app-symbol { flex: none; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 12px; background: #eaf0ff; color: #2857df; font-size: 24px; }
.app-symbol[data-kind="service"] { background: #e6f7f6; color: #147772; }
.app-symbol[data-kind="store"] { background: #eeeaff; color: #6647cc; }
.app-symbol[data-kind="training"] { background: #fff1dd; color: #a45c1d; }
.app-symbol[data-kind="design"] { background: #f9eaf3; color: #9f4077; }
.app-symbol[data-kind="member"] { background: #e9f4e7; color: #437542; }
.app-body h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.app-body p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.app-body p:empty { display: none; }
.card-link, .card-pending { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13px; }
.card-link { color: var(--blue); font-weight: 650; }
.card-link::before { position: absolute; inset: 0; content: ""; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-pending { color: #646f84; }
.directory-status { color: var(--muted); line-height: 1.6; }
.footer { min-height: 66px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer a { display: inline-flex; align-items: center; gap: 5px; }

dialog { width: min(590px, calc(100% - 30px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 18px; padding: 0; color: var(--ink); box-shadow: 0 24px 80px #121e4936; }
dialog::backdrop { background: #131f42a1; }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 17px 23px; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 20px; }
.dialog-body { padding: 21px 23px 23px; }
.dialog-body h3 { margin: 0 0 17px; }
.help { margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.field { display: block; margin-bottom: 15px; font-size: 14px; font-weight: 650; }
.field input, .field textarea { display: block; width: 100%; margin-top: 7px; border: 1px solid #dbe3f0; border-radius: 9px; padding: 10px 12px; background: #fff; font-weight: 400; }
.field textarea { resize: vertical; }
.field .help { display: block; margin: 6px 0 0; font-weight: 400; }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.icon-button { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #546681; font-size: 17px; }
.icon-button:hover { background: #edf2ff; color: var(--blue); }
.icon-button.remove:hover { background: #fff0f1; color: #bf3140; }
.manager-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.manager-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.manager-item:last-child { border-bottom: 0; }
.manager-item .app-symbol { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
.manager-details { flex: 1; min-width: 0; display: grid; gap: 3px; font-size: 14px; overflow-wrap: anywhere; }
.manager-details span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.manager-item .icon-button + .icon-button { margin-left: -7px; }
.form-message { margin: 15px 0 0; border-radius: 8px; background: #eaf4ff; padding: 9px 11px; color: #204f9b; font-size: 13px; line-height: 1.55; }
.form-message.error { background: #fff0f1; color: #a62436; }

@media (max-width: 960px) {
  .wrap { width: calc(100% - 56px); }
  .hero-text { padding-left: 39px; }
  .hero h1 { font-size: clamp(37px, 6.1vw, 60px); }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .topbar-inner { height: 63px; }
  .brand { font-size: 23px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .nav-link { display: none; }
  .configure { min-height: 38px; }
  .hero { min-height: 0; margin-top: 17px; border-radius: 17px; align-items: flex-start; }
  .hero-text { width: 100%; padding: 29px 22px 165px; }
  .hero-art { inset: auto 0 0; width: 100%; height: 235px; object-position: 64% 52%; }
  .hero::after { background: linear-gradient(180deg, #eaf1ff 29%, #eaf1ff 39%, #eaf1ff00 62%); }
  .hero-label { margin-bottom: 12px; font-size: 11px; }
  .hero-description { margin: 13px 0 17px; max-width: 240px; font-size: 14px; }
  .hero .button { min-height: 40px; }
  .directory { padding: 28px 0 33px; }
  .section-head { margin-bottom: 13px; }
  .section-head h2 { font-size: 21px; }
  .section-head .search { width: min(44%, 175px); }
  .app-grid { gap: 9px; }
  .app-card { padding: 13px; gap: 11px; min-height: 153px; border-radius: 12px; }
  .app-symbol { width: 38px; height: 38px; font-size: 20px; }
  .app-body h3 { font-size: 16px; }
  .app-body p, .card-link, .card-pending { font-size: 12px; }
  .dialog-body, .dialog-head { padding-inline: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
