:root{
  color-scheme:dark;
  --bg:#07111f;
  --bg2:#0d1929;
  --panel:rgba(255,255,255,.07);
  --panel2:rgba(255,255,255,.1);
  --line:rgba(255,255,255,.14);
  --text:#edf5ff;
  --muted:#9fb0c7;
  --accent:#61b9ff;
  --accent2:#9ee8ff;
  --danger:#ff6b7a;
  --warn:#ffd166;
  --ok:#77efb1;
  --radius:22px;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 10% -10%,rgba(97,185,255,.22),transparent 34%),
    radial-gradient(circle at 95% 0%,rgba(119,239,177,.1),transparent 25%),
    linear-gradient(145deg,var(--bg),var(--bg2));
  color:var(--text);
  padding:clamp(1rem,3vw,2rem);
}
button,.file-button{
  border:1px solid var(--line);
  background:var(--panel2);
  color:var(--text);
  border-radius:999px;
  padding:.78rem 1rem;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
button:hover,.file-button:hover{filter:brightness(1.08)}
button:active{transform:translateY(1px)}
.primary{background:linear-gradient(135deg,#2c8dff,#64ccff);color:#061321;border-color:rgba(255,255,255,.28)}
.danger-button{background:rgba(255,107,122,.13);border-color:rgba(255,107,122,.38);color:#ffe0e4}
.file-button{display:inline-flex;align-items:center;gap:.4rem}
.file-button input{display:none}
input,textarea,select{
  width:100%;
  border:1px solid var(--line);
  background:rgba(255,255,255,.075);
  color:var(--text);
  border-radius:16px;
  padding:.9rem 1rem;
  font:inherit;
  outline:none;
}
textarea{min-height:110px;resize:vertical}
input:focus,textarea:focus,select:focus{border-color:rgba(97,185,255,.75);box-shadow:0 0 0 4px rgba(97,185,255,.13)}
label{display:grid;gap:.4rem;font-weight:800;color:#dcecff}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(2.4rem,7vw,5rem);line-height:.95;letter-spacing:-.07em;margin-bottom:.7rem}
h2{font-size:clamp(1.4rem,3vw,2rem);letter-spacing:-.04em}
h3{font-size:1.1rem}
.subtitle{color:var(--muted);font-size:clamp(1rem,2vw,1.25rem);line-height:1.5;max-width:760px}
.eyebrow{display:inline-flex;border:1px solid rgba(97,185,255,.34);background:rgba(97,185,255,.12);color:#dff2ff;border-radius:999px;padding:.35rem .7rem;font-weight:900}
.hero{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}
.hero-actions{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:flex-end}
.notice{
  display:grid;
  gap:.25rem;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:var(--radius);
  padding:1rem;
  margin-bottom:1rem;
}
.notice.danger{border-color:rgba(255,107,122,.42);background:rgba(255,107,122,.1)}
.notice.warn{border-color:rgba(255,209,102,.4);background:rgba(255,209,102,.09)}
.notice.ok{border-color:rgba(119,239,177,.34);background:rgba(119,239,177,.08)}
.tabs{display:flex;gap:.6rem;overflow-x:auto;padding:.3rem 0 1rem}
.tabs button{flex:0 0 auto}
.tabs button.active{background:rgba(97,185,255,.18);border-color:rgba(97,185,255,.55)}
.search-card,.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1rem;
  margin-bottom:1rem;
}
.search-results{display:grid;gap:.55rem;margin-top:.7rem}
.search-result{text-align:left;border-radius:16px}
.app{display:grid;gap:1rem}
.grid{display:grid;gap:1rem}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.card-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}
.actions{display:flex;gap:.5rem;flex-wrap:wrap}
.list{display:grid;gap:.7rem}
.item{
  background:rgba(255,255,255,.045);
  border:1px solid var(--line);
  border-radius:18px;
  padding:.9rem;
}
.item-title{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}
.badges{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.55rem}
.badge{display:inline-flex;border:1px solid var(--line);background:rgba(255,255,255,.07);border-radius:999px;padding:.25rem .55rem;font-size:.8rem;color:#e4f1ff}
.badge.warn{background:rgba(255,209,102,.12);border-color:rgba(255,209,102,.4);color:#fff2ca}
.badge.danger{background:rgba(255,107,122,.13);border-color:rgba(255,107,122,.38);color:#ffe2e6}
.badge.ok{background:rgba(119,239,177,.11);border-color:rgba(119,239,177,.34);color:#dcffec}
.empty{padding:1rem;border:1px dashed var(--line);border-radius:18px;color:var(--muted)}
.stat strong{display:block;font-size:2.1rem;letter-spacing:-.06em}
.stat span{color:var(--muted)}
.small{font-size:.9rem;color:var(--muted)}
.template-text{white-space:pre-wrap;background:rgba(255,255,255,.045);border:1px solid var(--line);border-radius:16px;padding:.8rem;margin-top:.7rem}
.checklist{display:grid;gap:.45rem;margin-top:.7rem}
.check-row{display:flex;align-items:center;gap:.55rem}
.check-row input{width:auto}
dialog{
  width:min(820px,calc(100vw - 1.2rem));
  border:1px solid var(--line);
  border-radius:24px;
  background:#0b1626;
  color:var(--text);
  padding:0;
}
dialog::backdrop{background:rgba(0,0,0,.65);backdrop-filter:blur(6px)}
#modalForm{padding:1rem}
.modal-head,.modal-actions{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.modal-actions{justify-content:flex-end;margin-top:1rem}
.icon-button{width:42px;height:42px;padding:0;font-size:1.4rem;display:grid;place-items:center}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.form-grid .full{grid-column:1/-1}
@media(max-width:820px){
  .hero{flex-direction:column}
  .hero-actions{justify-content:flex-start}
  .grid.two,.grid.three,.grid.four,.form-grid{grid-template-columns:1fr}
  .item-title{flex-direction:column}
}


.link-card{
  display:grid;
  gap:.55rem;
}
.official-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  border:1px solid rgba(97,185,255,.45);
  background:rgba(97,185,255,.14);
  color:#dff2ff;
  border-radius:999px;
  padding:.62rem .85rem;
  font-weight:900;
  text-decoration:none;
}
.official-link:hover{filter:brightness(1.08)}
.url-text{
  overflow-wrap:anywhere;
  color:var(--muted);
  font-size:.86rem;
}


@media(display-mode:standalone){
  body{padding-top:calc(clamp(1rem,3vw,2rem) + env(safe-area-inset-top,0px))}
}
