:root{
  --bg:#0b0910;
  --bg-2:#15101d;
  --panel:#17131f;
  --panel-2:#1d1727;
  --panel-3:#241c31;
  --line:#3b3050;
  --line-soft:rgba(255,255,255,.08);

  --text:#f6f1fb;
  --soft:#cabee0;
  --muted:#a899c2;

  --brand:#c39a5b;
  --brand-2:#e5c07b;
  --violet:#b17cff;
  --violet-2:#8d5fe2;

  --good:#7fda9d;
  --warn:#f3c173;
  --bad:#f08aa0;

  --radius:22px;
  --radius-sm:14px;
  --shadow:0 18px 40px rgba(0,0,0,.28);

  --max:1180px;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:Inter,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(177,124,255,.08), transparent 26%),
    radial-gradient(circle at top right, rgba(195,154,91,.10), transparent 28%),
    linear-gradient(180deg, #09070d 0%, #0e0b14 100%);
  line-height:1.55;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

.site-shell{
  width:min(calc(100% - 24px), var(--max));
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(14px);
  background:rgba(11,9,16,.82);
  border-bottom:1px solid var(--line-soft);
}

.site-header-inner{
  width:min(calc(100% - 24px), var(--max));
  margin:0 auto;
  padding:14px 0 12px;
}

.site-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.brand-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-mark{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:12px;
  overflow:hidden;
  box-shadow:
    0 10px 22px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.brand-copy{
  min-width:0;
}

.brand-title{
  font-size:1.08rem;
  font-weight:800;
  letter-spacing:-.02em;
  margin:0;
  white-space:nowrap;
}

.brand-sub{
  margin:2px 0 0;
  color:var(--muted);
  font-size:.86rem;
  white-space:nowrap;
}

.brand-inkiron{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(195,154,91,.26);
  background:rgba(195,154,91,.08);
  color:var(--soft);
  font-size:.87rem;
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.brand-inkiron:hover{
  transform:translateY(-1px);
  border-color:rgba(195,154,91,.42);
  background:rgba(195,154,91,.14);
}

.brand-inkiron strong{
  color:var(--brand-2);
  font-weight:800;
}

.site-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  color:var(--soft);
  border:1px solid transparent;
  transition:all .18s ease;
  font-weight:600;
}

.nav-link:hover{
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-color:var(--line-soft);
}

.nav-link.active{
  color:var(--text);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border-color:rgba(255,255,255,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

.page{
  padding:30px 0 40px;
}

section{
  margin:0;
}

.eyebrow{
  display:inline-block;
  margin:0 0 10px;
  color:var(--brand-2);
  font-size:.84rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.12em;
}

h1,h2,h3,h4{
  margin:0 0 12px;
  line-height:1.12;
  letter-spacing:-.03em;
}

h1{
  font-size:clamp(2rem, 4.2vw, 3.6rem);
}

h2{
  font-size:clamp(1.25rem, 2.3vw, 1.8rem);
}

h3{
  font-size:1.08rem;
}

p{
  margin:0 0 14px;
}

.lead{
  max-width:820px;
  color:var(--soft);
  font-size:1.04rem;
}

.help,
.muted{
  color:var(--muted);
  font-size:.95rem;
}

.card,
.form-card{
  background:linear-gradient(180deg, rgba(29,23,39,.97), rgba(21,17,29,.98));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
}

.card.tight{
  padding:18px;
}

.notice{
  background:rgba(127,218,157,.08);
  border:1px solid rgba(127,218,157,.22);
  color:var(--text);
  border-radius:18px;
  padding:16px 18px;
}

.notice.error{
  background:rgba(240,138,160,.10);
  border-color:rgba(240,138,160,.28);
}

.notice.warn{
  background:rgba(243,193,115,.10);
  border-color:rgba(243,193,115,.28);
}

.grid{
  display:grid;
  gap:18px;
}

.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));
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}

button,
.button{
  appearance:none;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  padding:12px 18px;
  border-radius:14px;
  font:inherit;
  font-weight:800;
  transition:transform .18s ease, opacity .18s ease, background .18s ease, border-color .18s ease;
  background:linear-gradient(180deg, var(--violet), var(--violet-2));
  color:#120d18;
  box-shadow:0 10px 20px rgba(0,0,0,.18);
}

button:hover,
.button:hover{
  transform:translateY(-1px);
}

button:active,
.button:active{
  transform:translateY(0);
}

.button.secondary,
button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  border:1px solid var(--line);
  color:var(--text);
  box-shadow:none;
}

