-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.html
More file actions
694 lines (645 loc) · 49 KB
/
Copy pathcamera.html
File metadata and controls
694 lines (645 loc) · 49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>p-booth — Camera</title>
<!-- PWA -->
<link rel="manifest" href="manifest.json">
<meta name="screen-orientation" content="portrait">
<meta name="theme-color" content="#ff6b9d">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="p-booth">
<link rel="apple-touch-icon" href="icon-192.svg">
<link rel="stylesheet" href="css/style.css">
<style>
/* Desktop/landscape: locked viewport */
@media (min-width: 769px) {
html, body { height: 100%; overflow: hidden; }
main { overflow: hidden; }
.camera-layout { height: 100%; overflow: hidden; }
.camera-main { height: 100%; overflow: hidden; }
}
.camera-viewfinder video { transform: scaleX(-1); }
body { display: flex; flex-direction: column; }
main { flex: 1; min-height: 0; }
.camera-layout { overflow: hidden; }
.camera-main { display: flex; flex-direction: column; min-height: 0; }
.camera-viewfinder { flex: 1; min-height: 0; aspect-ratio: unset !important; }
canvas#snapshot { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:none; }
/* Upload/Rearrange views: flex column, fill height, no scroll on desktop */
#uploadModeView { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; }
#rearrangeView { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; }
#cameraModeView { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.sidebar-customize { display: flex; flex-direction: column; gap: 9px; }
.sidebar-color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.sidebar-swatch { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s, border-color .15s; outline: none; }
.sidebar-swatch:hover { transform: scale(1.2); }
.sidebar-swatch.selected { border-color: var(--pink) !important; transform: scale(1.18); box-shadow: 0 0 0 2px rgba(255,107,157,.3); }
.sidebar-swatch[data-color="#ffffff"] { border-color: #ddd; }
.sidebar-color-name { font-size: .65rem; font-weight: 700; color: var(--text-muted); letter-spacing: .02em; text-align: right; }
.sidebar-field-label { font-size: .6rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.sidebar-input, .sidebar-date-input { width: 100%; padding: 6px 9px; border-radius: 8px; border: 1.5px solid rgba(168,85,247,.18); background: rgba(255,255,255,.6); font-size: .72rem; font-family: inherit; color: var(--text); outline: none; box-sizing: border-box; transition: border-color .2s; }
.sidebar-input:focus, .sidebar-date-input:focus { border-color: var(--pink); }
.sidebar-quick-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sidebar-quick-btn { padding: 3px 8px; border-radius: 20px; border: 1.5px solid rgba(255,107,157,.3); background: rgba(255,107,157,.07); color: var(--pink); font-size: .6rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.sidebar-quick-btn:hover { background: rgba(255,107,157,.15); }
.sidebar-divider { border: none; border-top: 1px dashed rgba(168,85,247,.15); margin: 4px 0; }
#panelPreview { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#panelPreview .live-preview-wrap { flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#panelPreview #liveStripCanvas { max-width: 100%; max-height: 100%; width: auto !important; height: auto !important; display: block; }
.upload-slot[draggable="true"] { cursor: grab; }
.upload-slot[draggable="true"]:active { cursor: grabbing; }
.upload-slot.dragging { opacity: .4; transform: scale(.96); border-style: dashed; border-color: var(--pink); }
.upload-slot.drag-over { border-color: var(--pink); background: rgba(255,107,157,.12); transform: scale(1.04); box-shadow: 0 0 0 3px rgba(255,107,157,.25); }
.drag-handle { position: absolute; top: 4px; left: 4px; z-index: 10; width: 22px; height: 22px; border-radius: 5px; background: rgba(0,0,0,.45); color: #fff; display: none; align-items: center; justify-content: center; font-size: 11px; cursor: grab; touch-action: none; user-select: none; }
.upload-slot.filled .drag-handle { display: flex; }
@media (pointer: coarse) {
.drag-handle { width: 32px; height: 32px; font-size: 16px; background: rgba(255,107,157,.85); border-radius: 6px; top: 3px; left: 3px; }
}
.upload-slot-reorder-hint { font-size: .63rem; color: var(--text-muted); font-weight: 600; text-align: center; padding: 4px 0 0; display: none; }
.upload-slot-reorder-hint.visible { display: block; }
.upload-slot-reorder-hint.tap-active { color: var(--pink); font-weight: 700; }
/* Mobile tap-to-swap styles */
.upload-slot.tap-selected { border-color: var(--pink) !important; box-shadow: 0 0 0 3px rgba(255,107,157,.35); transform: scale(1.04); background: rgba(255,107,157,.08); }
.upload-slot.tap-selected::after { content: '✓'; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: var(--pink); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; line-height: 1; }
.upload-slot-order-badge { position: absolute; bottom: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 4px; background: rgba(0,0,0,.5); color: #fff; border-radius: 5px; font-size: 10px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.upload-slot.filled .upload-slot-order-badge { display: flex; }
.camera-left-panel { overflow-y: auto; }
.camera-right-panel { overflow: hidden; }
.camera-left-panel .sidebar-panel, .camera-right-panel .sidebar-panel { padding: 12px; }
.camera-left-panel .sidebar-panel h3, .camera-right-panel .sidebar-panel h3 { margin-bottom: 8px; }
/* mobile-only-btn: hidden on desktop (left/right panels visible), shown on mobile */
.mobile-only-btn { display: none; }
@media (max-width: 768px) { .mobile-only-btn { display: inline-flex !important; } }
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) { .mobile-only-btn { display: inline-flex !important; } }
/* desktop-only: shown on desktop, hidden on mobile */
.desktop-only { display: none; }
@media (min-width: 769px) { .desktop-only { display: flex; } }
/* desktop-hidden: hidden on desktop, shown normally on mobile */
@media (min-width: 769px) { .desktop-hidden { display: none !important; } }
/* right-panel action buttons */
#desktopGenerateWrap, #desktopRearrangeActionsWrap {
display: none;
flex-direction: column;
gap: 8px;
padding: 8px 12px 12px;
flex-shrink: 0;
}
@media (min-width: 769px) {
#desktopGenerateWrap { display: flex; }
#desktopRearrangeActionsWrap { display: flex; }
}
/* Legacy alias */
.mobile-customize-btn { display: none; }
@media (max-width: 768px) { .mobile-customize-btn { display: inline-flex !important; } }
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) { .mobile-customize-btn { display: inline-flex !important; } }
/* ─── PAUSE BUTTON ─── */
.btn-pause {
background: rgba(255,107,157,.1);
color: var(--pink);
border: 2px solid var(--pink-border);
flex-shrink: 0;
}
.btn-pause:hover { background: rgba(255,107,157,.2); }
.btn-pause.is-paused {
background: linear-gradient(135deg, #f97316, #ea580c);
color: white; border-color: transparent;
box-shadow: 0 4px 18px rgba(249,115,22,.45);
animation: pausePulse 1.8s ease-in-out infinite;
}
@keyframes pausePulse {
0%,100% { box-shadow: 0 4px 18px rgba(249,115,22,.4); }
50% { box-shadow: 0 6px 30px rgba(249,115,22,.7); }
}
/* ─── PAUSED OVERLAY (over viewfinder) ─── */
#pausedOverlay {
position: absolute; inset: 0; z-index: 14;
background: rgba(10,0,20,.85);
backdrop-filter: blur(5px);
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px; text-align: center; padding: 20px;
}
#pausedOverlay.visible { display: flex; }
.paused-icon { font-size: 3.2rem; animation: float 3s ease-in-out infinite; }
.paused-title { font-size: 1.25rem; font-weight: 900; color: white; }
.paused-sub { font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,.55); max-width: 240px; line-height: 1.6; }
.paused-resume-btn {
margin-top: 6px; padding: 12px 30px; border-radius: 50px;
background: linear-gradient(135deg, var(--pink), #e0378a);
color: white; border: none; font-weight: 800; font-size: 0.84rem;
cursor: pointer; box-shadow: 0 4px 18px rgba(255,107,157,.4);
font-family: var(--font-ui); transition: all .2s;
}
.paused-resume-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,107,157,.6); }
.paused-resume-btn:active { transform: scale(0.97); }
/* ─── FIX: Mobile upload actions — always fully in-viewport ─── */
@media (max-width: 768px) {
#uploadModeView .upload-mode-container { padding-bottom: max(80px, env(safe-area-inset-bottom, 80px)); }
/* Ensure the continue / build-strip buttons are never hidden under the keyboard */
#uploadContinueBtn {
position: sticky;
bottom: max(12px, env(safe-area-inset-bottom, 12px));
z-index: 5;
}
#buildStripBtn {
position: relative;
z-index: 5;
}
/* Slightly bigger tap targets for rearrange action buttons */
.rearrange-actions .btn { min-height: 50px; }
/* Prevent horizontal overflow caused by long button labels */
.rearrange-actions { flex-direction: column !important; gap: 10px !important; padding: 12px 0 max(12px, env(safe-area-inset-bottom, 12px)) !important; }
/* Mode-toggle and icon buttons: adequate tap size */
.mode-toggle-wrap .btn { min-width: 44px; min-height: 44px; }
/* Mobile customize / preview icon buttons */
#mobileCustomizeBtn, #mobilePreviewBtn { min-width: 44px; min-height: 44px; padding: 8px 12px !important; }
}}
/* ─── PAUSE BUTTON ─── */
.btn-pause {
background: rgba(255,107,157,.1);
color: var(--pink);
border: 2px solid var(--pink-border);
flex-shrink: 0;
}
.btn-pause:hover { background: rgba(255,107,157,.2); }
.btn-pause.is-paused {
background: linear-gradient(135deg, #f97316, #ea580c);
color: white; border-color: transparent;
box-shadow: 0 4px 18px rgba(249,115,22,.45);
animation: pausePulse 1.8s ease-in-out infinite;
}
@keyframes pausePulse {
0%,100% { box-shadow: 0 4px 18px rgba(249,115,22,.4); }
50% { box-shadow: 0 6px 30px rgba(249,115,22,.7); }
}
/* ─── PAUSED OVERLAY (over viewfinder) ─── */
#pausedOverlay {
position: absolute; inset: 0; z-index: 14;
background: rgba(10,0,20,.85);
backdrop-filter: blur(5px);
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px; text-align: center; padding: 20px;
}
#pausedOverlay.visible { display: flex; }
.paused-icon { font-size: 3.2rem; animation: float 3s ease-in-out infinite; }
.paused-title { font-size: 1.25rem; font-weight: 900; color: white; }
.paused-sub { font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,.55); max-width: 240px; line-height: 1.6; }
.paused-resume-btn {
margin-top: 6px; padding: 12px 30px; border-radius: 50px;
background: linear-gradient(135deg, var(--pink), #e0378a);
color: white; border: none; font-weight: 800; font-size: 0.84rem;
cursor: pointer; box-shadow: 0 4px 18px rgba(255,107,157,.4);
font-family: var(--font-ui); transition: all .2s;
}
.paused-resume-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,107,157,.6); }
.paused-resume-btn:active { transform: scale(0.97); }
/* ─── LANDSCAPE OVERLAY: hidden on touch/mobile — orientation is locked programmatically ─── */
@media (pointer: coarse) {
#landscapeOverlay { display: none !important; }
}
/* ─── LANDSCAPE OVERLAY ─── */
#landscapeOverlay {
position: fixed; inset: 0; z-index: 99999;
background: rgba(10,0,24,.97);
backdrop-filter: blur(16px) saturate(1.2);
display: none;
flex-direction: column;
align-items: center; justify-content: center;
gap: 18px; text-align: center; padding: 40px;
}
#landscapeOverlay.visible { display: flex; }
.ls-phone-wrap {
position: relative; width: 76px; height: 120px; margin-bottom: 6px;
}
.ls-phone {
width: 100%; height: 100%;
border: 3px solid rgba(255,107,157,.6);
border-radius: 14px;
background: rgba(255,107,157,.07);
display: flex; align-items: center; justify-content: center;
font-size: 2rem;
animation: lsTilt 2.4s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes lsTilt {
0%, 25% { transform: rotate(0deg); }
60%, 85% { transform: rotate(-90deg); }
100% { transform: rotate(0deg); }
}
.ls-arrow {
position: absolute; top: 50%; right: -26px;
font-size: 1.3rem; color: var(--pink-light);
animation: lsArrow 2.4s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes lsArrow {
0%,25% { opacity: 0; transform: translateY(-50%) translateX(-5px); }
60%,85% { opacity: 1; transform: translateY(-50%) translateX(0); }
100% { opacity: 0; transform: translateY(-50%) translateX(-5px); }
}
.ls-title {
font-size: 1.4rem; font-weight: 900;
background: linear-gradient(135deg, var(--pink), var(--purple));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
background-clip: text;
}
.ls-sub {
font-size: 0.82rem; font-weight: 600;
color: rgba(255,255,255,.52); max-width: 260px; line-height: 1.7;
}
.ls-badge {
display: inline-flex; align-items: center; gap: 6px;
background: rgba(255,107,157,.14); border: 1.5px solid rgba(255,107,157,.3);
color: var(--pink-light); font-size: 0.68rem; font-weight: 800;
padding: 5px 14px; border-radius: 20px; letter-spacing: .05em;
}
</style>
</head>
<body class="camera-page">
<!-- ─── LANDSCAPE ORIENTATION OVERLAY ─── -->
<div id="landscapeOverlay">
<div class="ls-phone-wrap">
<div class="ls-phone"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="width:2.4rem;height:2.4rem;"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg></div>
<div class="ls-arrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="width:1.3rem;height:1.3rem;"><path d="M21.5 2v6h-6"/><path d="M2.5 12a10 10 0 0 1 17-7.1L21.5 8"/></svg></div>
</div>
<div class="ls-title">Rotate for Camera 📸</div>
<p class="ls-sub">Please rotate your phone to landscape for the best framing and photo quality.</p>
<div class="ls-badge"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.5 2v6h-6"/><path d="M2.5 12a10 10 0 0 1 17-7.1L21.5 8"/></svg> Rotate your phone sideways to continue</div>
</div>
<nav class="top-bar">
<a class="top-bar-logo" href="index.html">p-booth</a>
<div class="top-bar-steps">
<div class="step done"><div class="step-num"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="width:.7em;height:.7em;"><polyline points="20 6 9 17 4 12"/></svg></div><span>Layout</span></div>
<div class="divider"></div>
<div class="step active"><div class="step-num">2</div><span>Capture</span></div>
<div class="divider"></div>
<div class="step"><div class="step-num">3</div><span>Download</span></div>
</div>
<div class="top-bar-right">
<a class="top-bar-back" href="index.html">← Change Layout</a>
</div>
</nav>
<main>
<div class="camera-layout">
<!-- LEFT PANEL -->
<div class="camera-left-panel">
<div class="sidebar-panel">
<h3>Selected Layout</h3>
<div class="layout-badge">
<div class="layout-badge-icon" id="layoutBadgeIcon">인생4컷</div>
<div class="layout-badge-info">
<div class="name" id="layoutBadgeName">Classic 4-Cut</div>
<div class="sub" id="layoutBadgeSub">4 shots · 4 × 1 strip</div>
</div>
</div>
</div>
<div class="sidebar-panel">
<h3><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13.5" cy="6.5" r="1"/><circle cx="17.5" cy="10.5" r="1"/><circle cx="8.5" cy="7.5" r="1"/><circle cx="6.5" cy="12.5" r="1"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"/></svg> Customize Strip</h3>
<div class="sidebar-customize">
<div>
<div class="sidebar-field-label">Background</div>
<div class="sidebar-color-grid" id="sidebarColorGrid">
<button class="sidebar-swatch selected" data-color="#ffffff" data-name="White" style="background:#ffffff;" title="White"></button>
<button class="sidebar-swatch" data-color="#ffe0ec" data-name="Blush" style="background:#ffe0ec;" title="Blush"></button>
<button class="sidebar-swatch" data-color="#f0e6ff" data-name="Lavender" style="background:#f0e6ff;" title="Lavender"></button>
<button class="sidebar-swatch" data-color="#d6f5f0" data-name="Mint" style="background:#d6f5f0;" title="Mint"></button>
<button class="sidebar-swatch" data-color="#ffecd9" data-name="Peach" style="background:#ffecd9;" title="Peach"></button>
<button class="sidebar-swatch" data-color="#d4ecff" data-name="Sky" style="background:#d4ecff;" title="Sky"></button>
<button class="sidebar-swatch" data-color="#fff3c2" data-name="Lemon" style="background:#fff3c2;" title="Lemon"></button>
<button class="sidebar-swatch" data-color="#fce4f8" data-name="Lilac" style="background:#fce4f8;" title="Lilac"></button>
<button class="sidebar-swatch" data-color="#1a1a1a" data-name="Black" style="background:#1a1a1a;" title="Black"></button>
<button class="sidebar-swatch" data-color="#1e1b2e" data-name="Night Purple" style="background:#1e1b2e;" title="Night Purple"></button>
<button class="sidebar-swatch" data-color="#0f1f18" data-name="Dark Green" style="background:#0f1f18;" title="Dark Green"></button>
<button class="sidebar-swatch" data-color="#1a0a0a" data-name="Dark Red" style="background:#1a0a0a;" title="Dark Red"></button>
<button class="sidebar-swatch" data-color="#0d1b2a" data-name="Dark Navy" style="background:#0d1b2a;" title="Dark Navy"></button>
<button class="sidebar-swatch" data-color="#2d2016" data-name="Dark Brown" style="background:#2d2016;" title="Dark Brown"></button>
<button class="sidebar-swatch" data-color="#1f1f1f" data-name="Charcoal" style="background:#1f1f1f;" title="Charcoal"></button>
<button class="sidebar-swatch" data-color="#12141c" data-name="Midnight" style="background:#12141c;" title="Midnight"></button>
</div>
<div class="sidebar-color-name" id="sidebarColorName">White</div>
</div>
<hr class="sidebar-divider">
<div>
<div class="sidebar-field-label">Strip Text <span style="font-weight:600;opacity:.55;">(optional)</span></div>
<input type="text" id="sidebarTextInput" class="sidebar-input" placeholder="e.g. BFFs 4ever ♡" maxlength="40">
<div class="sidebar-quick-btns">
<button class="sidebar-quick-btn" onclick="setSidebarText('best friends ♡')">best friends ♡</button>
<button class="sidebar-quick-btn" onclick="setSidebarText('memories 🌸')">memories 🌸</button>
<button class="sidebar-quick-btn" onclick="setSidebarText('인생네컷 ✦')">인생네컷 ✦</button>
</div>
</div>
<div>
<div class="sidebar-field-label">Date</div>
<input type="date" id="sidebarDateInput" class="sidebar-date-input">
</div>
</div>
</div>
<div class="sidebar-panel" style="background:transparent;border-style:dashed;border-color:rgba(255,107,157,.15);flex-shrink:0;">
<h3>Posing Tips</h3>
<ul style="list-style:none;display:flex;flex-direction:column;gap:7px;margin:0;padding:0;">
<li style="display:flex;gap:6px;font-size:.67rem;color:var(--text-muted);font-weight:600;line-height:1.4;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color:var(--pink);flex-shrink:0;width:.9rem;height:.9rem;"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg> Face the camera, eyes on the lens</li>
<li style="display:flex;gap:6px;font-size:.67rem;color:var(--text-muted);font-weight:600;line-height:1.4;"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none" style="color:var(--pink);flex-shrink:0;width:.9rem;height:.9rem;"><path d="M12 2l1.5 5H18l-4 3 1.5 5L12 12l-3.5 3L10 10l-4-3h4.5z"/><circle cx="19" cy="4" r="1.5"/><circle cx="5" cy="19" r="1.5"/></svg> Different pose every shot</li>
<li style="display:flex;gap:6px;font-size:.67rem;color:var(--text-muted);font-weight:600;line-height:1.4;"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none" style="color:var(--pink);flex-shrink:0;width:.9rem;height:.9rem;"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Good lighting = great strip!</li>
</ul>
</div>
</div>
<!-- CENTER -->
<div class="camera-main fade-in">
<!-- MODE TOGGLE — lives inside center column so panels use full height -->
<div class="mode-toggle-wrap" id="modeToggleWrap">
<div class="mode-toggle" id="modeToggle">
<button class="mode-btn active" id="modeCameraBtn" onclick="switchMode('camera')">Camera</button>
<button class="mode-btn" id="modeUploadBtn" onclick="switchMode('upload')">Upload Photos</button>
</div>
<button class="btn btn-secondary mobile-only-btn mobile-customize-btn" id="mobileCustomizeBtn" onclick="openMobileCustomize()" title="Customize strip" style="flex-shrink:0;padding:6px 10px;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="width:1.1rem;height:1.1rem;"><circle cx="13.5" cy="6.5" r="1"/><circle cx="17.5" cy="10.5" r="1"/><circle cx="8.5" cy="7.5" r="1"/><circle cx="6.5" cy="12.5" r="1"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"/></svg></button>
<button class="btn btn-secondary mobile-only-btn mobile-preview-btn" id="mobilePreviewBtn" onclick="openMobilePreview()" title="Strip preview" style="flex-shrink:0;padding:6px 10px;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="width:1.1rem;height:1.1rem;"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg></button>
</div>
<!-- CAMERA MODE -->
<div id="cameraModeView">
<!-- MOBILE-ONLY: Clean start card (camera preview hidden on mobile) -->
<div class="mobile-start-card" id="mobileStartCard">
<div class="msc-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
</div>
<h3>Ready to Shoot!</h3>
<p id="mobileReadyDesc">Strike your best poses — the camera opens fullscreen.</p>
<div class="pose-badge" id="mobilePoseBadge">
<svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none" style="width:.8rem;height:.8rem;"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
<span id="mobilePoseBadgeText">4 shots · 인생4컷</span>
</div>
</div>
<div class="camera-viewfinder" id="cameraArea">
<video id="video" autoplay playsinline muted></video>
<canvas id="snapshot"></canvas>
<div class="vf-corner tl"></div><div class="vf-corner tr"></div>
<div class="vf-corner bl"></div><div class="vf-corner br"></div>
<div class="countdown-overlay" id="countdownOverlay">
<div class="countdown-number" id="countdownNumber">3</div>
<div class="countdown-label" id="countdownLabel">Smile!</div>
</div>
<div class="captured-state" id="capturedState">
<div class="captured-check-ring"><div class="captured-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" style="width:1.4rem;height:1.4rem;"><polyline points="20 6 9 17 4 12"/></svg></div></div>
<div class="captured-label" id="capturedLabel">Shot 1 captured!</div>
<div class="captured-sublabel" id="capturedSublabel">Get ready for the next one…</div>
</div>
<div class="flash-overlay" id="flashOverlay"></div>
<!-- PAUSED STATE OVERLAY -->
<div id="pausedOverlay">
<div class="paused-icon"><svg viewBox="0 0 24 24" fill="currentColor" stroke="none" style="width:3rem;height:3rem;display:block;margin:auto;"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg></div>
<div class="paused-title">Session Paused</div>
<div class="paused-sub">Take your time — press Resume when ready</div>
<button class="paused-resume-btn" onclick="togglePause()"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="5 3 19 12 5 21 5 3"/></svg> Resume Session</button>
</div>
<div class="ready-state" id="readyState" style="position:absolute;inset:0;background:rgba(10,0,20,.82);backdrop-filter:blur(4px);z-index:5;">
<div class="big-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="width:3.5rem;height:3.5rem;display:block;margin:0 auto 8px;color:var(--pink);"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg></div>
<h2>Ready to Shoot!</h2>
<p id="readyDesc">Press Start to begin your session.</p>
<div class="pose-count-badge" id="poseBadge">4 shots · 인생4컷</div>
</div>
<div class="permission-error" id="permissionError">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="width:3rem;height:3rem;display:block;margin:0 auto 8px;"><circle cx="12" cy="12" r="10"/><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"/></svg></div>
<h3>Camera Blocked</h3>
<p>Please allow camera access in your browser settings, then reload the page.</p>
<button class="btn btn-secondary" onclick="window.location.reload()">Reload</button>
</div>
</div>
<div class="shot-progress">
<div class="shot-bar-track"><div class="shot-bar-fill" id="shotBarFill"></div></div>
<div class="shot-labels">
<span class="shot-label-current" id="shotLabelCurrent">Ready to start</span>
<span class="shot-label-total" id="shotLabelTotal">of —</span>
</div>
</div>
<div class="status-msg" id="statusMsg">Press Start Session to begin</div>
<div class="mobile-thumbs" id="mobileThumbs"></div>
<div class="camera-controls">
<button class="btn btn-primary btn-lg" id="startBtn" style="flex:1;"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="5 3 19 12 5 21 5 3"/></svg> Start Session</button>
<button class="btn btn-pause btn-lg" id="pauseBtn" onclick="togglePause()" style="display:none;"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg> Pause</button>
<a href="index.html" class="btn btn-secondary btn-lg" style="padding:14px 18px;flex-shrink:0;" data-tooltip="Change layout"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg></a>
</div>
</div>
<!-- UPLOAD MODE -->
<div id="uploadModeView" style="display:none;">
<div class="upload-mode-container">
<div class="upload-header">
<div class="upload-header-icon ico-badge"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg></div>
<div class="upload-header-text">
<h3 id="uploadTitle">Upload Your Photos</h3>
<p id="uploadSubtitle">Select photos from your device</p>
</div>
<button class="btn btn-secondary upload-bulk-btn" onclick="triggerBulkUpload()" style="flex-shrink:0;white-space:nowrap;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="width:0.75rem;height:0.75rem;"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg> Select All Photos at Once</button>
<input type="file" id="bulkFileInput" accept="image/*" multiple style="display:none;" onchange="handleBulkUpload(event)">
</div>
<div class="upload-progress-wrap" id="uploadProgressWrap" style="display:none;">
<div class="upload-progress-bar"><div class="upload-progress-fill" id="uploadProgressFill"></div></div>
<p class="upload-progress-label" id="uploadProgressLabel">0 of 0 photos selected</p>
</div>
<div class="upload-slots-grid" id="uploadSlotsGrid"></div>
<p class="upload-slot-reorder-hint" id="reorderHint">⟺ Drag to rearrange · Long-press or use the ⠿ handle on mobile</p>
<button class="btn btn-primary btn-lg desktop-hidden" id="uploadContinueBtn" disabled onclick="continueFromUpload()" style="margin-top:8px;width:100%;opacity:.5;flex-shrink:0;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg> Generate Strip</button>
</div>
</div>
<!-- REARRANGE MODE -->
<div id="rearrangeView" style="display:none;">
<div class="rearrange-container">
<div class="rearrange-header-row">
<div class="rearrange-header-icon ico-badge"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="2"/><line x1="7" y1="2" x2="7" y2="22"/><line x1="17" y1="2" x2="17" y2="22"/><line x1="2" y1="12" x2="22" y2="12"/><line x1="2" y1="7" x2="7" y2="7"/><line x1="2" y1="17" x2="7" y2="17"/><line x1="17" y1="17" x2="22" y2="17"/><line x1="17" y1="7" x2="22" y2="7"/></svg></div>
<div>
<h3 id="rearrangeTitle">Review & Rearrange</h3>
<p id="rearrangeSubtitle">Drag photos to reorder your strip</p>
</div>
</div>
<div class="rearrange-grid" id="rearrangeGrid"></div>
<p class="rearrange-drag-hint" id="rearrangeTapHint">⟺ Drag to reorder · Use the ⠿ handle to drag</p>
<div class="rearrange-actions desktop-hidden">
<button class="btn btn-secondary" onclick="retakeFromRearrange()"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 .49-3.51"/></svg> Retake All</button>
<button class="btn btn-primary btn-lg" id="buildStripBtn" onclick="buildStrip()"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg> Build Strip</button>
</div>
</div>
</div>
</div>
<!-- RIGHT PANEL — visible on desktop only; hidden canvas kept for JS -->
<div class="camera-right-panel">
<div class="sidebar-panel" id="panelPreview" style="flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;">
<h3>Strip Preview <span id="previewShotCount" style="font-size:.6rem;font-weight:600;color:var(--text-light);"></span></h3>
<div class="live-preview-wrap" id="livePreviewWrap" style="flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;">
<canvas id="liveStripCanvas" style="max-width:100%;max-height:100%;width:auto;height:auto;display:none;"></canvas>
<div class="live-preview-placeholder" id="livePreviewPlaceholder"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="width:2.5rem;height:2.5rem;opacity:.4;"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg><p>Preview appears here</p></div>
</div>
<!-- Desktop: Generate Strip button (upload view) -->
<div id="desktopGenerateWrap">
<button class="btn btn-primary btn-lg" id="desktopGenerateBtn" disabled onclick="continueFromUpload()" style="width:100%;opacity:.5;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg> Generate Strip</button>
</div>
<!-- Desktop: Retake + Build Strip buttons (rearrange view) -->
<div id="desktopRearrangeActionsWrap">
<button class="btn btn-primary btn-lg" id="desktopBuildStripBtn" onclick="buildStrip()" style="width:100%;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg> Build Strip</button>
<button class="btn btn-secondary" onclick="retakeFromRearrange()" style="width:100%;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 .49-3.51"/></svg> Retake All</button>
</div>
</div>
</div>
</div>
<!-- ── MOBILE STRIP PREVIEW MODAL ── -->
<div id="mobilePreviewModal" style="display:none;position:fixed;inset:0;z-index:10001;background:rgba(10,0,24,.88);backdrop-filter:blur(8px);align-items:center;justify-content:center;flex-direction:column;gap:16px;" onclick="closeMobilePreview(event)">
<div style="position:relative;max-width:90vw;max-height:80vh;display:flex;align-items:center;justify-content:center;">
<canvas id="mobilePreviewCanvas" style="max-width:90vw;max-height:72vh;border-radius:10px;box-shadow:0 8px 40px rgba(0,0,0,.5);"></canvas>
<div id="mobilePreviewPlaceholder" style="color:rgba(255,255,255,.5);font-size:.9rem;font-weight:700;text-align:center;padding:40px;"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="width:2.5rem;height:2.5rem;display:block;margin:0 auto 12px;opacity:.5;"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>No photos yet</div>
</div>
<button onclick="closeMobilePreview()" style="padding:10px 28px;border-radius:50px;background:rgba(255,107,157,.9);color:#fff;border:none;font-weight:800;font-size:.85rem;cursor:pointer;font-family:inherit;"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg> Close</button>
</div>
</main>
<!-- ═══════════════════════════════════════════════════════════
MOBILE CUSTOMIZE BOTTOM SHEET
═══════════════════════════════════════════════════════════ -->
<div id="mobileCustomizeSheet" class="mobile-sheet-overlay" onclick="closeMobileCustomize(event)">
<div class="mobile-sheet">
<div class="mobile-sheet-handle"></div>
<div class="mobile-sheet-header">
<span class="mobile-sheet-title"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13.5" cy="6.5" r="1"/><circle cx="17.5" cy="10.5" r="1"/><circle cx="8.5" cy="7.5" r="1"/><circle cx="6.5" cy="12.5" r="1"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"/></svg> Customize Strip</span>
<button class="mobile-sheet-close" onclick="closeMobileCustomize()"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>
</div>
<div class="mobile-sheet-body">
<div class="ms-section">
<div class="ms-label">Background Color</div>
<div class="ms-color-grid" id="msColorGrid">
<button class="ms-swatch selected" data-color="#ffffff" data-name="White" style="background:#ffffff;" title="White"></button>
<button class="ms-swatch" data-color="#ffe0ec" data-name="Blush" style="background:#ffe0ec;" title="Blush"></button>
<button class="ms-swatch" data-color="#f0e6ff" data-name="Lavender" style="background:#f0e6ff;" title="Lavender"></button>
<button class="ms-swatch" data-color="#d6f5f0" data-name="Mint" style="background:#d6f5f0;" title="Mint"></button>
<button class="ms-swatch" data-color="#ffecd9" data-name="Peach" style="background:#ffecd9;" title="Peach"></button>
<button class="ms-swatch" data-color="#d4ecff" data-name="Sky" style="background:#d4ecff;" title="Sky"></button>
<button class="ms-swatch" data-color="#fff3c2" data-name="Lemon" style="background:#fff3c2;" title="Lemon"></button>
<button class="ms-swatch" data-color="#fce4f8" data-name="Lilac" style="background:#fce4f8;" title="Lilac"></button>
<button class="ms-swatch" data-color="#1a1a1a" data-name="Black" style="background:#1a1a1a;" title="Black"></button>
<button class="ms-swatch" data-color="#1e1b2e" data-name="Night Purple" style="background:#1e1b2e;" title="Night Purple"></button>
<button class="ms-swatch" data-color="#0f1f18" data-name="Dark Green" style="background:#0f1f18;" title="Dark Green"></button>
<button class="ms-swatch" data-color="#1a0a0a" data-name="Dark Red" style="background:#1a0a0a;" title="Dark Red"></button>
<button class="ms-swatch" data-color="#0d1b2a" data-name="Dark Navy" style="background:#0d1b2a;" title="Dark Navy"></button>
<button class="ms-swatch" data-color="#2d2016" data-name="Dark Brown" style="background:#2d2016;" title="Dark Brown"></button>
<button class="ms-swatch" data-color="#1f1f1f" data-name="Charcoal" style="background:#1f1f1f;" title="Charcoal"></button>
<button class="ms-swatch" data-color="#12141c" data-name="Midnight" style="background:#12141c;" title="Midnight"></button>
</div>
<div class="ms-color-name" id="msColorName">White</div>
</div>
<div class="ms-divider"></div>
<div class="ms-section">
<div class="ms-label">Strip Text <span style="font-weight:600;opacity:.5;">(optional)</span></div>
<input type="text" id="msTextInput" class="ms-input" placeholder="e.g. BFFs 4ever ♡" maxlength="40">
<div class="ms-quick-btns">
<button class="ms-quick-btn" onclick="setMsText('best friends ♡')">best friends ♡</button>
<button class="ms-quick-btn" onclick="setMsText('memories 🌸')">memories 🌸</button>
<button class="ms-quick-btn" onclick="setMsText('인생네컷 ✦')">인생네컷 ✦</button>
</div>
</div>
<div class="ms-divider"></div>
<div class="ms-section">
<div class="ms-label">Date</div>
<input type="date" id="msDateInput" class="ms-input">
</div>
<button class="btn btn-primary" style="width:100%;margin-top:4px;" onclick="closeMobileCustomize()"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg> Done</button>
</div>
</div>
</div>
<!-- ═══════════════════════════════════════════════════════════════
FULLSCREEN CAMERA OVERLAY — sits above entire UI
═══════════════════════════════════════════════════════════════ -->
<div id="fullscreenCameraOverlay">
<!-- Viewport: sized to exact strip photo ratio (1 : 0.6452 landscape) -->
<div id="fscViewport">
<video id="fscVideo" autoplay playsinline muted></video>
<canvas id="fscCaptureCanvas"></canvas>
</div>
<!-- TOP CONTROLS -->
<div class="fsc-top">
<button class="fsc-icon-btn" id="fscCloseBtn" aria-label="Cancel session">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
</svg>
</button>
<div class="fsc-shot-counter">
<div class="fsc-shot-dots" id="fscShotDots"></div>
<span class="fsc-shot-label" id="fscShotLabel"></span>
</div>
<button class="fsc-icon-btn" id="fscFlipBtn" aria-label="Flip camera">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<path d="M1 4v6h6"/><path d="M23 20v-6h-6"/>
<path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4-4.64 4.36A9 9 0 0 1 3.51 15"/>
</svg>
</button>
</div>
<!-- COUNTDOWN OVERLAY -->
<div class="fsc-countdown" id="fscCountdown">
<div class="fsc-countdown-number" id="fscCountdownNumber">3</div>
<div class="fsc-countdown-sublabel" id="fscCountdownSublabel"></div>
</div>
<!-- WHITE FLASH -->
<div class="fsc-flash" id="fscFlash"></div>
<!-- CAPTURED FEEDBACK -->
<div class="fsc-captured-feedback" id="fscCapturedFeedback">
<div class="fsc-captured-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" style="width:1.6rem;height:1.6rem;"><polyline points="20 6 9 17 4 12"/></svg></div>
<div class="fsc-captured-text" id="fscCapturedText">Shot 1 captured!</div>
<div class="fsc-captured-sub" id="fscCapturedSub">Get ready for the next one…</div>
</div>
<!-- BOTTOM CONTROLS -->
<div class="fsc-bottom">
<!-- Left: thumbnails of captured shots -->
<div class="fsc-bottom-side">
<div class="fsc-thumb-strip" id="fscThumbStrip"></div>
</div>
<!-- Center: mode toggle + shutter + indicator -->
<div class="fsc-shutter-wrap">
<!-- Mode toggle above shutter -->
<div class="fsc-mode-toggle">
<button class="fsc-mode-btn" id="fscModeManual"><svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 11V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg> Manual</button>
<button class="fsc-mode-btn fsc-mode-active" id="fscModeAuto"><svg class="ico" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg> Auto</button>
</div>
<button class="fsc-shutter" id="fscShutterBtn" aria-label="Take photo">
<div class="fsc-shutter-ring">
<div class="fsc-shutter-inner"></div>
</div>
</button>
<!-- Progress + mode indicator below shutter -->
<div class="fsc-shutter-meta">
<div class="fsc-progress-label" id="fscProgressLabel"></div>
<div class="fsc-mode-indicator" id="fscModeIndicator">Auto Mode — tap once to capture all</div>
</div>
</div>
<!-- Right: empty placeholder for balance -->
<div class="fsc-bottom-side"></div>
</div>
</div>
<!-- END FULLSCREEN CAMERA OVERLAY -->
<script src="js/orientation-lock.js"></script>
<script src="js/icons.js"></script>
<script src="js/canvas.js"></script>
<script src="js/camera.js"></script>
<script src="js/install-banner.js"></script>
<script>
// ── Portrait lock: re-apply after any orientation change that might have slipped through ──
(function() {
function reapplyPortraitIfNeeded() {
// Only re-lock portrait when the FSC camera is NOT active
if (!document.body.classList.contains('fsc-camera-active')) {
if (typeof window.lockPortrait === 'function') window.lockPortrait();
}
}
window.addEventListener('orientationchange', () => setTimeout(reapplyPortraitIfNeeded, 350));
if (screen.orientation) {
screen.orientation.addEventListener('change', () => setTimeout(reapplyPortraitIfNeeded, 350));
}
// Legacy no-op guard (in case any old HTML still calls this)
window.dismissCameraLandscapeOverlay = function() {};
})();
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./sw.js').catch(() => {});
});
}
</script>
</body>
</html>