.works-main { position: relative; z-index: 10; max-width: 1200px; margin: auto; padding: 172px 24px 80px; }
.works-intro { margin-bottom: 48px; }
.works-eyebrow { color: #67e8f9; font-size: 11px; font-weight: 600; letter-spacing: .18em; margin-bottom: 18px; }
.works-intro h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.15; font-weight: 700; letter-spacing: -.04em; margin-bottom: 16px; }
.works-intro > p:last-child { color: #9ca3af; font-size: 16px; }
.project-showcase { display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid #ffffff19; border-radius: 24px; overflow: hidden; background: #0b071c; }
.project-visual { position: relative; min-width: 0; padding: 24px; background: radial-gradient(ellipse at 50% 40%, #183f5059, transparent 65%), linear-gradient(140deg, #11162e, #0a091d 75%); border-right: 1px solid #ffffff12; }
.visual-topline { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: .1em; color: #a5b4c9; }
.live-dot { width: 6px; height: 6px; background: #5eead4; border-radius: 50%; box-shadow: 0 0 10px #5eead480; }
.visual-index { margin-left: auto; color: #7f8ba2; }
.phone-stage { height: 670px; position: relative; perspective: 1100px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; cursor: grab; touch-action: pan-y; isolation: isolate; }
.phone-stage:active { cursor: grabbing; }
.phone-stage.is-interactive { cursor: default; }
.stage-orbit { position: absolute; width: 96%; height: 42%; border: 1px solid #ffffff09; border-radius: 50%; transform: rotate(-30deg); z-index: -1; }
.phone-shadow { position: absolute; width: 230px; height: 32px; bottom: 7px; background: #0009; filter: blur(18px); border-radius: 50%; }
.phone-model { --frame-color: #515967; --rotate-y: -28deg; --rotate-x: 8deg; --phone-scale: 1; width: 310px; height: 638px; position: relative; transform-style: preserve-3d; transform: scale(var(--phone-scale)) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)); transition: transform .18s ease-out; }
.phone-stage.is-dragging .phone-model { transition: none; }
.phone-screen { position: relative; width: 100%; height: 100%; border: 3px solid #05060a; border-radius: 40px; overflow: hidden; background: #f2f6fd; }
.phone-screen iframe { position: absolute; top: 0; left: 0; width: 390px; height: 830px; max-width: none; border: 0; transform: scale(.74358974); transform-origin: 0 0; pointer-events: none; background: #f2f6fd; }
.is-interactive iframe { pointer-events: auto; }
.phone-island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); height: 22px; width: 88px; border-radius: 20px; background: #05060a; pointer-events: none; }
.phone-island span { position: absolute; right: 8px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #37557c, #101523); }
.phone-home-bar { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 100px; height: 4px; border-radius: 5px; background: #1e293b; opacity: .75; pointer-events: none; }



.preview-controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.rotation-control { display: flex; align-items: center; gap: 10px; }
.rotation-control label { font-size: 11px; color: #b4bdcd; }
.rotation-control input { width: 80px; accent-color: #67e8f9; cursor: pointer; }
.rotation-control button { min-width: 44px; min-height: 44px; color: #cbd5e1; border-radius: 8px; }
.preview-mode { display: flex; gap: 8px; align-items: center; border: 1px solid #ffffff25; border-radius: 8px; padding: 10px 12px; min-height: 44px; font-size: 11px; color: #cbd5e1; background: #ffffff05; }
.preview-mode:hover, .rotation-control button:hover { background: #ffffff10; }
.preview-mode[aria-pressed="true"] { color: #67e8f9; border-color: #67e8f980; }
.preview-note { text-align: center; color: #94a3b8; font-size: 11px; margin-top: 16px; line-height: 1.7; }
.preview-fallback { text-align: center; color: #7f8ba2; font-size: 10px; margin-top: 6px; line-height: 1.7; }
.project-details { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.project-category { display: flex; gap: 12px; align-items: center; color: #67e8f9; font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.version-tag { color: #b7a7f8; padding: 4px 8px; border: 1px solid #a78bfa30; background: #a78bfa0c; border-radius: 5px; }
.project-details h2 { font-size: clamp(36px, 4vw, 52px); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; margin-top: 24px; }
.project-details h2 > span { display: block; font-size: 19px; color: #7f8ba2; margin-top: 8px; font-weight: 400; letter-spacing: .08em; }
.project-subtitle { font-size: 20px; line-height: 1.55; color: #e2e8f0; margin-top: 24px; }
.project-description { font-size: 14px; line-height: 1.9; color: #9da8bc; margin-top: 18px; }
.project-facts { display: grid; gap: 16px; border-top: 1px solid #ffffff12; border-bottom: 1px solid #ffffff12; margin: 28px 0; padding: 24px 0; }
.project-facts > div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.project-facts dt { font-size: 9px; color: #7f8ba2; font-weight: 600; letter-spacing: .08em; padding-top: 2px; }
.project-facts dd { font-size: 12px; color: #d5dbea; overflow-wrap: anywhere; }
.project-features { display: grid; gap: 14px; margin-bottom: 32px; }
.project-features li { display: flex; gap: 12px; align-items: baseline; font-size: 12px; color: #b8c1d3; line-height: 1.8; }
.project-features i { width: 16px; flex-shrink: 0; color: #67e8f9; }
.project-launch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: 9px; background: #67e8f9; color: #062d3a; font-size: 13px; font-weight: 700; transition: background .2s; }
.project-launch:hover { background: #a5f3fc; }
.project-url { color: #a5b4c9; font-size: 12px; margin-top: 16px; }
.project-url:hover { color: #67e8f9; }
.project-credit { color: #7f8ba2; font-size: 10px; margin-top: 30px; }
.works-contact { margin-top: 56px; padding-top: 32px; border-top: 1px solid #ffffff12; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.works-contact p { color: #94a3b8; font-size: 14px; }
.works-contact a { color: #e2e8f0; font-size: 16px; }
@media (max-width: 900px) {
  .project-showcase { grid-template-columns: 1fr; }
  .project-visual { border-right: 0; border-bottom: 1px solid #ffffff12; }
  .project-details { padding: 32px; }
}
@media (max-width: 420px) {
  .works-main { padding: 156px 16px 48px; }
  .works-intro { margin-bottom: 32px; }
  .project-visual { padding: 20px 12px; }
  .phone-model { --phone-scale: .82; }
  .phone-stage { height: 550px; }
  .phone-shadow { bottom: 0; }
  .visual-topline { font-size: 8px; }
  .project-details { padding: 28px 20px; }
  .works-contact { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .phone-model { transition: none; } }
.feature-film { position:absolute; inset:0; overflow:hidden; background:linear-gradient(155deg,#ecf9ff,#f6f8ff 60%,#dceaf9); color:#142b49; padding:0 20px; font-family:system-ui,sans-serif; }
.status-line { height:43px; display:flex; align-items:center; justify-content:space-between; font-size:10px; font-weight:700; }
.feature-film header { margin:24px 0 36px; font-size:25px; font-weight:800; }
.feature-film small { font-size:11px; color:#57708b; }
.film-slide { min-height:330px; border-radius:24px; padding:25px 20px; background:white; box-shadow:0 14px 34px #203b6017; animation:scene-in .65s ease-out; }
.film-slide i { font-size:28px; color:#007096; }
.film-slide h3 { font-size:23px; line-height:1.3; margin:18px 0; font-weight:700; }
.road-art,.lesson-art,.film-options { border-radius:15px; padding:20px; background:#def0f5; color:#133857; }
.road-art { background:linear-gradient(65deg,#85be9e 34%,#37495c 35% 47%,#fff 48% 49%,#37495c 50% 63%,#85be9e 64%); text-align:center; padding:48px 0; font-size:30px; }
.lesson-art { background:linear-gradient(140deg,#10435b,#40839b); color:white; text-align:center; padding:42px; font-size:30px; }
.film-options { line-height:2; font-weight:600; }
#film-play { position:absolute; bottom:24px; right:16px; height:44px; width:44px; border-radius:50%; color:white; background:#16344c; }

@keyframes scene-in { from { opacity:.2; transform:translateY(14px); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce){.film-slide {animation:none}}

.phone-front, .phone-back, .phone-rim {
  position: absolute;
  inset: 0;
  border-radius: 48px;
  backface-visibility: hidden;
}
.phone-front {
  padding: 7px;
  background: var(--frame-color);
  border: 1px solid #ffffff40;
  transform: translateZ(15px);
}
.phone-back {
  background: var(--frame-color);
  border: 1px solid #ffffff24;
  transform: rotateY(180deg) translateZ(15px);
}
/* Capture rotation gestures above every screen layer. */
.phone-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  touch-action: pan-y;
}
.phone-stage.is-interactive::after { display: none; }
.phone-stage:not(.is-interactive) .phone-screen { pointer-events: none; }
.phone-stage { user-select: none; -webkit-user-select: none; }
.phone-stage.is-interactive { user-select: auto; }
.phone-stage.is-interactive .phone-model { transition: none; }
.phone-front { overflow: hidden; }
.phone-screen { isolation: isolate; }
.phone-front, .phone-back { -webkit-backface-visibility: hidden; }
#film-play { position: static; flex-shrink: 0; }
.feature-film[hidden], .film-slide[hidden] { display: none !important; }

/* Closely spaced rounded layers keep the rim continuous through the corners. */
.phone-rim {
  background: linear-gradient(150deg, #ffffff45, transparent 35%, #0005), var(--frame-color);
  transform: translateZ(var(--depth));
  pointer-events: none;
}

.phone-button-stack {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
}
.phone-button-stack-left { left: -17px; transform: rotateY(-90deg); }
.phone-button-stack-right { right: -17px; transform: rotateY(90deg); }
.phone-button {
  position: absolute;
  left: 7px;
  right: 7px;
  border-radius: 5px;
  background: var(--frame-color);
  border: 1px solid #ffffff48;
  box-shadow: inset 0 1px 2px #ffffff35, 0 0 0 1px #151a22, 0 2px 3px #0007;
}
.phone-action { top: 16%; height: 4%; }
.phone-volume-up { top: 23%; height: 7%; }
.phone-volume-down { top: 32%; height: 7%; }
.phone-power { top: 25%; height: 10%; }
.phone-camera { top: 64%; height: 8%; box-shadow: inset 0 1px 4px #0009, 0 0 0 1px #151a22; }
