:root{font-family:system-ui,sans-serif;color:#183734;background:#f5f4ed;--accent:#185e4f;--line:#d4ddd4}
*{box-sizing:border-box}body{margin:0}header{border-bottom:1px solid var(--line);background:#fdfcf7}
nav,main{width:min(calc(100% - 2rem),65rem);margin:auto}nav{display:flex;gap:1rem;align-items:center;min-height:4rem;flex-wrap:wrap;padding-block:.5rem}
nav>a:first-child{font-weight:750;margin-right:auto}main{padding:clamp(2rem,6vw,5rem) 0}
a{color:var(--accent)}h1,h2,h3{line-height:1.1;margin:0 0 .65rem}h1{font-size:clamp(2rem,6vw,3.8rem);letter-spacing:-.05em}
p{line-height:1.55;margin:0 0 1rem;max-width:65ch}.card{background:#fff;border:1px solid var(--line);border-radius:.75rem;padding:1.25rem;margin-bottom:1rem}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:1rem}.login{max-width:26rem;margin-top:2rem}
label{display:grid;gap:.3rem;margin-bottom:.9rem;font-weight:600}input,textarea,select{font:inherit;max-width:100%;width:100%;padding:.55rem;border:1px solid #8b9d93;border-radius:.32rem;background:white}
button,.button{display:inline-block;font:inherit;font-weight:650;padding:.56rem .85rem;border:1px solid var(--accent);border-radius:.35rem;color:white;background:var(--accent);text-decoration:none;cursor:pointer}
.quiet{background:white;color:var(--accent)}.inline{display:inline-block}.notice{padding:.65rem;border-left:3px solid var(--accent);background:#e9f2ed}.small{font-size:.9rem}
:focus-visible{outline:3px solid #aa5d20;outline-offset:3px}iframe{width:100%;height:68vh;min-height:26rem;border:1px solid var(--line);border-radius:.5rem;background:white}
.overlay{position:fixed;inset:0;display:grid;place-items:center;background:#11312bcc;padding:1rem}.overlay>.card{width:min(100%,30rem);padding:2rem}
.version{display:flex;gap:.6rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:.75rem 0;border-top:1px solid var(--line)}

/* Entrance and its editor */
.arrival-main{width:min(calc(100% - 3rem),75rem);padding-block:clamp(1.75rem,5vw,4.6rem)}
.entrance{display:grid;grid-template-columns:1.05fr 1fr;gap:clamp(2rem,6vw,5rem);align-items:center}
.entrance-copy{padding:1rem 0 1rem clamp(0rem,3vw,2.4rem);min-width:0}
.entrance-copy h1{font:400 clamp(2.5rem,5.15vw,4.65rem)/1.02 Georgia,'Times New Roman',serif;letter-spacing:-.055em;margin-bottom:1.3rem;overflow-wrap:anywhere}
.entrance-intro{font-size:clamp(1rem,1.5vw,1.16rem);max-width:36ch;color:#425c52;margin-bottom:2.15rem;white-space:pre-line;overflow-wrap:anywhere}
.entrance-map{display:block;width:100%;height:clamp(29rem,49vw,41rem);object-fit:cover;object-position:center;border-radius:.7rem;border:1px solid #b9c9bd;background:#d8e0d3}
.entry-form{max-width:24rem}
.entry-form fieldset{border:0;padding:0;margin:0;min-width:0}
.entry-form input{min-height:2.9rem;padding-inline:.8rem;background:#fffef9}
.entry-form button{min-height:2.85rem;width:100%;margin-top:.25rem}
.entry-form fieldset:disabled button{opacity:.55;cursor:default}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.editor-grid{display:grid;gap:1.25rem;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);align-items:start}
.editor-header,.workspace-entry,.preview-bar{display:flex;justify-content:space-between;gap:.85rem;align-items:center;flex-wrap:wrap}
.editor-header{margin-bottom:1.1rem}
.editor-header h2,.workspace-entry h2{margin-bottom:.25rem}
.workspace-entry p{margin:0}
.editor-image img{display:block;width:100%;max-height:22rem;object-fit:contain;background:#eef0e8;margin:1rem 0;border-radius:.35rem}
.check{display:flex;gap:.45rem;align-items:center}
.check input{width:auto}
.preview-bar{padding:1rem;margin-bottom:1.35rem;background:#fffefa;border:1px solid var(--line);border-radius:.5rem}
@media(max-width:46rem){
  .arrival-main{width:calc(100% - 2rem);padding-block:1.55rem 2rem}
  .entrance,.editor-grid{grid-template-columns:minmax(0,1fr)}
  .entrance{gap:1.65rem}
  .entrance-copy{padding:0}
  .entrance-intro{margin-bottom:1.4rem}
  .entrance-map{height:clamp(12rem,53vw,22rem)}
}

/* Viewer fills the viewport while leaving a compact navigation bar. */
.tool-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}
.tool-label{min-width:0}
.tool-label h1{margin:.45rem 0 0;font-size:clamp(1.75rem,4vw,3.05rem);overflow-wrap:anywhere}
.tool-toolbar button{flex-shrink:0}
.tool-toolbar button[hidden]{display:none}
.tool-view iframe{display:block}
.tool-expanded,.tool-expanded body{overflow:hidden}
.tool-expanded .tool-view,.tool-view:fullscreen{position:fixed;inset:0;z-index:4;background:#fff;display:grid;grid-template-rows:auto minmax(0,1fr)}
.tool-expanded .tool-toolbar,.tool-view:fullscreen .tool-toolbar{margin:0;padding:.5rem clamp(.6rem,2vw,1.15rem);border-bottom:1px solid var(--line);background:#fdfcf7}
.tool-expanded .tool-label,.tool-view:fullscreen .tool-label{display:flex;flex-wrap:wrap;align-items:center;column-gap:1rem}
.tool-expanded .tool-label h1,.tool-view:fullscreen .tool-label h1{font-size:clamp(.95rem,2vw,1.2rem);margin:.15rem 0;letter-spacing:0}
.tool-expanded .tool-toolbar button,.tool-view:fullscreen .tool-toolbar button{font-size:.875rem;padding:.42rem .6rem}
.tool-expanded .tool-view iframe,.tool-view:fullscreen iframe{width:100%;height:100%;min-height:0;border:0;border-radius:0}

/* Workspace, version history and trash */
.manage-toolbar,.version-actions{display:flex;align-items:center;gap:.65rem 1rem;flex-wrap:wrap}
.manage-toolbar{margin:1.25rem 0}
.tool-filter{display:flex;flex-wrap:wrap;align-items:end;gap:.8rem;margin-bottom:1rem}
.tool-filter label{margin:0;min-width:min(100%,10rem)}
.tool-filter label:first-child{flex:1 1 14rem}
.tool-filter button,.tool-filter>a{margin-bottom:1px}
.tool-table{overflow:auto;padding:.1rem 1rem}
.tool-table table{border-collapse:collapse;width:100%;min-width:36rem;text-align:left}
.tool-table th,.tool-table td{padding:.85rem .65rem;vertical-align:top;border-bottom:1px solid var(--line)}
.tool-table tbody tr:last-child>*{border-bottom:0}
.tool-table thead{font-size:.9rem;color:#405d55}
.tool-description{display:block;color:#486158;font-size:.9rem;font-weight:400;margin-top:.28rem;overflow-wrap:anywhere}
.tool-status{display:inline-block;max-width:100%;background:#f1ebd7;color:#584921;padding:.27rem .56rem;border-radius:.26rem;font-size:.85rem;font-weight:650}
.tool-status--freigegeben{background:#e5f2e9;color:#18503d}
.tool-status--archiviert{background:#eaece9;color:#465451}
.details-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:1rem;align-items:start}
.version-list{list-style:none;padding-inline-start:0}
.card.version-list{padding-inline:1.25rem}
.version-actions form{margin:0}
.danger-link{color:#852e2a}.danger-button{color:#fff;background:#852e2a;border-color:#852e2a}
@media(max-width:46rem){.details-grid{grid-template-columns:minmax(0,1fr)}}

.lab-card{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.lab-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1rem;margin-top:auto}

/* Signed-in atelier */
@font-face {
  font-family: "Instrument Sans";
  src: url("/schriften/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/schriften/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
.atelier-internal {
  --accent: #214d41;
  --line: #d6ddce;
  background: #f4f3eb;
  color: #203d35;
  font-family: "Instrument Sans", system-ui, sans-serif;
}
.atelier-internal nav,
.atelier-internal main {
  width: min(calc(100% - 3rem), 72rem);
}
.atelier-internal header { background: #f8f7f1; }
.atelier-internal nav { min-height: 4.5rem; gap: clamp(.75rem, 2.6vw, 2rem); }
.atelier-internal nav > a {
  text-decoration: none;
  font-weight: 650;
}
.atelier-internal nav > a:first-child { font-size: 1.15rem; letter-spacing: -.035em; }
.atelier-internal nav > a:hover,
.atelier-internal .lab-actions a:hover,
.atelier-internal .manage-toolbar a:not(.button):hover,
.atelier-internal .tool-label a:hover,
.atelier-internal .back-line a:hover,
.atelier-internal .tool-table a:hover { text-decoration: underline; text-underline-offset: .24em; }
.atelier-internal .tool-label a,
.atelier-internal .manage-toolbar a,
.atelier-internal .back-line a,
.atelier-internal .tool-table a { text-decoration: none; }
.atelier-internal .card { border-radius: .35rem; background: #fcfbf7; }
.atelier-internal button, .atelier-internal .button { border-radius: .25rem; }
.atelier-internal h1 { letter-spacing: -.04em; }
.overview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(32%, 22rem);
  align-items: end;
  gap: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(1.1rem, 3vw, 1.8rem);
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
}
.atelier-internal .overview-heading h1 {
  font: 650 clamp(1.6rem, 6.65vw, 5.6rem)/1 "Instrument Sans", system-ui, sans-serif;
  letter-spacing: -.065em;
  margin: 0 0 .65rem;
}
.overview-heading p { font-size: clamp(1rem, 2vw, 1.2rem); margin: 0; color: #4a6056; }
.overview-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
.overview-search label { min-width: 0; margin: 0; }
.overview-search input { font-weight: 400; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  background: #173a32;
  color: #fffdf3;
  border-radius: .35rem;
  overflow: hidden;
  margin-bottom: 1.85rem;
}
.feature-copy { padding: clamp(1.4rem, 4.8vw, 3.8rem); min-width: 0; align-self: center; }
.feature-copy h2 { font-size: clamp(2rem, 4.25vw, 3.55rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.feature-copy p { color: #e6eade; overflow-wrap: anywhere; }
.feature-copy .feature-label { font-weight: 650; color: #e8dbac; }
.feature-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1.25rem; }
.feature-actions > a { color: #fffdf3; text-underline-offset: .22em; }
.feature-copy .button { color: #173a32; background: #fffdf3; border-color: #fffdf3; }
.feature-copy .button:hover { background: #eee6c9; }
.feature-visual { position: relative; width: 100%; aspect-ratio: 8 / 5; align-self: center; background: #dce3d2; }
.feature-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-note { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .65rem 0 1rem; }
.welcome-note p { margin: 0; }
.lab-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  border-top: 2px solid #9aac95;
}
.lab-card h2 { font-size: 1.42rem; overflow-wrap: anywhere; }
.lab-card-copy { flex: 1; display: flex; flex-direction: column; padding: 1.25rem; }
.lab-card-copy p { color: #4a6056; overflow-wrap: anywhere; }
.lab-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #e6e9dc; }
.lab-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin-top: auto; padding-top: .45rem; }
.lab-actions a { font-size: .95rem; text-decoration: none; }
.lab-actions .lab-open { font-weight: 700; }
.overview-all { margin: 1.35rem 0 0; }
.overview-all a { font-weight: 650; text-underline-offset: .24em; }
.overview-editor { max-width: 38rem; }
@media (max-width: 46rem) {
  .atelier-internal nav, .atelier-internal main { width: calc(100% - 2rem); }
  .overview-heading, .feature { grid-template-columns: minmax(0, 1fr); }
  .atelier-internal .overview-heading h1 { font-size: clamp(1.6rem, 10vw, 4.6rem); }
  .overview-heading { row-gap: .8rem; }
  .feature-visual { min-height: 0; aspect-ratio: 2 / 1; }
}
@media (max-width: 32rem) {
  .atelier-internal nav { justify-content: space-between; gap: .45rem .7rem; }
  .atelier-internal nav > a:first-child { flex-basis: 100%; margin-right: 0; }
  .atelier-internal nav button { padding: .35rem .5rem; font-size: .9rem; }
}

/* Favorites, cover framing and presentation */
.cards.tool-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.atelier-internal .favorite-button {
  --star-stroke: #456357;
  --star-fill: #fcfbf7;
  --star-shape: polygon(50% 0%, 65% 32%, 100% 38%, 75% 63%, 80% 100%, 50% 82%, 18% 100%, 24% 63%, 0% 38%, 35% 32%);
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
}
.atelier-internal .favorite-button:hover { --star-fill: #eaf0e8; background: #eaf0e8; }
.feature-actions .favorite-button { --star-stroke: #f5f3da; --star-fill: #173a32; }
.feature-actions .favorite-button:hover { --star-fill: #244b41; background: #244b41; }
.atelier-internal .favorite-button[aria-pressed="true"] { --star-stroke: #946015; --star-fill: #946015; }
.feature-actions .favorite-button[aria-pressed="true"] { --star-stroke: #ffdb83; --star-fill: #ffdb83; }
.favorite-icon { position: relative; display: block; width: .95rem; height: .95rem; }
.favorite-icon::before, .favorite-icon::after { position: absolute; inset: 0; content: ""; clip-path: var(--star-shape); }
.favorite-icon::before { background: var(--star-stroke); }
.favorite-icon::after { background: var(--star-fill); transform: scale(.71); }
[data-live-error]:not([hidden]) { color: #852e2a; }
.lab-cover-link { display: block; }
.tool-filter .lab-favorites { min-width: 0; min-height: 2.75rem; align-self: end; }
.viewer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.viewer-neighbor { font-size: .875rem; }
.crop-previews:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}
.crop-previews figure { min-width: 0; margin: 0; }
.crop-previews figcaption { font-size: .875rem; }
.crop-previews figure img {
  margin: .35rem 0 0;
  object-fit: cover;
}
.crop-desktop { aspect-ratio: 8 / 5; }
.crop-mobile { aspect-ratio: 2 / 1; }
[data-position="oben-links"] { object-position: left top; }
[data-position="oben"] { object-position: center top; }
[data-position="oben-rechts"] { object-position: right top; }
[data-position="links"] { object-position: left center; }
[data-position="rechts"] { object-position: right center; }
[data-position="unten-links"] { object-position: left bottom; }
[data-position="unten"] { object-position: center bottom; }
[data-position="unten-rechts"] { object-position: right bottom; }
.showcase-controls form + form { margin-top: .8rem; }
.showcase-guide li { margin-bottom: .4rem; }
.showcase-controls input[readonly] { max-width: 46rem; }
