:root{
  --primary:#FF6B6B;
  --primary-strong:#F25555;
  --primary-soft:#FFF1EE;
  --text-dark:#0f172a;
  --text:#1e293b;
  --text-light:#64748b;
  --muted:#94a3b8;
  --bg:#ffffff;
  --bg-alt:#fff7f6;
  --card:#ffffff;
  --border:#e5e7eb;
  --border2:#f1f5f9;
  --shadow-sm:0 1px 3px rgba(15,23,42,0.06);
  --shadow-md:0 14px 28px rgba(15,23,42,0.10);
  --shadow-primary:0 18px 40px rgba(255,107,107,0.18);
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:14px;
}

*{box-sizing:border-box;-webkit-font-smoothing:antialiased;letter-spacing:-0.02em;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Pretendard',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,107,107,0.10), transparent 34%),
    linear-gradient(180deg,#fff 0%,#fff 52%,#fff8f7 100%);
  line-height:1.58;
  word-break:keep-all;
}
a{color:inherit;}
button,input{font:inherit;}
.wrap,.ondo-shell-wrap{width:100%;max-width:1180px;margin:0 auto;padding:0 20px;}

.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:80;
  background:rgba(255,255,255,0.82);
  border-bottom:1px solid rgba(241,245,249,0.9);
  backdrop-filter:blur(14px);
}
.header-inner{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.logo{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  border-radius:999px;
}
.logo-text{
  position:relative;
  z-index:1;
  color:var(--text-dark);
  font-size:28px;
  font-weight:950;
  line-height:1;
  letter-spacing:-1.2px;
  text-transform:lowercase;
}
.logo-text::after{
  content:"";
  position:absolute;
  left:-2px;right:-2px;bottom:3px;
  height:10px;
  z-index:-1;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,107,107,0.30),rgba(255,107,107,0.10));
}
.logo-mark{
  width:34px;height:34px;
  border-radius:14px;
  background:var(--bg-alt);
  border:1px solid var(--border2);
  box-shadow:var(--shadow-sm);
  position:relative;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.logo-mark .dot{
  width:8px;height:8px;
  border-radius:999px;
  background:var(--primary);
  position:absolute;
  top:8px;left:8px;
  box-shadow:0 8px 20px rgba(255,107,107,0.35);
}
.logo-mark .wave{
  width:42px;height:18px;
  border-radius:999px;
  border:3px solid rgba(255,107,107,0.65);
  transform:rotate(-12deg);
  position:absolute;
  bottom:-6px;right:-10px;
}
.header-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.header-link,.action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border2);
  background:#fff;
  color:var(--text-dark);
  font-size:13px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:0.2s ease;
  white-space:nowrap;
}
.header-link:hover,.action-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,107,107,0.42);
  box-shadow:var(--shadow-primary);
}
.action-ic{
  width:24px;height:24px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:13px;
  flex:0 0 auto;
}

/* Hero */
.hero{
  padding:58px 0 28px;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(360px,0.95fr);
  gap:28px;
  align-items:center;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(255,107,107,0.18);
  box-shadow:var(--shadow-sm);
  color:var(--primary-strong);
  font-size:13px;
  font-weight:950;
}
.hero h1{
  margin:18px 0 16px;
  color:var(--text-dark);
  font-size:48px;
  line-height:1.12;
  letter-spacing:-1.7px;
}
.hero p{
  max-width:620px;
  margin:0;
  color:var(--text-light);
  font-size:17px;
  font-weight:700;
}
.hero-panel{
  padding:24px;
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,0.86);
  border:1px solid var(--border2);
  box-shadow:var(--shadow-md);
}
.search-wrap{width:100%;position:relative;}
#toolSearch{
  width:100%;
  min-height:58px;
  padding:16px 54px 16px 22px;
  border-radius:999px;
  border:2px solid var(--border2);
  background:var(--bg-alt);
  color:var(--text-dark);
  font-size:15px;
  font-weight:800;
  outline:none;
  transition:0.25s ease;
}
#toolSearch:focus{
  border-color:var(--primary);
  background:#fff;
  box-shadow:0 0 0 4px var(--primary-soft);
}
.clear-btn{
  position:absolute;
  right:10px;top:50%;
  transform:translateY(-50%);
  width:38px;height:38px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:#334155;
  font-weight:950;
  cursor:pointer;
  display:none;
}
.clear-btn.show{display:inline-flex;align-items:center;justify-content:center;}
.hero-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:16px;
}
.stat-card{
  padding:14px 12px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--border2);
  box-shadow:var(--shadow-sm);
}
.stat-card strong{
  display:block;
  color:var(--text-dark);
  font-size:20px;
  font-weight:950;
}
.stat-card span{
  display:block;
  margin-top:2px;
  color:var(--text-light);
  font-size:12px;
  font-weight:800;
}

