:root {
    --red: #b01f43;
    --red-dark: #8e1636;
    --ink: #16181d;
    --field-bg: #f3f3f5;
    --field-border: #e4e4e8;
    --placeholder: #b7bcc4;
    --card-radius: 22px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: var(--ink);
    -webkit-text-size-adjust: 100%;
}

body { background: var(--red); }

/* 手機寬度置中容器 */
.page {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--red);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 背景白色緞帶（近似設計，非正式素材） */
.bg-ribbon {
    position: absolute;
    background: #fff;
    opacity: .16;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}
.bg-ribbon--1 {
    width: 150%;
    height: 190px;
    top: -90px;
    left: -30%;
    border-radius: 50%;
    transform: rotate(-8deg);
}
.bg-ribbon--2 {
    width: 130%;
    height: 320px;
    right: -55%;
    top: 44%;
    border-radius: 50%;
    transform: rotate(-18deg);
}

/* 品牌區 */
.brand {
    position: relative;
    z-index: 2;
    padding: 26px 24px 8px;
    min-height: 150px;
}
.brand__wordmark {
    color: #fff;
    text-align: center;
    font-family: "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;
    font-size: 44px;
    font-style: italic;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
/* 酒瓶封蓋佔位（TODO 換正式圖） */
.brand__cap {
    position: absolute;
    right: 20px;
    top: 78px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #7a0e1e 0 34%, #2a0a0e 46%, #120608 70%);
    box-shadow: 0 10px 22px rgba(0,0,0,.35), inset 0 4px 10px rgba(255,255,255,.12);
}
.brand__cap::after {
    content: "";
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #c11d34, #7c0f1f);
    box-shadow: inset 0 2px 6px rgba(0,0,0,.4);
}

/* 內容 */
.content {
    position: relative;
    z-index: 2;
    padding: 8px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    flex: 1;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 26px 22px;
    box-shadow: 0 14px 30px rgba(0,0,0,.14);
}

/* 表單欄位 */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field--row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.field--row .grow { flex: 1; }

.field input,
.field select {
    width: 100%;
    height: 52px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus,
.field select:focus { border-color: var(--red); background: #fff; }

.field .zip {
    width: 128px;
    flex: none;
    text-align: left;
}

/* 下拉箭頭 */
.field--select { position: relative; }
.field--select select {
    color: var(--ink);
    padding-right: 40px;
}
.field--select select:required:invalid { color: var(--placeholder); }
.field--select option { color: var(--ink); }
.field--select::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 11px;
    height: 11px;
    transform: translateY(-60%) rotate(45deg);
    border-right: 2px solid #9aa0aa;
    border-bottom: 2px solid #9aa0aa;
    pointer-events: none;
}

/* 日期欄的日曆圖示 */
.field--date { position: relative; }
.field--date::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0aa' stroke-width='2'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='3' y1='9' x2='21' y2='9'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='16' y1='2' x2='16' y2='6'/></svg>");
}
.field--date input { color: var(--ink); }

/* 欄位驗證 */
.field input.invalid,
.field select.invalid { border-color: var(--red); background: #fff5f7; }

/* 序號卡 */
.code-card { text-align: center; }
.code {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #111;
    word-break: break-all;
    line-height: 1.1;
}
.copy-btn {
    margin: 14px 0 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #e9eaee;
    color: #4a4f57;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.copy-btn:active { transform: scale(.94); }

.code-pill {
    background: #fff;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
    margin-bottom: 16px;
}
.code-pill__input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 17px;
    letter-spacing: 2px;
    color: #333;
    text-align: center;
}

/* LINE 按鈕 */
.line-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(176,31,67,.35);
}
.line-btn:active { transform: translateY(1px); }
.line-btn__glyph {
    background: #fff;
    color: var(--red);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .5px;
    padding: 3px 7px;
    border-radius: 7px;
}

.msg {
    margin: 14px 2px 0;
    min-height: 18px;
    font-size: 13px;
    color: var(--red-dark);
    text-align: center;
}
.msg.ok { color: #1a7f43; }

/* 底部警語 */
.warn {
    position: relative;
    z-index: 2;
    background: #111;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.warn__text { line-height: 1.4; }
.warn__text strong { font-size: 18px; letter-spacing: 4px; margin-right: 8px; }
.warn__text span { font-size: 16px; letter-spacing: 2px; }
