%% The LaTeX package tcolorbox - version 2.02 (2013/03/13)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README
%%
\makeatletter
\def\tcblibrary@skins@loaded{}

\RequirePackage{tikz}[2010/10/13]

\def\tcb@creategeonodes@true{%
  \begin{scope}[every node/.style={line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle}]
    \node[name=frame,at={(0,0)},above right,minimum width=\kvtcb@width,minimum height=\tcb@height]{};
    \node[name=interior,at={({\kvtcb@left@rule},{\kvtcb@bottom@rule})},above right,minimum width=\tcb@innerwidth,minimum height=\tcb@innerheight]{};
    \ifnum\tcb@segment@state=1%
    \node[name=segmentation,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@bottom+\tcb@height@lower\relax})},above right,
       minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{};
    \fi%
    \iftcb@hasTitle%
    \node[name=title,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule\relax})},above right,
       minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\tcb@h@title+\kvtcb@toptitle+\kvtcb@bottomtitle+\kvtcb@boxsep*2\relax]{};
    \fi%
  \end{scope}%
}

\def\tcb@spec#1{\tikzset{tcb@spec/.style={#1}}}

% fill frame
\def\tcb@drawframe@path{%
  \path[fill=\kvtcb@colframe,rounded corners=\tcb@outer@arc,tcb@spec,frame@style]
  (frame.south west) rectangle (frame.north east);%
}

\def\tcb@drawframe@pathfirst{%
  \path[fill=\kvtcb@colframe,rounded corners=\tcb@outer@arc,tcb@spec,frame@style]
      (frame.south west) -- (frame.north west) --
      (frame.north east)[sharp corners] -- (frame.south east) -- cycle;%
}

\def\tcb@drawframe@pathmiddle{%
  \path[fill=\kvtcb@colframe,tcb@spec,frame@style]
      (frame.south west) rectangle (frame.north east);%
}

\def\tcb@drawframe@pathlast{%
  \path[fill=\kvtcb@colframe,rounded corners=\tcb@outer@arc,tcb@spec,frame@style]
      (frame.north east) -- (frame.south east) --
      (frame.south west)[sharp corners] -- (frame.north west) -- cycle;
}

% fill inner box with title
\def\tcb@drawwithtitle@path{%
  \path[fill=\kvtcb@colback,tcb@spec,interior@style] (interior.north west)
    --(interior.north east)[rounded corners=\kvtcb@arc]
    --(interior.south east)--(interior.south west)[sharp corners]
    -- cycle;%
}

\def\tcb@drawwithtitle@pathfirst{%
  \path[fill=\kvtcb@colback,tcb@spec,interior@style]
    (interior.south west|-frame.south west) rectangle (interior.north east);%
}

\let\tcb@drawwithtitle@pathmiddle=\tcb@drawwithtitle@pathfirst

\let\tcb@drawwithtitle@pathlast=\tcb@drawwithtitle@path

% fill inner box without title
\def\tcb@drawwithouttitle@path{%
  \path[fill=\kvtcb@colback,rounded corners=\kvtcb@arc,tcb@spec,interior@style]
  (interior.south west) rectangle (interior.north east);%
}

\def\tcb@drawwithouttitle@pathfirst{%
  \path[fill=\kvtcb@colback,rounded corners=\kvtcb@arc,tcb@spec,interior@style]
    (interior.south west|-frame.south west) -- (interior.north west) --
    (interior.north east)[sharp corners] -- (interior.south east|-frame.south east) -- cycle;%
}

\def\tcb@drawwithouttitle@pathmiddle{%
  \path[fill=\kvtcb@colback,tcb@spec,interior@style]
    (interior.south west|-frame.south west) rectangle (interior.north east|-frame.north east);%
}

\def\tcb@drawwithouttitle@pathlast{%
  \path[fill=\kvtcb@colback,rounded corners=\kvtcb@arc,tcb@spec,interior@style]
    (interior.north east|-frame.north east) -- (interior.south east) --
    (interior.south west)[sharp corners] -- (interior.north west|-frame.north west) -- cycle;%
}


% draw segmentation line
\def\tcb@drawlower@path{%
  \path[draw=\kvtcb@colframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style]
  (segmentation.west)--(segmentation.east);%
}

