/* Phones (html.is-phone, decided in the head): a start page (the welcome screen in one column), the game (game.css portrait rules)
   and the app tour. The tour layout below holds only while the game is in its story (.game.epilogue).
   First screen: logo, Ponçik's row (bubble left, Ponçik right), the big phone, then the page scrolls
   on to the download section. Nothing is pinned, nothing shrinks. */
picture{display:contents} /* the <picture> wrappers only swap the source on phones; layout stays on the <img> */
.phone-logo,.foot-note{display:none}

/* ---- the start page: the welcome screen in one column ---- */
html:not(.is-phone) .w-phone{display:none}
/* the start page never scrolls (Emre, 25 Kas): it is exactly one screen; mode.js sets --pz so the column fits, measured with .pz-measure (natural height) */
html.is-phone #welcome.pz-measure{height:auto}
html.is-phone:has(#welcome:not([hidden])),html.is-phone:has(#welcome:not([hidden])) body{overflow:hidden;overscroll-behavior:none}
/* the same words as on a computer (Emre, 25 Kas): the two short lines under the title, the slogan with its i! under the choices */
html.is-phone .w-pitch,html.is-phone .welcome-bottom,html.is-phone .welcome-header>span{display:none}
html.is-phone .welcome-content>p.w-desk{font-size:17px;line-height:1.45;margin:0 0 20px;color:#ece3f8}
html.is-phone .welcome .welcome-foot{display:flex;margin-top:16px;font-size:clamp(13px,3.7vw,15px);white-space:nowrap}
html.is-phone #welcome{height:calc(100svh / var(--pz,1));min-height:0;zoom:var(--pz,1);overflow:hidden;overscroll-behavior:none;display:flex;flex-direction:column;gap:0;padding:max(18px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:radial-gradient(ellipse 90% 45% at 85% 12%,#7a5fc066,transparent 70%),linear-gradient(180deg,#4c3480 0,#3f2870 100%)}
/* the same room picture and the same logo as on a computer (Emre, 25 Kas: web ve mobil farklı olmamalı); the veil keeps the words readable over it */
html.is-phone .welcome-art.ready{opacity:.84}
html.is-phone .welcome-shade{background:linear-gradient(180deg,rgba(64,39,107,.12) 0%,rgba(58,34,102,.5) 30%,rgba(53,31,96,.62) 70%,rgba(48,28,81,.8) 100%)}
html.is-phone .welcome-header{position:relative;inset:auto;order:1;display:flex;align-items:center;justify-content:space-between}
html.is-phone .welcome-header .logo img{height:36px}
/* Ponçik and his bubble, top right, beside the logo row and the first lines */
html.is-phone .welcome-poncik{position:relative;order:2;right:auto;bottom:auto;align-self:flex-end;width:min(36vw,150px);max-width:none;margin:-44px 4px 0 0;transform:rotate(4deg);z-index:0}
html.is-phone .welcome-bubble{top:auto;bottom:8%;right:86%;width:max-content;max-width:min(52vw,210px);padding:10px 14px;font-size:14px;line-height:1.3;border-radius:18px 18px 5px 18px}
html.is-phone .welcome-content{order:3;position:relative;top:auto;transform:none;margin:0;width:auto;z-index:2}
html.is-phone .welcome .hello-note{font-size:13px}
html.is-phone .welcome h1{font-size:clamp(34px,10.6vw,46px);line-height:1.04;margin:10px 0 12px;letter-spacing:-.035em}
html.is-phone .welcome-content>p.w-pitch{font-size:16px;line-height:1.5;margin:0 0 20px;color:#ece3f8;max-width:34rem}
html.is-phone .welcome .choices{gap:10px;max-width:30rem}
html.is-phone .welcome .choice{padding:15px 16px;border-radius:16px;gap:12px}
html.is-phone .welcome .choice strong{font-size:19px}
html.is-phone .welcome .choice small{font-size:12px}
html.is-phone .welcome .choice-icon{font-size:22px;width:24px;text-align:center}
html.is-phone .welcome .choice-arrow{font-size:22px}
/* "Maceraya başla" is the yellow first choice, as on a computer; "Uygulamayı dene" keeps the computer's quieter look */
html.is-phone .welcome .introduction{margin-top:0}
html.is-phone .welcome .film{background:#e6dcf113;border-color:#e6dcf159;color:#f7f2ff}
html.is-phone .w-stores{margin-top:18px}
html.is-phone .w-stores .store-row{display:flex;flex-wrap:wrap;gap:10px}
html.is-phone .w-stores .store-btn{height:48px;box-shadow:0 6px 18px #1d0f3a55,inset 0 0 0 1.5px #a6a6a6}
html.is-phone .w-note{margin:10px 0 0;font-size:13px;font-weight:700;color:#d4c1eb}
html.is-phone .w-legal{position:relative;order:4;left:auto;bottom:auto;margin-top:auto;padding-top:22px;gap:2px 18px;font-size:14px}
html.is-phone .w-legal .w-sosyal{margin-right:0}
html.is-phone .w-legal>span:last-child{width:100%;font-size:13px}
/* upright and wider than a phone (small tablets): the same column, larger, held in the middle of the screen */
@media(min-width:600px) and (orientation:portrait){
  html.is-phone #welcome{padding:32px max(48px,env(safe-area-inset-right)) 24px max(48px,env(safe-area-inset-left))}
  html.is-phone .welcome-header .logo img{height:44px}
  html.is-phone .welcome-poncik{width:220px;margin:auto 24px -6px 0}
  html.is-phone .welcome-bubble{font-size:16px;max-width:240px}
  html.is-phone .welcome .hello-note{font-size:15px}
  html.is-phone .welcome h1{font-size:64px;margin:14px 0 16px}
  html.is-phone .welcome-content>p.w-pitch{font-size:19px;max-width:36rem;margin-bottom:26px}
  html.is-phone .welcome .choices{max-width:520px;gap:12px}
  html.is-phone .welcome .choice{padding:19px 22px}
  html.is-phone .welcome .choice strong{font-size:21px}
  html.is-phone .welcome .choice small{font-size:13px}
  html.is-phone .w-stores .store-btn{height:54px}
  html.is-phone .w-legal{margin-top:auto;padding-top:40px;font-size:15px}
}
/* sideways: words and actions on the left, Ponçik on the right; the page scrolls */
@media(orientation:landscape){
  html.is-phone #welcome{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,32%);grid-template-rows:auto auto 1fr auto;column-gap:24px;align-items:start}
  html.is-phone .welcome-header{grid-column:1 / -1;grid-row:1}
  html.is-phone .welcome-content{grid-column:1;grid-row:2}
  html.is-phone .welcome h1{font-size:clamp(28px,4.6vw,44px);margin:6px 0 8px}
  html.is-phone .welcome-content>p.w-pitch{margin-bottom:12px;font-size:15px;line-height:1.45}
  html.is-phone .welcome-content{margin-top:6px}
  html.is-phone .welcome .choice{padding:12px 14px}
  html.is-phone .welcome .choices{max-width:400px;gap:8px}
  html.is-phone .welcome-poncik{grid-column:2;grid-row:2 / span 2;align-self:center;justify-self:center;width:min(100%,220px);margin:40px 0 0}
  html.is-phone .welcome-bubble{bottom:auto;top:-18%;right:30%}
  html.is-phone .w-legal{grid-column:1 / -1;grid-row:4}
}
html.is-phone .story-nav,html.is-phone .story-band{display:none!important}

/* ---- first screen: the phone as large as the screen allows (layout B) ---- */
html.is-phone .game.story{
  --u-h:min(calc(100svh - 204px),calc((100vw - 32px) * 2));
  --u-w:calc(var(--u-h) * .5);
}
html.is-phone .game.epilogue:not(.perde-run){height:auto;min-height:100svh;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:4px;padding:max(14px,env(safe-area-inset-top)) 10px 20px;background:linear-gradient(180deg,#fff4d6 0,var(--paper) 70%);isolation:auto}
html.is-phone .game.epilogue:not(.perde-run)>:not(.phone-logo,#phone-rig,#tour-buddy,#durak,#ending-copy,#scene-stores,#ending-announcement,dialog,.perde){display:none!important}
html.is-phone .epilogue:not(.perde-run)>.phone-logo{display:block;order:1;align-self:flex-start;margin:0 0 2px 10px;text-decoration:none;line-height:0}
html.is-phone .phone-logo img{display:block;height:40px;width:auto}
html.is-phone .game.story #phone-rig{order:3;position:relative;left:auto;top:auto;flex-shrink:0;width:var(--u-w);height:var(--u-h);transform:none;z-index:1}
/* the tour buddy's row: bubble column on the left (two lines + dots), a 104px Ponçik on the right;
   the row is one fixed height so the phone under it never jumps, whatever Ponçik says */
html.is-phone .tour-buddy{position:static;order:2;margin:2px 0 0;padding:0 10px;pointer-events:none}
html.is-phone #tour-buddy-copy{display:grid;grid-template-columns:minmax(0,1fr) 104px;grid-template-rows:auto auto;column-gap:10px;row-gap:6px;align-items:center;height:104px}
html.is-phone .tour-say{grid-column:1;grid-row:1;font-size:14px;margin:0;max-width:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.is-phone .tour-say:after{left:100%;top:50%;margin:-9px 0 0;border-width:9px 0 9px 9px;border-color:transparent transparent transparent #fffaf1}
html.is-phone .tour-buddy img{display:block;grid-column:2;grid-row:1 / span 2;width:104px;height:104px;background:none;border:0;box-shadow:none;filter:drop-shadow(0 6px 10px #1d0f3a55)}
html.is-phone #tour-buddy-foot{grid-column:1;grid-row:2;display:flex;align-items:center;gap:10px;min-height:34px}
html.is-phone .tour-progress{width:auto;margin:0;justify-content:flex-start}
html.is-phone .tour-buddy .cta{width:auto;margin:0;min-height:34px;padding:0 16px;font-size:13px;line-height:1}
html.is-phone .ending-copy,html.is-phone .scene-stores{display:none!important}
/* sideways: the phone fills the right column, logo and the buddy row the left; the page simply scrolls on */
@media(orientation:landscape){
  /* the phone stays readable: the unit may be taller than a sideways screen, the page scrolls */
  html.is-phone .game.story{--u-h:min(540px,max(calc(100svh - 24px),440px),calc(44vw / .5));--u-w:calc(var(--u-h) * .5)}
  html.is-phone .game.epilogue:not(.perde-run){display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto 1fr;column-gap:24px;row-gap:12px;align-items:start;padding:14px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left))}
  html.is-phone .epilogue:not(.perde-run)>.phone-logo{grid-column:1;grid-row:1;margin:0}
  html.is-phone .tour-buddy{grid-column:1;grid-row:2;margin-left:0}
  html.is-phone .tour-progress{width:auto;justify-content:flex-start;margin:0}
  html.is-phone .tour-buddy .cta{width:auto;margin:2px 0 0}
  html.is-phone .game.story #phone-rig{grid-column:2;grid-row:1 / span 3}
}

/* ---- download section and footer ---- */
html.is-phone .b6{padding-top:120px;background:linear-gradient(180deg,var(--deep) 0,var(--paper) 96px,var(--paper) 100%)}
html.is-phone .foot-note{display:block;width:100%;padding:6px 0 4px;font-size:.9375rem;font-weight:700;color:#5c456c}
html.is-phone .story-foot{gap:0}
/* the phone tour talks less about money: the deposit question is left to the computer */
html.is-phone .faq-money{display:none}

/* Mağaza düğmeleri, bilgisayar karşılamasında Ponçik'in altında yan yana (telefonda .w-stores zaten var) */
.wp-stores{position:absolute;left:50%;top:93%;transform:translateX(-50%) rotate(-4deg);z-index:2}
.wp-stores .store-row{display:flex;flex-wrap:nowrap;gap:10px}
html.is-phone .wp-stores{display:none}

/* telefonda alttaki SEO bağlantıları en çok iki satır (Emre, 25 Kas): üstte ortalanmış bağlantılar araya "·" ile,
   altta sosyal ikonlar ve © yan yana. Yazı küçük, dokunma alanı 32px (padding ile). */
html.is-phone .w-legal{justify-content:center;align-items:center;gap:0;padding-top:14px;font-size:11.5px;font-weight:700;text-align:center}
html.is-phone .w-legal>a{display:inline-flex;align-items:center;min-height:32px;padding:0}
html.is-phone .w-legal>a+a:before{content:'·';padding:0 5px;opacity:.6}
html.is-phone .w-legal:after{content:'';order:1;flex-basis:100%;height:0}
html.is-phone .w-legal .w-sosyal{order:2;gap:2px;margin:0 8px 0 0}
html.is-phone .w-legal .w-sosyal a{width:32px;height:32px}
html.is-phone .w-legal .sosyal-ikon{width:18px;height:18px}
html.is-phone .w-legal>span:last-child{order:3;width:auto;font-size:11px}
@media(max-width:380px){html.is-phone .w-legal{font-size:11px;letter-spacing:-.01em}html.is-phone .w-legal>a+a:before{padding:0 3px}}
@media(max-width:350px){html.is-phone .w-legal{font-size:10px}}
/* the same two rows for the footer at the end of the tour: links on top, © under them */
html.is-phone .story-foot{justify-content:center;font-size:.8125rem}
html.is-phone .story-foot .foot-link,html.is-phone .story-foot button{min-height:32px}
html.is-phone .story-foot>:not(:first-child):not(:last-child):before{content:'·';padding:0 6px;opacity:.6;text-decoration:none;display:inline-block}
html.is-phone .story-foot:after{content:'';order:1;flex-basis:100%;height:0}
html.is-phone .story-foot>span:last-child{order:2;font-size:.75rem}
@media(max-width:380px){html.is-phone .w-stores .store-row{gap:8px;flex-wrap:nowrap}html.is-phone .w-stores .store-btn{padding:0 9px 0 8px;gap:6px}html.is-phone .w-stores .store-txt strong{font-size:14px}html.is-phone .w-stores .store-btn svg{width:18px;height:22px}}

/* choice icons are drawn (svg), never a font glyph: Apple turned ✳ and ↗ into colour emoji (Emre, 25 Kas) */
.choice-icon .ci,.choice-arrow .ci{display:block;width:1em;height:1em}

/* A phone held sideways during the game or the tour (mode.js): a soft cover asks to hold it upright; the game waits under it. */
.rotate-cover{position:fixed;inset:0;z-index:2147483646;margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#2f2140f2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fffaf1;text-align:center;font:900 18px/1.35 Nunito,system-ui,sans-serif;animation:rotate-cover-in .3s ease both;touch-action:none}
.rotate-cover[hidden]{display:none}
.rotate-cover p{margin:0;max-width:22ch}
.rotate-icon{color:#ffd43c}
.rotate-icon .rotate-phone{transform-origin:32px 26px;animation:rotate-turn 2.4s ease-in-out infinite}
@keyframes rotate-cover-in{from{opacity:0}to{opacity:1}}
@keyframes rotate-turn{0%,20%{transform:rotate(-90deg)}55%,100%{transform:rotate(0deg)}}
@media(prefers-reduced-motion:reduce){.rotate-cover,.rotate-icon .rotate-phone{animation:none}}