.button.ghost,
button.ghost{
  background:transparent;
  border:1px solid var(--line);
  color:var(--soft);
  box-shadow:none;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  color:var(--soft);
  font-size:.9rem;
  font-weight:700;
}

.badge.good{
  color:var(--good);
  border-color:rgba(127,218,157,.24);
  background:rgba(127,218,157,.10);
}

.badge.warn{
  color:var(--warn);
  border-color:rgba(243,193,115,.24);
  background:rgba(243,193,115,.10);
}

.badge.bad{
  color:var(--bad);
  border-color:rgba(240,138,160,.24);
  background:rgba(240,138,160,.10);
}

.stat{
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
}

.stat strong{
  display:block;
  font-size:1.7rem;
  line-height:1;
  margin-bottom:8px;
  color:var(--text);
}

.stat span{
  color:var(--muted);
}

label{
  display:block;
  margin:0 0 8px;
  font-size:.92rem;
  font-weight:700;
  color:var(--soft);
}

input,
select,
textarea{
  width:100%;
  background:#110d17;
  color:var(--text);
  border:1px solid #3a2d4b;
  border-radius:14px;
  padding:13px 14px;
  font:inherit;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
  margin-bottom:16px;
}

textarea{
  min-height:120px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  border-color:var(--violet);
  box-shadow:0 0 0 3px rgba(177,124,255,.14);
}

select{
  background-color:#110d17;
  color:var(--text);
}

input::placeholder,
textarea::placeholder{
  color:#8e82a5;
}

ul,ol{
  margin:0 0 14px 20px;
  padding:0;
}

li{
  margin-bottom:8px;
}

pre{
  overflow:auto;
  color:var(--text);
}

details{
  border-radius:18px;
}

details > summary{
  list-style:none;
}

details > summary::-webkit-details-marker{
  display:none;
}

.table-wrap{
  overflow-x:auto;
  border-radius:18px;
  border:1px solid var(--line);
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
  background:rgba(255,255,255,.02);
}

th,td{
  padding:14px 16px;
  text-align:left;
  border-bottom:1px solid rgba(255,255,255,.06);
}

th{
  color:var(--soft);
  font-size:.9rem;
  font-weight:800;
  background:rgba(255,255,255,.03);
}

td{
  color:var(--text);
}

.site-footer{
  border-top:1px solid var(--line-soft);
  margin-top:22px;
  padding:26px 0 40px;
}

.footer-card{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:linear-gradient(180deg, rgba(25,19,34,.95), rgba(17,13,24,.98));
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px 20px;
}

.footer-copy{
  min-width:0;
}

.footer-title{
  font-weight:800;
  margin:0 0 4px;
}

.footer-sub{
  color:var(--muted);
  margin:0;
  font-size:.95rem;
}

.footer-discord{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(195,154,91,.22);
  background:rgba(195,154,91,.08);
  color:var(--soft);
  transition:all .18s ease;
  white-space:nowrap;
}

.footer-discord:hover{
  transform:translateY(-1px);
  border-color:rgba(195,154,91,.38);
  background:rgba(195,154,91,.14);
}

.footer-discord strong{
  color:var(--brand-2);
}