\long\def\tcb@pseudo@segmentation#1{%
{\parskip\z@\par\nointerlineskip}\begingroup%
\begin{tikzpicture}%
  \path[use as bounding box] (0,{\the\dimexpr-\kvtcb@middle-\kvtcb@boxsep\relax}) rectangle (0,{\the\dimexpr\kvtcb@middle+\kvtcb@boxsep\relax});
  \node[line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle,
        name=segmentation,at={({\the\dimexpr-#1-\kvtcb@boxsep\relax},0)},right,%
        minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{};
  \tcb@drawlower@path%
\end{tikzpicture}%
\endgroup{\parskip\z@\par\nointerlineskip}%
}

\def\tcbline{\iftcb@hasLower\tcb@pseudo@segmentation{\kvtcb@leftlower}%
  \else\tcb@pseudo@segmentation{\kvtcb@leftupper}\fi}

% draw title box
\def\tcb@drawtitle@path{%
  \path[tcb@spec,title@style]
  (title.south east)--(title.south west)[rounded corners=\kvtcb@arc]
    -- (title.north west)--(title.north east)[sharp corners]
    -- cycle;%
}

\let\tcb@drawtitle@pathfirst=\tcb@drawtitle@path

\def\tcb@drawtitle@pathmiddle{%
  \path[tcb@spec,title@style] (title.south west) rectangle (title.north east);%
}

\let\tcb@drawtitle@pathlast=\tcb@drawtitle@pathmiddle

% draw special versions
\def\tcb@drawspec@UT#1{%
  \path[#1,interior@style]
    (segmentation.west) rectangle (interior.north east);%
}

\def\tcb@drawspec@UR#1{%
  \path[#1,interior@style]
    (segmentation.east)--(segmentation.west)[rounded corners=\kvtcb@arc]
    -- (interior.north west)--(interior.north east)[sharp corners]
    -- cycle;%
}

\def\tcb@drawspec@US#1{%
  \path[#1,interior@style]
    (segmentation.west) rectangle (interior.north east|-frame.north east);
}

\def\tcb@drawspec@LR#1{%
  \path[#1,segmentation@style]
  ([yshift=0.1mm]segmentation.west)--([yshift=0.1mm]segmentation.east)[rounded corners=\kvtcb@arc]
    --(interior.south east)--(interior.south west)[sharp corners]
    -- cycle;%
}

\def\tcb@drawspec@LS#1{%
  \path[#1,segmentation@style]
    (interior.south west|-frame.south west) rectangle
    ([yshift=0.1mm]segmentation.east);%
}

\def\tcb@drawspec@T{%
  \path[top color=\kvtcb@colframe,bottom color=\kvtcb@colback]
      ([yshift=-0.01pt]interior.north west) rectangle
      ([yshift=0.01pt]title.south east);%
}

\def\tcb@drawframe@freelance{\tcb@frame@code}
\def\tcb@drawwithtitle@freelance{\tcb@interiortitled@code}
\def\tcb@drawwithouttitle@freelance{\tcb@interior@code}
\def\tcb@drawlower@freelance{\tcb@segmentation@code}
\def\tcb@drawtitle@freelance{\tcb@title@code}

\tcbset{%
  frame style/.code={\tikzset{frame@style/.style={#1}}},%
  frame code/.code={\def\tcb@frame@code{#1}},%
  frame code/.default=\tcb@drawframe@standard,%
  interior style/.code={\tikzset{interior@style/.style={#1}}},%
  interior titled code/.code={\def\tcb@interiortitled@code{#1}},%
  interior titled code/.default=\tcb@drawwithtitle@standard,%
  interior code/.code={\def\tcb@interior@code{#1}},%
  interior code/.default=\tcb@drawwithouttitle@standard,%
  segmentation style/.code={\tikzset{segmentation@style/.style={#1}}},%
  segmentation code/.code={\def\tcb@segmentation@code{#1}},%
  segmentation code/.default=\tcb@drawlower@standard,%
  title style/.code={\tikzset{title@style/.style={#1}}},%
  colbacktitle/.style={title style={fill=#1}},
  title code/.code={\def\tcb@title@code{#1}},%
  title code/.default=\tcb@drawtitle@standard,%
  colbacklower/.store in=\kvtcb@colbacklower,%
  clear@spec/.code={\tcb@spec{}},%
}

\tcbset{%
  frame style=,%
  interior style=,%
  segmentation style=,%
  frame code,%
  interior titled code,%
  interior code,%
  segmentation code,%
  title style=,%
  title code,%
  colbacklower=black!15!white,%
  clear@spec%
}


\tcbset{skin@enhanced/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=path,interior titled engine=path,
  interior engine=path,segmentation engine=path,title engine=path,
  skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedlast},
  enhanced/.style={skin=enhanced}}

\tcbset{skin@enhancedfirst/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathfirst,interior titled engine=pathfirst,
  interior engine=pathfirst,segmentation engine=path,title engine=pathfirst,
  skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedmiddle
}}

\tcbset{skin@enhancedmiddle/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathmiddle,interior titled engine=pathmiddle,
  interior engine=pathmiddle,segmentation engine=path,title engine=pathmiddle,
  skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedmiddle
}}

\tcbset{skin@enhancedlast/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathlast,interior titled engine=pathlast,
  interior engine=pathlast,segmentation engine=path,title engine=pathlast,
  skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedlast
}}

\tcbset{skin@freelance/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=freelance,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=freelance,
  skin first=freelance,skin middle=freelance,skin last=freelance},
  freelance/.style={skin=freelance}}

\tcbset{skin@bicolor/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=path,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=path,
  interior titled code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@path}%
    \or%
    \tcb@drawspec@UT{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@path}%
    \fi},
  interior code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@path}%
    \or%
    \tcb@drawspec@UR{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@path}%
    \fi},
  segmentation code={\tcb@drawspec@LR{fill=\kvtcb@colbacklower}},%
  skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolorlast},
  bicolor/.style={skin=bicolor}}

\tcbset{skin@bicolorfirst/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathfirst,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathfirst,
  interior titled code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathfirst}%
    \or%
    \tcb@drawspec@UT{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathfirst}%
    \fi},
  interior code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathfirst}%
    \or%
    \tcb@drawspec@UR{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathfirst}%
    \fi},
  segmentation code={\tcb@drawspec@LS{fill=\kvtcb@colbacklower}},
  skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolormiddle
}}

\tcbset{skin@bicolormiddle/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathmiddle,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathmiddle,
  interior titled code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathmiddle}%
    \or%
    \tcb@drawspec@UT{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathmiddle}%
    \fi},
  interior code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathmiddle}%
    \or%
    \tcb@drawspec@US{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathmiddle}%
    \fi},
  segmentation code={\tcb@drawspec@LS{fill=\kvtcb@colbacklower}},
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolormiddle
}}

\tcbset{skin@bicolorlast/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathlast,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathlast,
  interior titled code={%
    \ifcase\tcb@segment@state
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathlast}%
    \or%
    \tcb@drawspec@UT{fill=\kvtcb@colback}%
    \else%
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathlast}%
    \fi},
  interior code={%
    \ifcase\tcb@segment@state%
    {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathlast}%
    \or%
    \tcb@drawspec@US{fill=\kvtcb@colback}%
    \else
    {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathlast}%
    \fi},
  segmentation code={\tcb@drawspec@LR{fill=\kvtcb@colbacklower}},%
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolorlast
}}


\tikzset{beamer@color/.style={top color=\kvtcb@colback,bottom color=\kvtcb@colback!85!black}}

\tcbset{%
  skin@beamer/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=path,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=path,
  interior titled code={%
    \ifnum\tcb@segment@state=1%
    \tcb@drawspec@UT{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithtitle@path}%
    \fi%
    \tcb@drawspec@T},
  interior code={%
    \ifnum\tcb@segment@state=1
    \tcb@drawspec@UR{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}%
    \fi},
  segmentation code={\tcb@drawspec@LR{beamer@color}},%
  skin first=beamerfirst,skin middle=beamermiddle,skin last=beamerlast},
  beamer/.style={skin=beamer,boxrule=0mm,titlerule=1mm,toptitle=0.5mm,arc=2mm,fonttitle=\bfseries,
    frame style={fill=\kvtcb@colframe,drop shadow}},
}

\tcbset{%
  skin@beamerfirst/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathfirst,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathfirst,
  interior titled code={%
    \ifnum\tcb@segment@state=1%
    \tcb@drawspec@UT{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}%
    \fi%
    \tcb@drawspec@T},
  interior code={%
    \ifnum\tcb@segment@state=1
    \tcb@drawspec@UR{beamer@color}\else%
    {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}%
    \fi},
  segmentation code={\tcb@drawspec@LS{beamer@color}},%
  skin first=beamerfirst,skin middle=beamermiddle,skin last=beamermiddle}}

\tcbset{%
  skin@beamermiddle/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathmiddle,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathmiddle,
  interior titled code={%
    \ifnum\tcb@segment@state=1%
    \tcb@drawspec@UT{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}%
    \fi%
    \tcb@drawspec@T},
  interior code={%
    \ifnum\tcb@segment@state=1
    \tcb@drawspec@US{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}%
    \fi},
  segmentation code={\tcb@drawspec@LS{beamer@color}},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamermiddle}}

\tcbset{%
  skin@beamerlast/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathlast,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=freelance,title engine=pathlast,
  interior titled code={%
    \ifnum\tcb@segment@state=1%
    \tcb@drawspec@UT{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}%
    \fi%
    \tcb@drawspec@T},
  interior code={%
    \ifnum\tcb@segment@state=1
    \tcb@drawspec@US{beamer@color}%
    \else%
    {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}%
    \fi},
  segmentation code={\tcb@drawspec@LR{beamer@color}},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamerlast}}


