:root {

--gold: #c6a355;

--gold-shadow: rgba(198, 163, 85, 0.5);

--dark-blue: #0a0e14;

--text-color: #e0d8c0;

}



body {

margin: 0;

padding: 0;

font-family: 'Noto Serif JP', serif;

background-color: var(--dark-blue);

background-image: url('bg-image.png'); /* 背景画像を維持 */

background-size: cover;

background-attachment: fixed;

color: var(--text-color);

overflow-x: hidden;

}



.container {

max-width: 800px;

margin: 0 auto;

padding: 40px 20px;

background: rgba(10, 14, 20, 0.9);

box-shadow: 0 0 20px rgba(0,0,0,0.5);

box-sizing: border-box;

}



h1 {

font-family: 'Cormorant Garamond', serif;

text-align: center;

color: var(--gold);

font-size: 2.5rem;

border-bottom: 2px solid var(--gold);

padding-bottom: 10px;

line-height: 1.2;

}



h2 {

color: var(--gold);

font-size: 1.3rem;

margin-top: 40px;

border-left: 4px solid var(--gold);

padding-left: 10px;

text-align: left;

}



.step { margin-bottom: 50px; text-align: center; }

.hint { font-size: 0.9rem; color: #aaa; margin-bottom: 15px; }

.hint.highlight { color: var(--gold); font-weight: bold; }



#preview-wrapper {

position: relative;

width: 100%;

max-width: 400px;

margin: 20px auto;

border: 2px solid var(--gold);

background: #000;

aspect-ratio: 1393 / 2055;

overflow: hidden;

touch-action: none;

}



#preview-container { width: 100%; height: 100%; }



#frame-preview-overlay {

position: absolute;

top: 0; left: 0; width: 100%; height: 100%;

pointer-events: none;

z-index: 10;

display: none;

}



/* テキスト操作用UI */

#draggable-text-container {

position: absolute;

top: 75%; left: 50%;

transform: translate(-50%, -50%);

z-index: 20;

cursor: move;

user-select: none;

white-space: nowrap;

display: inline-block;

padding: 10px;

}



#draggable-text {

font-family: 'Cormorant Garamond', serif;

font-size: 24px;

font-weight: bold;

color: var(--gold);

text-shadow: 2px 2px 4px rgba(0,0,0,0.8);

display: block;

}



/* 右下の調整ハンドル */

#text-handle {

position: absolute;

right: -5px;

bottom: -5px;

width: 20px;

height: 20px;

background: var(--gold);

border-radius: 50%;

cursor: nwse-resize;

border: 2px solid #fff;

}



input[type="file"], input[type="text"] {

padding: 10px;

background: rgba(255,255,255,0.1);

border: 1px solid var(--gold);

color: #fff;

border-radius: 5px;

width: 90%;

max-width: 300px;

text-align: center;

}



.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }

.tab-btn {

background: transparent; border: 1px solid var(--gold); color: var(--gold);

padding: 10px 12px; cursor: pointer; flex: 1 1 30%; min-width: 80px; font-size: 0.9rem;

}

.tab-btn.active { background: var(--gold); color: var(--dark-blue); font-weight: bold; }



.main-btn, .save-btn {

background: var(--gold); border: none; color: var(--dark-blue);

padding: 15px 40px; font-weight: bold; cursor: pointer; border-radius: 30px;

box-shadow: 0 4px 15px var(--gold-shadow); width: 90%; max-width: 300px; margin-top: 10px;

}



#finalResultImage { width: 100%; height: auto; border: 2px solid var(--gold); }



.rules {

margin-top: 60px; padding: 20px; border: 1px solid rgba(198, 163, 85, 0.3);

font-size: 0.8rem; line-height: 1.8; text-align: left;

}

.rules h3 { color: var(--gold); text-align: center; }



@media (max-width: 600px) {

.container { padding: 20px 15px; }

h1 { font-size: 1.8rem; }

h2 { font-size: 1.1rem; text-align: center; border-left: none; border-bottom: 1px solid var(--gold); }

}