/* Sections */
.smart-section,.explorer{
  background:rgba(255,255,255,0.86);
  border-radius:var(--radius-lg);
  padding:28px;
  border:1px solid var(--border2);
  box-shadow:var(--shadow-sm);
  margin:18px 0;
}
.section-header,.explorer-head,.cat-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  flex-wrap:wrap;
}
.section-title{display:flex;flex-direction:column;gap:6px;}
.section-title .t,.cat-head .title{
  color:var(--text-dark);
  font-size:17px;
  font-weight:950;
}
.section-title .s,.cat-head .sub,.explorer-head p{
  color:var(--text-light);
  font-size:13px;
  font-weight:750;
}
.explorer-head h2{
  margin:0 0 4px;
  color:var(--text-dark);
  font-size:22px;
  font-weight:950;
}
.explorer-head p{margin:0;}
.btn-ghost,.chip,.cat-more{
  cursor:pointer;
  border-radius:999px;
  border:1px solid var(--border2);
  background:#fff;
  color:#475569;
  font-size:12px;
  font-weight:950;
  padding:10px 13px;
  box-shadow:var(--shadow-sm);
  transition:0.2s ease;
  white-space:nowrap;
}
.btn-ghost{color:var(--primary);border-color:rgba(255,107,107,0.28);}
.btn-ghost:hover,.chip:hover,.cat-more:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-primary);
}
.chip.active{
  color:#fff;
  background:var(--primary);
  border-color:var(--primary);
}
.sortbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* Featured */
.featured-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:18px;
}
.feat-card,.tool-card{
  position:relative;
  display:flex;
  flex-direction:column;
  text-decoration:none;
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  transition:0.24s ease;
}
.feat-card{
  min-height:132px;
  gap:10px;
  padding:18px;
  border-radius:20px;
}
.feat-card:hover,.tool-card:hover{
  transform:translateY(-4px);
  border-color:var(--primary);
  box-shadow:var(--shadow-primary);
}
.feat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.feat-title{
  color:var(--text-dark);
  font-size:15px;
  font-weight:950;
}
.feat-desc,.tool-card p{
  color:var(--text-light);
  font-size:13px;
  line-height:1.6;
  font-weight:700;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.badge,.pill{
  display:inline-flex;
  align-items:center;
  width:max-content;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f8fafc;
  color:#475569;
  font-weight:950;
  white-space:nowrap;
}
.badge{padding:5px 8px;font-size:10px;border-radius:8px;}
.pill{padding:6px 10px;font-size:11px;}
.badge.new,.pill.new{background:#ecfdf5;border-color:#d1fae5;color:#047857;}
.badge.hot,.pill.hot{background:var(--primary-soft);border-color:rgba(255,107,107,0.25);color:var(--primary);}
.badge.pick{background:#f1f5f9;border-color:#e2e8f0;color:#475569;}

/* Tabs & Cards */
.tabbar{
  position:sticky;
  top:72px;
  z-index:40;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin:20px -4px 18px;
  padding:12px 4px;
  background:rgba(255,255,255,0.88);
  border-top:1px solid var(--border2);
  border-bottom:1px solid var(--border2);
  backdrop-filter:blur(12px);
}
.tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border2);
  background:#fff;
  color:var(--text-light);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  font-size:13px;
  font-weight:950;
}
.tab .count{
  padding:4px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f1f5f9;
  color:#475569;
  font-size:12px;
  font-weight:950;
}
.tab.active{
  color:#fff;
  border-color:var(--primary);
  background:var(--primary);
}
.tab.active .count{
  color:#fff;
  border-color:rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.16);
}
.cat-section{margin:0 0 28px;}
.cat-head{padding:0 4px 10px;}
.tool-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:14px;
}
.tool-card{
  min-height:168px;
  gap:10px;
  padding:22px;
  border-radius:22px;
}
.tool-card .icon{font-size:32px;display:block;}
.tool-card h3{
  margin:2px 0 0;
  color:var(--text-dark);
  font-size:18px;
  font-weight:950;
  letter-spacing:-0.3px;
}
.tool-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:auto;
}
.no-results{
  display:none;
  width:100%;
  margin:10px 0 26px;
  padding:28px;
  border-radius:var(--radius-md);
  border:1px dashed var(--border);
  background:var(--bg-alt);
  color:var(--text-light);
  text-align:center;
  font-weight:800;
}
.no-results strong{color:var(--text-dark);font-weight:950;}
.no-results-sub{margin-top:6px;}

