@font-face{font-family:"Bricolage";src:url("fonts/bricolage-600.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Bricolage";src:url("fonts/bricolage-800.woff2") format("woff2");font-weight:800;font-display:swap}

/* DEMIRCRAFT CO business-card language: cream paper, charcoal lines, yellow dot, colour strip.
   The stage stays neutral charcoal so the eye judges colour without a tinted surround. */
:root {
  --pink: #e8679b; --blue: #2f64c6; --teal: #14a2b3; --red: #e4553d; --yellow: #f1d21c; --on-yellow: #1f1d1a;
  --stage: #1f1d1a; --stage-text: #e9e4d6; --stage-muted: #a8a191; --r: 10px;
  /* light: cream paper */
  --paper: #f5f2e8; --white: #fffdf7; --text: #1f1d1a; --line: #1f1d1a; --shadow: #1f1d1a; --muted: #5f594e;
  --soft: rgba(31,29,26,.16); --tint: #fbf3c4; --tint2: #f8ecb0; --link: #2f64c6;
  color-scheme: light;
}
/* dark: the same card language on charcoal; follows the OS unless the viewer picks a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1916; --white: #25231f; --text: #ece6d6; --line: #45413a; --shadow: #000; --muted: #a8a191;
    --soft: rgba(236,230,214,.16); --tint: #2e2a1c; --tint2: #2a271f; --link: #7fa6ff; --stage: #121110;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1916; --white: #25231f; --text: #ece6d6; --line: #45413a; --shadow: #000; --muted: #a8a191;
  --soft: rgba(236,230,214,.16); --tint: #2e2a1c; --tint2: #2a271f; --link: #7fa6ff; --stage: #121110;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--stage); color: var(--text);
  font: 600 15px/1.5 "Bricolage", sans-serif; -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
a { color: var(--link); }

.app { display: grid; grid-template-columns: 284px 1fr 344px; grid-template-rows: 12px 1fr; height: 100vh; }
.serit { grid-column: 1 / -1; display: flex; border-bottom: 3px solid var(--line); }
.serit i { flex: 1; }
.serit i:nth-child(1) { background: var(--pink); } .serit i:nth-child(2) { background: var(--blue); }
.serit i:nth-child(3) { background: var(--teal); } .serit i:nth-child(4) { background: var(--red); }

/* ---------- left ---------- */
.side { background: var(--paper); border-right: 3px solid var(--line); padding: 22px 20px; display: flex;
  flex-direction: column; gap: 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sub { margin: 0; color: var(--muted); font-size: 13px; }
.logo { image-rendering: pixelated; border-radius: 8px; border: 2px solid var(--line); flex: none; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--white);
  border: 2px dashed var(--line); border-radius: var(--r); padding: 22px 14px; cursor: pointer; transition: background .15s; }
.drop b { font-weight: 800; }
.drop span { color: var(--muted); font-size: 13px; }
.drop:hover, .drop.over { background: var(--tint); }
.drop.small { padding: 16px 12px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list button { all: unset; cursor: pointer; padding: 9px 12px; border-radius: 8px; background: var(--white); border: 2px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.list button.active { background: var(--yellow); color: var(--on-yellow); border-color: var(--shadow); box-shadow: 3px 3px 0 var(--shadow); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
select { width: 100%; background-color: var(--white); border: 2px solid var(--line); border-radius: 8px; padding: 9px 40px 9px 12px;
  /* Our own arrow: a solid triangle drawn in the text colour (follows dark mode), instead of the browser's thin chevron. */
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 55%, calc(100% - 14px) 55%; background-size: 8px 8px; background-repeat: no-repeat; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }

/* ---------- centre (neutral) ---------- */
main { display: flex; flex-direction: column; min-width: 0; background: var(--stage); color: var(--stage-text); }
.topbar { display: flex; justify-content: center; padding: 16px 16px 0; }
.seg { display: inline-flex; background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px;
  box-shadow: 3px 3px 0 #000; color: var(--text); }
.seg button { all: unset; cursor: pointer; padding: 6px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--yellow); color: var(--on-yellow); box-shadow: inset 0 0 0 2px var(--on-yellow); }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px 24px; min-height: 0; position: relative; }
.wrap { position: relative; max-width: 100%; max-height: 100%; }
canvas { display: block; max-width: 100%; max-height: calc(100vh - 186px); background: #000; cursor: ew-resize; border-radius: 4px; }
.tag { position: absolute; top: 12px; font-size: 12px; padding: 3px 10px; border-radius: 999px; color: #f5f2e8;
  background: rgba(31,29,26,.7); pointer-events: none; letter-spacing: .04em; }
.tag.l { left: 12px; } .tag.r { right: 12px; }
.guide { max-width: 480px; background: var(--paper); color: var(--text); border: 3px solid var(--line); border-radius: 14px;
  padding: 26px 28px; box-shadow: 6px 6px 0 #000; }
.guide.over { position: absolute; z-index: 2; }
.guide h2 { margin: 0 0 14px; font-size: 19px; font-weight: 800; }
.steps { margin: 0 0 16px; padding-left: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--on-yellow); color: var(--on-yellow); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.steps li:nth-child(1)::before { background: var(--pink); } .steps li:nth-child(2)::before { background: var(--blue); color: var(--paper); }
.steps li:nth-child(3)::before { background: var(--teal); } .steps li:nth-child(4)::before { background: var(--red); }
.steps b { font-weight: 800; }
.guide .btn { margin-top: 14px; }
kbd { background: var(--white); border: 1.5px solid var(--line); border-radius: 5px; padding: 0 5px; font: inherit; font-size: 12px; }
.transport { display: flex; gap: 14px; align-items: center; padding: 12px 24px 18px; }
.transport input[type=range] { flex: 1; background: #3a3731; }
.time { font-variant-numeric: tabular-nums; color: var(--stage-muted); font-size: 13px; min-width: 96px; text-align: right; }
.icon-btn { all: unset; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow);
  border: 2px solid var(--on-yellow); display: grid; place-items: center; font-size: 13px; box-shadow: 2px 2px 0 #000; }

/* ---------- right ---------- */
.panel { background: var(--paper); border-left: 3px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-scroll { flex: 1; overflow-y: auto; }
.acc { border-bottom: 2px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; padding: 15px 22px; font-weight: 800; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.acc[open] summary { background: var(--yellow); color: var(--on-yellow); border-bottom: 2px solid var(--line); }
.acc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.acc summary:hover { background: var(--tint2); }
.acc[open] summary:hover { background: var(--yellow); }
.acc-body { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.presets button { all: unset; cursor: pointer; text-align: center; padding: 10px 8px; border-radius: 8px; font-size: 14px;
  background: var(--white); border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--shadow); transition: transform .08s, box-shadow .08s; }
.presets button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.presets button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.presets button.on { background: var(--yellow); color: var(--on-yellow); border-color: var(--shadow); }
.row { display: grid; grid-template-columns: 1fr 48px; gap: 2px 10px; align-items: center; }
.row label { font-size: 14px; cursor: default; }
.row output { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; color: var(--muted); }
.row input { grid-column: 1 / -1; }
.ref-img { width: 100%; border-radius: 8px; border: 2px solid var(--line); display: block; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-foot { padding: 16px 22px 20px; border-top: 3px solid var(--line); display: flex; flex-direction: column; gap: 8px; }

/* ---------- shared ---------- */
.btn { background: var(--white); border: 2px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px;
  box-shadow: 3px 3px 0 var(--shadow); transition: transform .08s, box-shadow .08s; color: var(--text); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn.primary { background: var(--yellow); color: var(--on-yellow); border-color: var(--on-yellow); font-weight: 800; font-size: 17px; padding: 13px 16px; border-radius: 10px; border-width: 3px;
  box-shadow: 4px 4px 0 var(--shadow); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--shadow); }
.link { all: unset; cursor: pointer; color: var(--text); font-size: 13px; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 3px; align-self: flex-start; }
.link:hover { text-decoration-color: var(--pink); }
.note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px;
  background: var(--soft); outline: none; margin: 8px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--yellow); border: 2.5px solid var(--on-yellow); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--yellow);
  border: 2.5px solid var(--on-yellow); cursor: pointer; }
input[type=range].hue { background: linear-gradient(90deg, #f33, #fd3, #3f6, #3ef, #36f, #f3f, #f33); }
.theme-field { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.theme-field > span { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.theme-pick { display: flex; background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.theme-pick button { all: unset; flex: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 4px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.theme-pick button:hover { color: var(--text); }
.theme-pick button.on { background: var(--yellow); color: var(--on-yellow); box-shadow: inset 0 0 0 2px var(--on-yellow); }
.theme-pick button:focus-visible, .seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- phone ---------- */
/* Desktop: the phone-only pieces are hidden and the two wrappers add no box of their own. */
.mobil { display: none; }
.kaynak-satir, .ayarlar { display: contents; }

/* Phone (Oğuz 25.11 sketch): big picture on top, looks as a strip of thumbnails, source + Settings in one row,
   a big download button always in reach; the fine controls live in a bottom drawer. */
@media (max-width: 760px) {
  .app { display: flex; flex-direction: column; height: auto; min-height: 100vh; min-height: 100dvh; }
  .side, .panel, .panel-scroll, main { display: contents; }
  .serit { order: 0; flex: none; height: 12px; }
  .brand { order: 1; background: var(--white); border-bottom: 3px solid var(--line); padding: 10px 14px; }
  .brand .sub { display: none; }
  .brand > div { flex: 1; }
  #yeniDosya { display: inline-block; padding: 0 14px; min-height: 44px; }
  .drop:not(.small), .list, .topbar { display: none; }
  .stage { order: 2; flex: none; height: 40vh; height: 40dvh; padding: 0; background: var(--stage); }
  .wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
  canvas { max-width: 100%; max-height: 40vh; max-height: 40dvh; border-radius: 0; touch-action: none; }
  .transport { order: 3; padding: 8px 14px; background: var(--stage); }
  /* The empty stage: one big button instead of the four-step guide. */
  .guide { background: none; border: 0; box-shadow: none; color: var(--stage-text); text-align: center; padding: 24px;
    display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .guide h2, .guide .steps, .guide > .note:not(.mobil) { display: none; }
  .guide .mobil { display: block; }
  .guide .note.mobil { color: var(--stage-muted); }
  #mobilSec { font-size: 19px; padding: 16px 22px; }
  .guide.over { display: none; }
  /* Looks: the first section, always open, as a sideways strip of thumbnails. */
  .panel-scroll > .acc:first-child { order: 4; border: 0; background: var(--paper); }
  .panel-scroll > .acc:first-child summary, #saveLook { display: none; }
  .panel-scroll > .acc:first-child .acc-body { padding: 12px 14px 4px; }
  .presets { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .presets button { flex: none; width: 78px; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
    border: 0; box-shadow: none; background: none; font-size: 12px; font-weight: 800; scroll-snap-align: start; }
  .presets button::before { content: ""; width: 72px; height: 72px; border: 3px solid var(--line); border-radius: 0;
    background: var(--onizleme, var(--soft)) center / cover; }
  .presets button.on { background: none; color: var(--text); }
  .presets button.on::before { box-shadow: 3px 3px 0 var(--shadow); outline: 3px solid var(--yellow); outline-offset: -7px; }
  .kaynak-satir { order: 5; display: flex; gap: 8px; align-items: flex-end; padding: 4px 14px 14px; background: var(--paper); }
  .kaynak-satir .field { flex: 1; gap: 4px; }
  .kaynak-satir .field > span { font-size: 11px; }
  select { min-height: 46px; border-width: 3px; border-radius: 0; font-weight: 800; }
  #ayarlarAc { display: inline-block; min-height: 46px; border-width: 3px; border-radius: 0; font-weight: 800; }
  .panel-foot { order: 7; position: sticky; bottom: 0; background: var(--white); padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
  .panel-foot .btn.primary { border-radius: 0; }
  .side-foot { order: 8; padding: 18px 14px 28px; background: var(--paper); }
  #helpBtn { display: none; }
  .theme-pick button { min-height: 40px; }
  /* Settings: a bottom drawer over the picture. */
  .ayarlar { display: none; }
  .ayarlar.acik { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-height: 62vh; max-height: 62dvh;
    overflow-y: auto; background: var(--paper); border-top: 3px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 0 rgba(0,0,0,.25);
    padding-bottom: env(safe-area-inset-bottom); }
  .ayarlar.acik::before { content: ""; width: 50px; height: 6px; border-radius: 3px; background: var(--line); align-self: center; margin: 10px 0 4px; flex: none; }
  #ayarlarKapat { display: block; margin: 14px; border-radius: 0; }
  .ayarlar .acc summary { padding: 14px 16px; }
  .ayarlar .acc-body { padding: 14px 16px 18px; }
  input[type=range]::-webkit-slider-thumb { width: 26px; height: 26px; }
  .row label { font-size: 15px; }
}