.rule-step{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.rule-step-num{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(177,124,255,.14);
  border:1px solid rgba(177,124,255,.24);
  color:var(--text);
  font-weight:800;
}

.rule-list{
  display:grid;
  gap:14px;
}

.inline-divider{
  height:1px;
  background:rgba(255,255,255,.06);
  margin:16px 0;
}

@media (max-width: 980px){
  .grid.two,
  .grid.three,
  .grid.four{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .site-shell,
  .site-header-inner{
    width:min(calc(100% - 16px), var(--max));
  }

  .site-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .brand-sub,
  .brand-title{
    white-space:normal;
  }

  .page{
    padding:22px 0 30px;
  }

  .card,
  .form-card{
    padding:18px;
  }

  .footer-card{
    align-items:flex-start;
  }

  table{
    min-width:620px;
  }
}

/* Make date picker calendar icons visible and keep the icon itself clickable */
input[type="date"] {
  color-scheme: dark;
  height: auto;
  min-height: 0;
  padding: 13px 14px;
  line-height: 1.35;
  background-color: #110d17;
  background-image: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  opacity: 1;
  cursor: pointer;
  color: transparent;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 21px 21px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23f6f1fb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.85;
}

/* Compact swap search cards on mobile */
@media (max-width: 760px) {
  .swap-card,
  .slot-card,
  .story-card,
  .marketplace-card,
  .swap-result-card,
  .available-slot-card {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .swap-card .card,
  .slot-card .card,
  .story-card .card,
  .marketplace-card .card,
  .swap-result-card .card,
  .available-slot-card .card {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .swap-card img,
  .slot-card img,
  .story-card img,
  .marketplace-card img,
  .swap-result-card img,
  .available-slot-card img {
    width: 70px !important;
    max-width: 70px !important;
    height: 102px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    flex: 0 0 70px !important;
  }

  .swap-card .story-cover,
  .slot-card .story-cover,
  .story-card .story-cover,
  .marketplace-card .story-cover,
  .swap-result-card .story-cover,
  .available-slot-card .story-cover {
    width: 70px !important;
    max-width: 70px !important;
    flex: 0 0 70px !important;
  }

  .swap-card h1,
  .swap-card h2,
  .swap-card h3,
  .slot-card h1,
  .slot-card h2,
  .slot-card h3,
  .story-card h1,
  .story-card h2,
  .story-card h3,
  .marketplace-card h1,
  .marketplace-card h2,
  .marketplace-card h3,
  .swap-result-card h1,
  .swap-result-card h2,
  .swap-result-card h3,
  .available-slot-card h1,
  .available-slot-card h2,
  .available-slot-card h3 {
    font-size: 1.05rem !important;
    line-height: 1.12 !important;
    margin-bottom: 4px !important;
  }

  .swap-card p,
  .slot-card p,
  .story-card p,
  .marketplace-card p,
  .swap-result-card p,
  .available-slot-card p {
    font-size: 0.84rem !important;
    line-height: 1.28 !important;
    margin-bottom: 5px !important;
  }

  .swap-card .help,
  .swap-card .muted,
  .slot-card .help,
  .slot-card .muted,
  .story-card .help,
  .story-card .muted,
  .marketplace-card .help,
  .marketplace-card .muted,
  .swap-result-card .help,
  .swap-result-card .muted,
  .available-slot-card .help,
  .available-slot-card .muted {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
  }

  .swap-card .badge,
  .slot-card .badge,
  .story-card .badge,
  .marketplace-card .badge,
  .swap-result-card .badge,
  .available-slot-card .badge {
    padding: 5px 8px !important;
    font-size: 0.76rem !important;
    line-height: 1.1 !important;
  }

  .swap-card .notice,
  .slot-card .notice,
  .story-card .notice,
  .marketplace-card .notice,
  .swap-result-card .notice,
  .available-slot-card .notice {
    display: none !important;
  }

  .swap-card .actions,
  .slot-card .actions,
  .story-card .actions,
  .marketplace-card .actions,
  .swap-result-card .actions,
  .available-slot-card .actions {
    margin-top: 8px !important;
    gap: 8px !important;
  }

  .swap-card .button,
  .swap-card button,
  .slot-card .button,
  .slot-card button,
  .story-card .button,
  .story-card button,
  .marketplace-card .button,
  .marketplace-card button,
  .swap-result-card .button,
  .swap-result-card button,
  .available-slot-card .button,
  .available-slot-card button {
    padding: 8px 10px !important;
    border-radius: 11px !important;
    font-size: 0.8rem !important;
    min-height: 0 !important;
  }

  .swap-card .grid,
  .slot-card .grid,
  .story-card .grid,
  .marketplace-card .grid,
  .swap-result-card .grid,
  .available-slot-card .grid {
    gap: 8px !important;
  }

  .swap-card .inline-divider,
  .slot-card .inline-divider,
  .story-card .inline-divider,
  .marketplace-card .inline-divider,
  .swap-result-card .inline-divider,
  .available-slot-card .inline-divider {
    margin: 8px 0 !important;
  }
}