  :root{
    --red-bg: #C8102E;
    --red-deep: #8C0A1F;
    --red-shadow: #6E0818;
    --cream: #FFF6EC;
    --cream-soft: #FBEFDF;
    --ink: #2A0A0D;
    --gold: #E8B84B;
    --green: #1A7A4A;
    --green-bg: #EAF7EF;
    --orange: #C45C00;
    --orange-bg: #FFF3E6;
    --line: rgba(255,255,255,0.35);
  }
  *{ box-sizing:border-box; }
  html,body{ margin:0; padding:0; }
  a{ text-decoration:none; }
  body{
    background: var(--red-bg);
    background-image:
      radial-gradient(circle at 50% -10%, rgba(255,255,255,0.10), transparent 55%),
      linear-gradient(180deg, var(--red-bg), var(--red-deep) 85%);
    font-family: 'Noto Sans Thai','Fraunces',sans-serif;
    color: var(--cream);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 28px 14px 60px;
  }
  .page{
	    width:100%;
	    max-width:460px;
	}

/* Header */
  .logo-row{
    text-align:center;
    margin-bottom:18px;
  }
  .logo-row .logo{
    font-family:'Fraunces',serif;
    font-weight:900;
    font-style:normal;
    font-size: 40px;
    letter-spacing: 0.5px;
    color: var(--cream);
    display:inline-flex;
    align-items:baseline;
    gap:2px;
  }
  .logo-row .logo .accent{
    font-style:italic;
    font-weight:700;
  }
  .logo-row .sub{
    margin-top:2px;
    font-size:11px;
    letter-spacing:3px;
    text-transform:uppercase;
    color: rgba(255,246,236,0.65);
    font-weight:600;
  }

  /* Banner Styling */
  .banner-container {
    width: 100%;
    /* border-radius: 8px; */
    overflow: hidden;
    /* margin-bottom: 20px; */
    /* box-shadow: 0 8px 24px rgba(0,0,0,0.3); */
    /* border: 1.5px solid rgba(255,246,236,0.2); */
    aspect-ratio: 1920 / 1080;
  }
  .banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Tabs (now real links across the 3 pages) */
  .tabs{ display:grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; margin-bottom:22px; }
  .tab{
    text-align:center; font-size:12.5px; font-weight:700; padding:11px 4px;
    border:1.5px solid var(--cream); border-radius:3px; color: var(--cream);
    background: transparent; white-space:nowrap; display:block;
    transition: background .15s ease, color .15s ease;
  }
  .tab.active{ background: var(--cream); color: var(--red-deep); }
  .tab:not(.active):hover{ background: rgba(255,255,255,0.12); }

  /* Recessed box, echoing the photo-box in the brief */
  .box{
    position:relative;
    border-radius:6px;
    padding: 26px 20px 30px;
    background:
      linear-gradient(180deg, var(--red-deep), var(--red-shadow));
    box-shadow:
      inset 0 14px 26px rgba(0,0,0,0.45),
      inset 0 -6px 14px rgba(0,0,0,0.25),
      0 10px 30px rgba(0,0,0,0.35);
  }
  .box::before{
    content:"";
    position:absolute; inset:10px;
    border:1px solid rgba(255,255,255,0.08);
    border-radius:4px;
    pointer-events:none;
  }

  .checkline{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin-top:18px;
    font-size:12px;
    line-height:1.55;
    color:#5B4636;
  }
  .checkline input{
    margin-top:3px;
    width:16px; height:16px;
    accent-color: var(--red-bg);
    flex-shrink:0;
  }
  .checkline a{ color: var(--red-bg); font-weight:700; text-decoration:underline; }

  .form-title{
    font-family:'Fraunces',serif;
    font-weight:700;
    font-size:23px;
    color: var(--cream);
    margin: 2px 0 4px;
    text-align:center;
  }
  .form-sub{
    font-size:13px;
    line-height:1.6;
    color: rgba(255,246,236,0.78);
    margin:0 0 22px;
    text-align:center;
  }

  form{
    background: var(--cream);
    border-radius: 10px;
    padding: 22px 18px 24px;
    box-shadow: 0 18px 30px -10px rgba(0,0,0,0.5);
  }

  /* Search card */
  .search-card{
    background:var(--cream); border-radius:10px; padding:22px 18px 24px;
    box-shadow:0 18px 30px -10px rgba(0,0,0,0.5);
    margin-bottom:16px;
  }

  .field{ margin-bottom:16px; }
  .field:last-of-type{ margin-bottom:0; }
  label{
    display:block;
    font-size:12.5px;
    font-weight:700;
    color: var(--red-deep);
    margin-bottom:6px;
    letter-spacing:0.2px;
  }
  label .req{ color: var(--red-bg); margin-left:2px; }

  input[type=text],
  input[type=tel],
  input[type=email],
  input[type=date],
  select{
    width:100%;
    padding:12px 13px;
    font-size:14.5px;
    font-family:inherit;
    color: var(--ink);
    background: #ffffff;
    border:1.5px solid #E6D8C8;
    border-radius:6px;
    outline:none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance:none;
    appearance:none;
  }
  select{
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%238C0A1F' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat:no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
  }

  .upload{
    border: 1.5px dashed #D8C4AE;
    border-radius:6px;
    padding: 18px 12px;
    text-align:center;
    background: var(--cream-soft);
    cursor:pointer;
    position:relative;
  }
  .upload input[type=file]{
    position:absolute; inset:0; opacity:0; cursor:pointer;
  }
  .upload .icon{
    font-size:20px; display:block; margin-bottom:4px;
  }
  .upload .hint{
    font-size:11.5px; color:#8C7860; margin-top:2px;
  }
  .upload .main-txt{
    font-size:13px; font-weight:600; color: var(--red-deep);
  }

  .checkline{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin-top:18px;
    font-size:12px;
    line-height:1.55;
    color:#5B4636;
  }
  .checkline input{
    margin-top:3px;
    width:16px; height:16px;
    accent-color: var(--red-bg);
    flex-shrink:0;
  }
  .checkline a{ color: var(--red-bg); font-weight:700; text-decoration:underline; }

  .submit-btn{
    width:100%;
    margin-top:20px;
    padding:14px;
    border:none;
    border-radius:6px;
    background: var(--red-bg);
    color:#fff;
    font-size:15.5px;
    font-weight:800;
    letter-spacing:0.3px;
    cursor:pointer;
    transition: background .15s ease, transform .1s ease;
  }
  .submit-btn:hover{ background: var(--red-deep); }
  .submit-btn:active{ transform: translateY(1px); }

  .terms-note{
    text-align:center;
    font-size:11px;
    color: rgba(255,246,236,0.6);
    margin-top:16px;
    line-height:1.6;
  }

  input::placeholder{ color:#B7A493; }
  input:focus, select:focus, input[type=date]:focus{
    border-color: var(--red-bg);
    box-shadow: 0 0 0 3px rgba(200,16,46,0.15);
  }
  .search-btn{
    width:100%; margin-top:14px; padding:13px;
    border:none; border-radius:6px;
    background:var(--red-bg); color:#fff;
    font-size:15px; font-weight:800; font-family:inherit;
    cursor:pointer; transition:background .15s;
  }
  .search-btn:hover{ background:var(--red-deep); }
  .search-btn:active{ transform:translateY(1px); }

  .divider{
    display:flex; align-items:center; gap:10px;
    margin:16px 0;
  }
  .divider hr{ flex:1; border:none; border-top:1px dashed #DFCFBC; }
  .divider span{ font-size:11px; color:#B7A493; white-space:nowrap; }

  /* Result area (hidden by default, JS shows) */
  .result-area{ display:none; }
  .result-area.show{ display:block; }

  /* Status card */
  .status-card{
    background:var(--cream); border-radius:10px;
    overflow:hidden;
    box-shadow:0 14px 24px -10px rgba(0,0,0,0.45);
    margin-bottom:14px;
  }
  .status-head{
    padding:14px 16px;
    display:flex; align-items:center; gap:12px;
  }
  .status-head.winner{ background:var(--green-bg); border-bottom:1px solid #C0E8D0; }
  .status-head.pending{ background:var(--orange-bg); border-bottom:1px solid #F5D5B0; }
  .status-head.normal{ background:var(--cream-soft); border-bottom:1px solid #EFDDC7; }

  .status-icon{
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:18px; flex-shrink:0;
  }
  .status-icon.winner{ background:#D4F0E2; }
  .status-icon.pending{ background:#FFE5C2; }
  .status-icon.normal{ background:#E6D8C8; }

  .status-label{ font-size:13px; font-weight:800; }
  .status-label.winner{ color:var(--green); }
  .status-label.pending{ color:var(--orange); }
  .status-label.normal{ color:#6B5040; }
  .status-note{ font-size:11.5px; color:#8C7860; margin-top:2px; }

  .info-rows{ padding:12px 16px 16px; }
  .info-row{
    display:flex; justify-content:space-between;
    font-size:12.5px; padding:6px 0;
    border-bottom:1px dashed #EADBC6;
  }
  .info-row:last-child{ border-bottom:none; }
  .info-row .lbl{ color:#8C7860; font-weight:600; }
  .info-row .val{ color:var(--ink); font-weight:700; text-align:right; }

  /* History table */
  .hist-card{
    background:var(--cream); border-radius:10px;
    overflow:hidden;
    box-shadow:0 14px 24px -10px rgba(0,0,0,0.45);
  }
  .hist-head-row{
    display:grid; grid-template-columns:auto 1fr auto;
    gap:8px; padding:10px 16px;
    background:var(--red-deep);
    font-size:11px; font-weight:700; color:rgba(255,246,236,0.85);
    letter-spacing:0.3px;
  }
  .hist-row{
    display:grid; grid-template-columns:auto 1fr auto;
    gap:8px; padding:11px 16px;
    border-bottom:1px dashed #EADBC6;
    align-items:center;
    font-size:12.5px;
  }
  .hist-row:last-child{ border-bottom:none; }
  .hist-row .h-num{ color:#B7A493; font-weight:700; }
  .hist-row .h-date{ color:var(--ink); font-weight:600; }
  .hist-row .h-model{ color:#6B5040; font-size:11.5px; margin-top:1px; }
  .hist-row .h-badge{
    font-size:10.5px; font-weight:800; padding:3px 9px;
    border-radius:20px; white-space:nowrap; text-align:center;
  }
  .h-badge.ok{ background:#D4F0E2; color:var(--green); }
  .h-badge.reviewing{ background:#FFE5C2; color:var(--orange); }

  /* Empty state */
  .empty{
    text-align:center; padding:32px 20px 28px;
  }
  .empty .e-icon{ font-size:36px; margin-bottom:10px; }
  .empty .e-msg{ font-size:14px; font-weight:700; color:var(--red-deep); }
  .empty .e-sub{ font-size:12px; color:#8C7860; margin-top:4px; line-height:1.6; }

  .help-note{
    text-align:center; font-size:12px; line-height:1.7;
    color:rgba(255,246,236,0.85); margin-top:20px;
  }
  .help-note a{ color:var(--cream); font-weight:800; text-decoration:underline; }


  .panel{
    background: var(--cream);
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 18px 18px 6px;
    box-shadow: 0 14px 24px -10px rgba(0,0,0,0.45);
  }
  .panel:last-child{ margin-bottom:0; }

  .panel-head{
    display:flex; align-items:center; gap:10px;
    margin-bottom: 12px;
  }
  .panel-icon{
    flex-shrink:0; width:30px; height:30px; border-radius:8px;
    background: var(--red-bg); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-size:15px;
  }
  .panel-title{
    font-size:15px; font-weight:800; color: var(--red-deep);
  }

  .rule-list{ list-style:none; margin:0; padding:0; }
  .rule-list li{
    display:flex; gap:10px;
    font-size:13px; line-height:1.65; color: var(--ink);
    padding-bottom:14px;
  }
  .rule-list li .n{
    flex-shrink:0; width:20px; height:20px; border-radius:50%;
    background: var(--cream-soft); border:1.3px solid #E6D8C8;
    color: var(--red-bg); font-weight:800; font-size:11px;
    display:flex; align-items:center; justify-content:center;
    margin-top:1px;
  }
  .rule-list li b{ color: var(--red-deep); }

  /* Timeline */
  .timeline{ margin: 4px 0 8px; }
  .t-row{
    display:flex; gap:12px; padding-bottom:14px; position:relative;
  }
  .t-row .dot-col{
    display:flex; flex-direction:column; align-items:center; flex-shrink:0;
  }
  .t-row .dot{
    width:10px; height:10px; border-radius:50%; background: var(--red-bg);
    margin-top:4px;
  }
  .t-row .bar{
    flex:1; width:1.5px; background: #E6D8C8; margin-top:2px;
  }
  .t-row:last-child .bar{ display:none; }
  .t-row .t-date{ font-size:12px; font-weight:800; color: var(--red-deep); }
  .t-row .t-desc{ font-size:12.5px; color:#5B4636; margin-top:2px; line-height:1.5; }

  /* Prize summary mini */
  .mini-prize{
    display:flex; justify-content:space-between; align-items:center;
    padding: 10px 0;
    border-bottom: 1px dashed #EADBC6;
    font-size: 13px;
  }
  .mini-prize:last-child{ border-bottom:none; }
  .mini-prize .mp-name{ color: var(--ink); font-weight:700; }
  .mini-prize .mp-count{
    font-size:11px; font-weight:700; color: var(--red-bg);
    border:1.3px solid var(--red-bg); border-radius:20px;
    padding: 2px 9px; white-space:nowrap;
  }

  .disclaimer{
    font-size:11px; line-height:1.7; color:#8C7860;
    padding: 10px 0 12px;
  }

  .check-note{
    text-align:center; font-size:12px; line-height:1.7;
    color: rgba(255,246,236,0.85);
    margin-top: 20px;
  }
  .check-note a{ color: var(--cream); font-weight:800; text-decoration: underline; }

  .cta-row{
    display:flex; gap:10px; margin-top:22px;
  }
  .cta{
    flex:1; text-align:center; padding:13px;
    border-radius:6px; font-size:14px; font-weight:800;
  }
  .cta.primary{ background: var(--cream); color: var(--red-deep); }
  .cta.primary:hover{ background:#fff; }
  .cta.ghost{ border:1.5px solid var(--cream); color: var(--cream); }
  .cta.ghost:hover{ background: rgba(255,255,255,0.1); }

  footer{
    text-align:center;
    margin-top:22px;
    font-size:10.5px;
    letter-spacing:1.5px;
    text-transform:uppercase;
    color: rgba(255,246,236,0.45);
  }

  @media (max-width:380px){
    .logo-row .logo{ font-size:34px; }
    .tab{ font-size:11px; padding:9px 2px; }
  }