/* ===== 灣仔主題（白底，去掉埃及淺黃羊皮紙） ===== */
:root {
    --aiji-sand: #f5f5f5;
    --aiji-parchment: #ffffff;
    --aiji-pale: #fafafa;
    --aiji-gold: #a86459;
    --aiji-gold-dark: #8f6d38;
    --aiji-brown: #26333b;
    --aiji-brown-soft: #4a5560;
    --aiji-teal: #34423f;
    --aiji-night: #1a2228;
    --font-display: 'Playfair Display', 'Noto Serif SC', serif;
    --font-body: 'Noto Sans TC', 'Noto Sans SC', 'Manrope', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

body {
    background: #f4f4f2;
    font-family: var(--font-body);
}

.phone-frame {
    background: #ffffff;
    border: 1px solid rgba(38, 51, 59, 0.08);
    box-shadow: 0 16px 48px rgba(32, 40, 50, 0.08);
}

/* 导航品牌区 */
.aiji-nav {
    flex-direction: column;
    align-items: flex-start !important;
    padding: 12px 16px 10px !important;
    position: relative;
}

.brand-lockup {
    width: calc(100% - 80px);
}

.brand-line1,
.brand-line2 {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--aiji-brown);
    line-height: 1.45;
    text-transform: uppercase;
}

.lang-selector {
    position: absolute;
    right: 12px;
    top: 12px;
    background: #fff;
    border: 1px solid rgba(38, 51, 59, 0.12);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    z-index: 100;
    color: var(--aiji-brown);
}

.nav-bar {
    border-bottom: 1px solid rgba(38, 51, 59, 0.08);
    background: #ffffff;
}

.step-item.active .step-num {
    background: var(--aiji-gold);
    border-color: var(--aiji-gold);
}

.step-item.done .step-num {
    background: var(--aiji-brown);
    border-color: var(--aiji-brown);
}

.step-line.done {
    background: var(--aiji-gold);
}

/* Hero 横幅 */
.aiji-hero-banner {
    position: relative;
    min-height: 200px;
    margin: 0 0 12px;
    background:
        linear-gradient(180deg, rgba(11, 21, 34, 0.15) 0%, rgba(11, 21, 34, 0.45) 100%),
        url('/images/wanchai/layouts/layout-blue-house.png') center/cover no-repeat;
    overflow: hidden;
}

.aiji-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(243, 234, 216, 0.1), rgba(43, 33, 21, 0.35));
}

.aiji-hero-content {
    position: relative;
    z-index: 1;
    padding: 20px 18px 22px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.aiji-brand-tag {
    font-size: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 600;
}

.aiji-hero-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 10px;
}

.aiji-hero-title em {
    font-style: italic;
    color: #f5d78e;
}

.aiji-hero-desc {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.aiji-hero-desc-en {
    font-size: 10px;
    letter-spacing: 0.06em;
    opacity: 0.85;
    line-height: 1.5;
}

/* 步骤条 */
.aiji-steps-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 0 12px 14px;
}

.aiji-step {
    text-align: center;
    background: #fff;
    border: 1px solid rgba(38, 51, 59, 0.1);
    border-radius: 8px;
    padding: 6px 2px;
}

.aiji-step span {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--aiji-gold-dark);
    font-weight: 500;
}

.aiji-step p {
    font-size: 9px;
    color: var(--aiji-brown);
    margin-top: 2px;
    line-height: 1.2;
}

/* 造型区 */
.aiji-makeover {
    padding: 0 16px 12px;
    text-align: center;
}

.aiji-makeover-label {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aiji-gold-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

.aiji-makeover h2 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--aiji-brown);
    line-height: 1.3;
    margin-bottom: 8px;
}

.aiji-makeover h2 em {
    font-style: italic;
    color: var(--aiji-gold-dark);
}

.aiji-makeover-desc {
    font-size: 12px;
    color: #5a6570;
    line-height: 1.6;
}

.upload-format-tip {
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a939c;
    margin: 6px 0 10px;
}

/* 上传区 */
.upload-area .preview-box {
    border: 2px dashed rgba(38, 51, 59, 0.18);
    background: #fff;
}

.btn-primary,
.btn-generate,
.btn-done {
    background: linear-gradient(135deg, #a86459, #8f554c) !important;
    color: #fff !important;
    border: none !important;
    font-family: var(--font-body);
    letter-spacing: 0.04em;
}

.btn-primary:hover,
.btn-generate:hover {
    filter: brightness(1.05);
}

/* 选框 + 人物 */
.aiji-section-title {
    font-size: 13px;
    color: var(--aiji-gold-dark);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.aiji-section-title small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-top: 2px;
    opacity: 0.75;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px 16px;
}

.layout-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    aspect-ratio: 1414 / 2000;
    background: #fff;
}

.layout-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.layout-card.selected {
    border-color: var(--aiji-gold);
    box-shadow: 0 0 0 2px rgba(168, 100, 89, 0.25);
}

.layout-card .layout-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: rgba(43, 33, 21, 0.8);
    color: #fff;
    font-size: 10px;
    text-align: center;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
}

.character-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #fff;
    transition: border-color 0.2s, transform 0.15s;
    aspect-ratio: 3 / 4;
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.character-card.selected {
    border-color: var(--aiji-gold);
    transform: scale(1.04);
}

.character-card .char-label {
    font-size: 8px;
    text-align: center;
    padding: 3px 2px;
    color: var(--aiji-brown);
    background: rgba(255,255,255,0.9);
}

/* 结果预览 */
.result-area .result-canvas {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(38, 51, 59, 0.12);
    background: #fff;
}

/* 分享页 */
.aiji-share-page {
    padding: 12px 16px 20px;
}

.aiji-share-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 12px 32px rgba(43, 33, 21, 0.15);
}

.aiji-share-preview img {
    width: 100%;
    display: block;
}

.aiji-share-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    font-size: 11px;
    color: #888;
    border-top: 1px solid #eee;
}

.aiji-share-card-footer strong {
    color: var(--aiji-brown);
    font-size: 12px;
}

.aiji-share-panel {
    background: #fff;
    border: 1px solid rgba(38, 51, 59, 0.1);
    border-radius: 16px;
    padding: 16px;
}

.aiji-share-panel h3 {
    text-align: center;
    font-size: 13px;
    color: var(--aiji-gold-dark);
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    font-weight: 600;
}

.aiji-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.aiji-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(38, 51, 59, 0.12);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--aiji-brown);
    transition: background 0.2s;
}

.aiji-social-btn:hover {
    background: #f6f5f1;
}

.aiji-copy-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(38, 51, 59, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--aiji-brown);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 12px;
}

.aiji-download-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #a86459, #8f554c);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aiji-text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(38, 51, 59, 0.12);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: var(--aiji-brown);
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.aiji-text-input::placeholder {
    color: #9aa3ab;
}

#globalLoading {
    background: rgba(255, 255, 255, 0.92) !important;
}

#globalLoading .spinner {
    border-top-color: var(--aiji-gold) !important;
}

.style-grid { display: none !important; }