\def\tcb@drawspec@widgetsegment{%
  \path[left color=\kvtcb@colframe!75!white,right color=\kvtcb@colframe!75!white!25!\kvtcb@colback,segmentation@style]
    ([yshift={-\kvtcb@middle/4}]segmentation.west) rectangle ([yshift={\kvtcb@middle/4}]segmentation.east);
}

\tikzset{widget@color/.style={left color=\kvtcb@colframe!75!white,right color=\kvtcb@colframe!75!white!25!\kvtcb@colback}}

\tcbset{skin@widget/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=path,interior titled engine=path,
  interior engine=path,segmentation engine=freelance,title engine=freelance,
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@path}},
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetlast},
  widget/.style={skin=widget,arc=0.5mm,fonttitle=\bfseries,
    titlerule=0mm,toprule at break=0mm},
}

\tcbset{skin@widgetfirst/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathfirst,interior titled engine=pathfirst,
  interior engine=pathfirst,segmentation engine=freelance,title engine=freelance,
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathfirst}},
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetmiddle}}

\tcbset{skin@widgetmiddle/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathmiddle,interior titled engine=pathmiddle,
  interior engine=pathmiddle,segmentation engine=freelance,title engine=freelance,
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathmiddle}},
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetmiddle}}


\tcbset{skin@widgetlast/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=pathlast,interior titled engine=pathlast,
  interior engine=pathlast,segmentation engine=freelance,title engine=freelance,
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathlast}},
  segmentation code={\tcb@drawspec@widgetsegment},%
    skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetlast}}


