:root{
  --bg:#eff6ff;
  --bg-soft:#f8fbff;
  --card:#ffffffcc;
  --card-solid:#ffffff;
  --text:#111827;
  --muted:#64748b;
  --line:#dbe7f5;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --red:#dc2626;
  --black:#111827;
  --green:#16a34a;
  --green-soft:#dcfce7;
  --danger:#dc2626;
  --shadow:0 24px 70px rgba(15,23,42,.13);
  --shadow-soft:0 14px 35px rgba(15,23,42,.08);
  --radius:24px;
  --radius-sm:16px;
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  min-height:100%;
  scroll-behavior:smooth;
}

body{
  min-height:100vh;
  min-height:100dvh;
  font-family:"Source Sans Pro",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 15% 10%,#ffffff 0%,transparent 30%),
    radial-gradient(circle at 85% 18%,#bfdbfe 0%,transparent 34%),
    radial-gradient(circle at 50% 100%,#dbeafe 0%,transparent 42%),
    linear-gradient(135deg,#f8fbff,#eff6ff 45%,#e0f2fe);
  padding:42px 18px 26px;
  overflow-x:hidden;
}

body::before,
body::after{
  content:"";
  position:fixed;
  width:280px;
  height:280px;
  border-radius:999px;
  background:rgba(37,99,235,.12);
  filter:blur(8px);
  pointer-events:none;
  z-index:-1;
}

body::before{
  top:-90px;
  left:-90px;
}

body::after{
  right:-120px;
  bottom:-120px;
  background:rgba(220,38,38,.08);
}

.wrapper{
  width:min(100%,860px);
  margin:0 auto;
  padding:34px;
  border:1px solid rgba(255,255,255,.75);
  border-radius:32px;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(255,255,255,.72));
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.hero{
  text-align:center;
  margin-bottom:28px;
}

.brand-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-bottom:16px;
}

.title-icon{
  width:58px;
  height:58px;
  object-fit:contain;
  flex:0 0 auto;
  border-radius:18px;
  box-shadow:0 12px 28px rgba(37,99,235,.18);
}

h1{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  font-size:clamp(28px,4.5vw,44px);
  line-height:1.05;
  font-weight:800;
  letter-spacing:.5px;
}

.title-red{
  color:var(--red);
}

.title-dark{
  color:var(--black);
}

.subtitle{
  width:min(100%,680px);
  margin:0 auto;
  color:var(--muted);
  font-size:clamp(17px,2.4vw,23px);
  line-height:1.45;
  font-weight:500;
}

.date-form{
  display:grid;
  gap:18px;
}

.card{
  padding:22px;
  border:1px solid rgba(219,231,245,.95);
  border-radius:var(--radius);
  background:rgba(255,255,255,.78);
  box-shadow:var(--shadow-soft);
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease,background .22s ease;
}

.card:hover{
  transform:translateY(-2px);
  border-color:#bfdbfe;
  background:rgba(255,255,255,.92);
  box-shadow:0 18px 45px rgba(15,23,42,.11);
}

.card-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.card-heading{
  margin-bottom:16px;
}

h2{
  font-size:21px;
  line-height:1.2;
  font-weight:800;
  color:var(--text);
}

h2.startdate{
  margin:0;
}

.today-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:linear-gradient(180deg,#ffffff,#eff6ff);
  color:var(--primary);
  font-size:14px;
  font-weight:800;
  font-family:inherit;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(37,99,235,.12);
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease;
}

.today-btn:hover{
  transform:translateY(-1px);
  background:#dbeafe;
  border-color:#93c5fd;
  box-shadow:0 12px 24px rgba(37,99,235,.16);
}

.date-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.field{
  min-width:0;
}

label{
  display:block;
  margin-bottom:7px;
  color:#334155;
  font-size:14px;
  font-weight:800;
}

input,
select{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:rgba(255,255,255,.95);
  color:var(--text);
  font-family:inherit;
  font-size:16px;
  font-weight:600;
  outline:none;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease,transform .2s ease;
}

input::placeholder{
  color:#94a3b8;
  font-weight:500;
}

input:focus,
select:focus{
  border-color:var(--primary);
  background:#fff;
  box-shadow:0 0 0 4px rgba(37,99,235,.15);
}

.form-group-inline{
  display:flex;
  align-items:center;
  gap:12px;
}

.form-group-inline input{
  flex:1;
  min-width:0;
}

.form-group-inline span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 16px;
  border:1px solid #bfdbfe;
  border-radius:var(--radius-sm);
  background:#eff6ff;
  color:#1e3a8a;
  font-size:15px;
  font-weight:800;
  white-space:nowrap;
}

.submit-btn,
button[type="submit"]{
  width:100%;
  min-height:52px;
  margin-top:2px;
  border:0;
  border-radius:18px;
  background:linear-gradient(135deg,var(--primary),#3b82f6);
  color:#fff;
  font-family:inherit;
  font-size:17px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 16px 35px rgba(37,99,235,.26);
  transition:transform .22s ease,box-shadow .22s ease,filter .22s ease;
}

.submit-btn:hover,
button[type="submit"]:hover{
  transform:translateY(-2px);
  filter:saturate(1.08);
  box-shadow:0 20px 45px rgba(37,99,235,.34);
}

.result{
  margin-top:22px;
  padding:24px 22px;
  border:1px solid rgba(191,219,254,.95);
  border-radius:var(--radius);
  background:linear-gradient(135deg,#ffffff,#eff6ff);
  text-align:center;
  box-shadow:var(--shadow-soft);
}

.result h3{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  margin:0 auto 12px;
  padding:6px 14px;
  background:#eff6ff;
  border-radius:999px;
  border:1px solid #bfdbfe;
  color:#1e3a8a;
  font-size:16px;
  font-weight:800;
  letter-spacing:.35px;
  text-transform:uppercase;
}

#resultDate{
  color:var(--primary-dark);
  font-size:clamp(28px,5vw,42px);
  line-height:1.15;
  font-weight:600;
  word-break:break-word;
}

.error{
  min-height:20px;
  margin-top:10px;
  color:var(--danger);
  font-size:14px;
  font-weight:700;
}

.footer{
  width:min(100%,860px);
  margin:22px auto 0;
  text-align:center;
  color:#334155;
  font-size:14px;
  font-weight:700;
}

.credit a{
  color:var(--primary);
  text-decoration:none;
  font-weight:800;
}

.credit a:hover{
  text-decoration:underline;
}

.support{
  margin-top:12px;
  text-align:center;
}

.support-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  padding:9px 17px;
  border:1px solid #86efac;
  border-radius:999px;
  background:linear-gradient(180deg,#f0fdf4,var(--green-soft));
  color:#166534;
  text-decoration:none;
  font-size:15px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(22,163,74,.13);
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}

.support-btn:hover,
.credit .support-btn:hover,
.support a:hover{
  transform:translateY(-1px);
  background:#bbf7d0;
  text-decoration:none;
  box-shadow:0 16px 30px rgba(22,163,74,.18);
}

.icon-gift{
  width:20px;
  height:20px;
  fill:#dc2626;
  animation:shake 2.5s infinite;
  transform-origin:center;
}

@keyframes shake{
  0%{transform:rotate(0deg)}
  5%{transform:rotate(-8deg)}
  10%{transform:rotate(6deg)}
  15%{transform:rotate(-4deg)}
  20%{transform:rotate(2deg)}
  25%{transform:rotate(0deg)}
  100%{transform:rotate(0deg)}
}

@media(max-width:720px){
  body{
    padding:22px 12px 22px;
  }

  .wrapper{
    padding:22px;
    border-radius:26px;
  }

  .brand-title{
    gap:10px;
  }

  .title-icon{
    width:46px;
    height:46px;
    border-radius:15px;
  }

  .card{
    padding:18px;
    border-radius:20px;
  }

  .card-header{
    align-items:flex-end;
  }

  .date-row{
    gap:12px;
  }
}

@media(max-width:560px){
  .wrapper{
    padding:18px 12px;
    border-radius:22px;
  }

  .brand-title{
    flex-direction:row;
    align-items:center;
    justify-content:center;
    gap:8px;
    width:100%;
  }

  .title-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:12px;
  }

  h1{
    flex:0 1 auto;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:4px;
    min-width:0;
    text-align:left;
    font-size:clamp(20px,5.7vw,27px);
    letter-spacing:.1px;
    white-space:nowrap;
  }

  .title-red,
  .title-dark{
    white-space:nowrap;
  }

  .subtitle{
    font-size:17px;
  }

  .card-header{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .card-header > div{
    min-width:0;
  }

  .today-btn{
    width:auto;
    flex:0 0 auto;
    min-height:34px;
    padding:7px 12px;
    margin-bottom:0;
    font-size:13px;
  }

  .date-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }

  label{
    font-size:13px;
  }

  input,
  select{
    min-height:45px;
    padding:10px 10px;
    font-size:15px;
    border-radius:14px;
  }

  .form-group-inline{
    flex-direction:row;
    align-items:center;
    gap:8px;
  }

  .form-group-inline span{
    width:auto;
    min-width:70px;
    min-height:45px;
    padding:0 12px;
    font-size:14px;
    border-radius:14px;
  }

  .result h3{
    font-size:16px;
    padding:6px 12px;
  }

  .footer{
    padding:0 10px;
  }
}

@media(max-width:380px){
  body{
    padding-left:8px;
    padding-right:8px;
  }

  .wrapper{
    padding:16px 10px;
  }

  .brand-title{
    gap:7px;
  }

  .title-icon{
    width:34px;
    height:34px;
    flex-basis:34px;
    border-radius:11px;
  }

  h1{
    font-size:clamp(18px,5.4vw,22px);
    gap:3px;
    letter-spacing:0;
  }

  .today-btn{
    min-height:32px;
    padding:6px 10px;
    font-size:12px;
  }

  .card{
    padding:15px;
  }

  .date-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }

  label{
    font-size:12px;
  }

  input,
  select{
    min-height:42px;
    padding:8px 7px;
    font-size:14px;
    border-radius:12px;
  }

  .form-group-inline{
    flex-direction:row;
    gap:7px;
  }

  .form-group-inline span{
    width:auto;
    min-width:62px;
    min-height:42px;
    padding:0 9px;
    font-size:13px;
    border-radius:12px;
  }

  .result h3{
    font-size:14px;
    padding:5px 11px;
  }
}