/* Ads */
.ondo-ad-wrap{
  display:none;
  margin:20px 0;
}
.ondo-ad-wrap.is-ready{
  display:block;
  min-height:90px;
  padding:10px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--border2);
  box-shadow:var(--shadow-sm);
}
.ondo-ad-wrap.is-debug{
  display:block;
  padding:16px;
  border:1px dashed #fca5a5;
  border-radius:18px;
  background:#fff7f6;
  color:#ef4444;
  font-size:12px;
  font-weight:900;
  text-align:center;
}

/* Footer */
.site-footer{
  margin-top:44px;
  padding:54px 0;
  border-top:1px solid var(--border2);
  background:#fff;
}
.footer-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  text-align:center;
}
.footer-brand{
  color:var(--primary);
  font-size:18px;
  font-weight:950;
  letter-spacing:2px;
  text-transform:uppercase;
}
.footer-links{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  justify-content:center;
  font-size:13px;
  font-weight:900;
}
.footer-links a{
  color:var(--text-light);
  text-decoration:none;
}
.footer-links a:hover{color:var(--primary);}
.footer-info{
  max-width:860px;
  padding:0 16px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  line-height:1.75;
}
.copyright{
  margin-top:6px;
  color:#cbd5e1;
  font-size:11px;
  font-weight:950;
  letter-spacing:1px;
  text-transform:uppercase;
}

/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  z-index:9999;
  display:none;
  max-width:calc(100% - 28px);
  padding:12px 14px;
  border-radius:14px;
  background:rgba(15,23,42,0.92);
  color:#fff;
  box-shadow:0 18px 40px rgba(0,0,0,0.25);
  text-align:center;
  font-size:13px;
  font-weight:850;
}
.toast.show{display:block;}
.toast kbd{
  margin:0 4px;
  padding:2px 8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.12);
  font-weight:950;
}

@media (max-width:900px){
  .header-inner{height:auto;min-height:66px;padding:12px 0;align-items:flex-start;}
  .header-nav .header-link{display:none;}
  .hero{grid-template-columns:1fr;padding:38px 0 22px;}
  .hero h1{font-size:38px;}
  .featured-grid{grid-template-columns:1fr;}
  .tabbar{top:66px;}
}
@media (max-width:520px){
  .wrap{padding:0 16px;}
  .hero h1{font-size:32px;}
  .hero p{font-size:15px;}
  .hero-panel,.smart-section,.explorer{padding:20px;border-radius:22px;}
  .hero-stats{grid-template-columns:1fr;}
  .tool-grid{grid-template-columns:1fr;}
  .action-btn{padding:10px 12px;}
  .action-btn .label{display:none;}
}

/* ONDO common toast compatibility */
.ondo-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:rgba(15,23,42,0.92);color:#fff;padding:12px 14px;border-radius:14px;font-weight:800;font-size:13px;display:none;z-index:9999;box-shadow:0 18px 40px rgba(0,0,0,0.25);max-width:calc(100% - 28px);text-align:center;}
.ondo-toast.show{display:block;}