\tcbset{skin@draft/.style={clear@spec,%
  graphical environment=tikzpicture,geometry nodes,
  frame engine=freelance,interior titled engine=freelance,
  interior engine=freelance,segmentation engine=path,title engine=path,
  skin first=draft,skin middle=draft,skin last=draft,
  interior style=,frame style=,segmentation style={draw=black,dashed},
  colupper=black!50!white,collower=black!50!white,coltitle=black!50!white,
  frame code={%
    \path[draw=blue!10!white,double,line width=1pt,dashed] (current bounding box.south west) rectangle (current bounding box.north east);
    {\tcb@spec{fill=black!15!white,draw=black}\tcb@drawframe@path}%
    \iftcb@hasTitle%
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle
        (interior.north east);
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([yshift={\kvtcb@title@rule}]interior.north west) rectangle
        ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east);
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]title.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]title.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@lefttitle},yshift={\kvtcb@boxsep+\kvtcb@bottomtitle}]title.south west)
         rectangle node[font=\scriptsize] {title: w=\tcb@w@title, h=\tcb@h@title}
        +(\tcb@w@title,\tcb@h@title);
      \path[draw=red,opacity=0.5] (title.south west) rectangle (title.north east);
    \else%
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle
        ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east);
    \fi%
    \ifcase\tcb@segment@state
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper}
        +(\tcb@w@upper,\tcb@height@upper);
    \or%
      \ifvoid\tcb@upperbox
        \path[fill=white,draw,dotted]
          ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
          ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \else
        \path[fill=white,draw,dotted]
          ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
          ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]segmentation.east);
        \path[fill=white,draw,dotted]
           ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]segmentation.west)
           rectangle ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
        \path[fill=green!20!white,draw=green!75!black,dashed]
          ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep}]segmentation.north west)
           rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper}
           +(\tcb@w@upper,\tcb@height@upper);
      \fi%
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle  node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@lower}
        +(\tcb@w@lower,\tcb@height@lower);
      \path[draw=red,opacity=0.5] (segmentation.south west) rectangle (segmentation.north east);
    \else
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle  node[font=\scriptsize] {lower: w=\tcb@height@lower, h=\tcb@h@lower}
        +(\tcb@w@lower,\tcb@height@lower);
    \fi%
    \path[draw=red,opacity=0.5] (interior.south west) rectangle (interior.north east);
    \path[draw=red,opacity=0.5] (frame.south west) rectangle (frame.north east);
    \node[above,font=\scriptsize,red!50!black] at (interior.south) {interior: w=\tcb@innerwidth, h=\tcb@innerheight};
    \node[above,font=\scriptsize,red!50!black] at (frame.north) {frame: w=\the\dimexpr\kvtcb@width\relax, h=\tcb@height};
    \path[draw=blue!10!white,double,line width=1pt,dashed,opacity=0.3] (current bounding box.south west) rectangle (current bounding box.north east);
    \pgfsetfillopacity{0.3}
  },
  interior titled code=,interior code=,overlay=,},
  draft/.style={skin=draft}}


\newbox\tcb@waterbox

\def\tcb@setratio#1#2#3{\edef#1{\strip@pt\dimexpr\number\numexpr\number\dimexpr#2\relax*65536/\number\dimexpr#3\relax\relax sp\relax}}

\def\tcb@setratiorobust#1#2#3{\ifdim\dimexpr#3<1pt\tcb@setratio#1{#2}{1pt}\else\tcb@setratio#1{#2}{#3}\fi}

\def\tcb@comp@wm@stretch{%
  \tcb@setratiorobust\tcb@scale@x{\dimexpr\kvtcb@watermark@factor\dimexpr\tcb@innerwidth\relax\relax}{\wd\tcb@waterbox}%
  \tcb@setratiorobust\tcb@scale@y{\dimexpr\kvtcb@watermark@factor\dimexpr\tcb@innerheight\relax\relax}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
}

\def\tcb@comp@wm@zoom{%
  \tcb@setratiorobust\tcb@scale@x{\dimexpr\kvtcb@watermark@factor\dimexpr\tcb@innerwidth\relax\relax}{\wd\tcb@waterbox}%
  \tcb@setratiorobust\tcb@scale@y{\dimexpr\kvtcb@watermark@factor\dimexpr\tcb@innerheight\relax\relax}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
  \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
}

\def\tcb@drawspec@watermark{%
  \tcb@comp@wm%
  \node[opacity=\kvtcb@watermark@opacity,anchor=center] at (interior) {\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}};%
}

\def\tcb@drawspec@watermark@tikz#1{%
  \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture}%
  \tcb@drawspec@watermark%
}

\def\tcb@drawspec@watermark@graphics#1{%
  \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\includegraphics{#1}}\endpgfinterruptpicture}%
  \tcb@drawspec@watermark%
}

\def\tcb@drawspec@watermark@text#1{%
  \tcb@drawspec@watermark@tikz{\node[inner sep=0pt,align=flush center]{#1};}%
}

\tcbset{%
  watermark opacity/.store in=\kvtcb@watermark@opacity,%
  watermark color/.store in=\kvtcb@watermark@color,%
  watermark zoom/.code={\def\kvtcb@watermark@factor{#1}\let\tcb@comp@wm=\tcb@comp@wm@zoom},%
  watermark stretch/.code={\def\kvtcb@watermark@factor{#1}\let\tcb@comp@wm=\tcb@comp@wm@stretch},%
%
  watermark tikz/.style={overlay={\tcb@drawspec@watermark@tikz{#1}}},
  watermark tikz on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@tikz{#2}}},%
  watermark graphics/.style={overlay={\tcb@drawspec@watermark@graphics{#1}}},
  watermark graphics on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@graphics{#2}}},
  watermark text/.style={overlay={\tcb@drawspec@watermark@text{#1}}},
  watermark text on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@text{#2}}},
  no watermark/.style={no overlay},
  %
  watermark opacity=1.00,
  watermark color=\kvtcb@colback!85!\kvtcb@colframe,
  watermark zoom=0.75,
}


\tcbset{marker/.style={%
  skin=enhancedmiddle,
  breakable,parbox=false,
  boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm,
  left=3mm,right=3mm,top=1mm,bottom=1mm,
  toptitle=1mm,bottomtitle=1mm,fonttitle=\bfseries,
  arc=0mm,outer arc=0mm,
  colback=yellow!10!white,colframe=red,
  watermark color=yellow!75!red!25!white,
  enlarge left by=-8mm,
  enlarge right by=-8mm,
  enlarge top by=0mm,
  enlarge bottom by=0mm,
  width=\the\dimexpr\linewidth+1.6cm\relax,
  frame style={top color=\kvtcb@colframe,bottom color=\kvtcb@colframe,middle color=yellow!75!\kvtcb@colframe},
  title style={left color=\kvtcb@colframe,right color=\kvtcb@colframe,middle color=yellow!75!\kvtcb@colframe},
  watermark tikz={\draw[line width=2mm] (interior) circle (1cm) node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont!};},
  watermark zoom=0.75,
}}

